ACT-R Lesson Units

Unit 0: Interpreting Production Rules

Section 1: Production Rule Forms

ACT-R is a production system theory which tries to explain human cognition by developing a model of the knowledge structures that underlie that cognition. There are two types of knowledge representation in ACT-R -- declarative and procedural knowledge. Declarative knowledge corresponds to things we are aware we know and can usually describe to others. Examples of declarative knowledge include "George Washington was the first president" and "An atom is like the solar system". Procedural knowledge is knowledge which we display in our behavior but which we are not conscious of. For instance, no one can describe the rules by which we speak a language and yet we do. In ACT-R declarative knowledge is represented in structures called chunks in ACT-R whereas procedural knowledge is represented in productions. Thus chunks and productions are the basic building blocks for an ACT-R model.

A production system operates by trying to find production rules which match declarative information in what is called working memory. Working memory is a set of declarative structures which are currently active. The function of Unit 0 is to explain and illustrate how production rules find patterns that match in working memory and how production rules chain together to produce a coherent sequence of mental steps.

Declarative Units in ACT-R

In ACT-R, elements of declarative knowledge are called chunks or WMEs (for working memory elements). WMEs are intended to represent chunks of knowledge that a person might be expected to have when they solve a problem. A chunk is defined by its type and its slots. One can think of types as categories (e.g., birds) and slots as category attributes (e.g., color or size). Below are chunks that encode the facts that the dog chased the cat , and that 4+3=7: The type of the first chunk is chase and its slots are agent and object. The type of the second chunk is addition-fact and its slots are addend1, addend2, and sum.

Action023:
isa chase
agent cat
object dog
Fact3+4:
isa addition-fact
addend1 three
addend2 four
sum seven

Production Rules in ACT-R

A production rule is a statement of a particular contingency that controls behavior. Examples might be

IF the goal is to classify a person
    and he is unmarried
THEN classify him as a bachelor

IF the goal is to add two digits d1 and d2 in a column
    and d1+ d2 = d3
THEN set as a subgoal to write d3 in the column

The condition of a production rule (the IF part) is just a specification of a number of chunks while the action of a production rule (the THEN part) basically involves the creation or modifications of some chunks. The above is an informal English specification of production rules. It is also important to learn the syntax for their precise specification within the ACT-R system.

Production Rule Format

A production rule is a condition-action pair. The condition (also known as the left-hand side) specifies some chunks that must be present for the production rule to apply. The action (right-hand side) specifies some actions be taken. The general form of a production rule is:

(p Name
list of chunk patterns
==>
the definition of the actions to be taken.)

Stated another way, a production consists of patterns that match to chunks. If a match to these is found, then the predefined actions are taken. While the form of productions allowed in ACT-R is quite general we will be describing a rather restricted syntax which is both justified on grounds of cognitive plausibility and because it makes the task of learning ACT-R simpler. The manual and primer describe the more general version of ACT-R productions.

ACT-R's Condition Form

The condition of a production rule consists of first a specification of a chunk that represents the goal and then any number of additional chunks. The following is an example of a production that matches the goal to add two numbers, retrieves the sum, and writes that in the result slot of the goal:
(p add-numbers
=goal>
isa add-column
number1 =num1
number2 =num2
result nil
=fact>
isa addition-fact
addend1 =num1
addend2 =num2
sum =sum
==>
=goal>
result =sum)
English Translation:
IF the goal
is to add the numbers in a column
and =num1 is the first number
and =num2 is the second number
and the result is not known
and there is
an addition fact stating that
=num1 plus
=num2 equals
=sum
Then
note
that the result is =sum

Let's examine the goal and the other chunk pattern from the condition part of the production rule above.
=goal>
isa add-column
number1 =num1
number2 =num2
result nil
=fact>
isa addition-fact
addend1 =num1
addend2 =num2
sum =sum
ACT-R separates the head of the chunk pattern from its slots by ">".

Symbols prefixed by "=", like =goal, =fact, =num1, and =num2 are variables that can match to any element while elements like two are constants. ACT-R distinguishes among constants and variables. If constants are used in the definition, then the match is highly specific -- the production will fire if the value of the slot of the chunk and the constant match exactly. A variable allows you to relax the criteria for matching, so that, for example, the value of a particular slot of a chunk can be anything.

ACT-R's Action Side

The right-hand side(RHS -- the part after the arrow) or action side of a production consists of a small set of actions. The RHS usually specifies new chunks to be added to declarative memory or changes to the slot values of existing chunks. Generally, all the variables on the right hand side must have been bound (assigned a value) on the left-hand side. (An exception is when you wish to create a new working memory element as part of the action. An unbound variable on the RHS causes a new chunk to be created and assigned the value of that variable. We will discuss this in more detail later.) Here is what a complete specification of a production might look like:
(p eligible-male
=goal>
isa classify-person
gender male
married nil
status unknown
==>
=goal>
status bachelor)
The production specification is surrounded by parentheses beginning with a "p", then comes the unique name of the production (in this case "eligible male", then the condition (in this case a single clause), and in the action we fill in one of the slots of this variable. Note that this production modifies a chunk (rather than creating one) because the action side changes the value of the status slot from unknown to bachelor.

Section 2: The Count Example

We will be going through a series of examples to illustrate the basic ACT-R environment and to illustrate how a production system works. All of your work in ACT-R may involve using the ACT-R environment. To bring up this environment go into the Unit 0 folder and double click on ACT-R Environment. This should bring up a LISP environment which has the full functionality of LISP but which also allows fairly direct execution of ACT-R code.

The first example is a simple production system that counts up from one number to another - for example it will count up from 2 to 5 -- 2,3,4,5.

There should be a menu item called Projects. Go to that menu and select Open Project. Then select count from the Unit 0 folder by opening it. Then you will find count.prj in that folder. If you open it you will then have loaded the count example. It will ask you if you want to compile the project. Click yes. The example encoded there is set to achieve the goal of counting from 2 to 5.

Running the Count Example

Go to the control panel and click run. You should see the following display in your Listener window:

 Cycle 0  Time  0.000: INCREMENT
2
Cycle 1 Time 1.050: INCREMENT
3
Cycle 2 Time 2.100: INCREMENT
4
Cycle 3 Time 3.150: STOP
5
Top goal popped.
This display is called the cycle trace. The particular trace you see here reflects the production rule increment printing each successive number followed by the production stop, which prints 5 and stops.

Working Memory for the Count Example

The initial chunks with which the count example begins are contained in the count initial Wmes window. There you will find the following chunks:

(a ISA count-order first 1 second 2)
(b ISA count-order first 2 second 3)
(c ISA count-order first 3 second 4)
(d ISA count-order first 4 second 5)
(e ISA count-order first 5 second 6)
(first-goal ISA count-from start 2 end 5)
Each list is one chunk. The first five define five counting facts, c1- c5. They are all of the type count-order. Each counting fact connects the number lower in the counting order (in slot first) to the number next in the counting order (in slot second). This is the knowledge that enables the system to count.

The last chunk, first-goal, is of the type count-from and it encodes the goal of counting from 2 (In slot start) to 5 (in slot end). It is declared to be the goal by the command (wmfocus first-goal) in the count Misc window.

The Increment Production

The productions for the count example are contained in the count productions window. There you will find two productions the first of which is increment:
(P increment
=goal>
ISA count-from
start =num1
=count>
ISA count-order
first =num1
second =num2
==>
!output! ("~S" =num1)
=goal>
start =num2)
English Translation
If the goal is
to count from
the number =num1
and there is
a count fact stating
that =num1 is followed
by =num2
Then
output the number =num1
and changing the goal to
continue counting from =num2
Note the use of the !output! statement to get the number printed out.

The Stop Production

The other production in the count productions window is stop:
(P stop
=goal>
ISA count-from
start =num
end =num
==>
!output! ("~S" =num)
!pop!)
English Translation
If the goal is
to count from
the number =num
to the number =num
Then
output the number =num
and pop the current goal
This production will only apply when the start count equals the end count. At this point in time the other production, increment would also apply and would carry counting on past the end point. The production system is set to prefer the stop production when both would apply. We will discuss how this preference is achieved in the third unit on conflict resolution.

Pattern Matching Exercise

You need to understand how ACT-R goes about matching a production rule. We will work through an exercise in how this is done. You need to do the following:

Step 1

1. Click the Reset button in the Control Panel to go through the example again.

2. Click on the Instantiations button in the Control Panel to bring up the Instantiations window. This window will allow you to match the production to working memory by hand. Click on the Tutor Mode button in this window to enable this functionality of the Instantiations window.

3. Click on the Goal Stack button in the Control Panel to bring up the Goal Stack Viewer that will display the current state of the goal. You should see the goal set to count from 2 to 5. It helps to move this window so it does not overlap with other windows.

4.Click on the declarative memory button in the Control Panel to bring up the Declarative Memory Viewer window. This will allow you to inspect chunks. Again place this so it does not overlap with other windows. Try clicking on various chunk names in that window to see their contents.

Now you are ready to the next step.

Step 2

Hit the Run button in the Control Panel menu to start the assignment. The first production to apply, Increment will appear in the Instantion Viewer. Its structure will be displayed in the right-hand side. Expand the window and place so that the whole production is readable and place it so it does not overlap other windows. Your task is to go through the production rule replacing all variables by the values they bind to. These variables are the terms preceded by the "=". Here are the rules for doing this:

1. The first chunk will always bind to the goal chunk at the top of the goal stack. This can be found in the Goal Stack Viewer.

2. Later chunks in the condition can be found in the Declarative Memory Viewer.

3. If a variable has been bound to a value, it must be assigned the same value throughout the matching. The bound values are displayed at the top of the Instantiations Viewer.

4. At any point in time you can ask the tutor for help in binding a variable by hitting the help key on the keyboard.

5. Once you have completely replaced all of the variables, go to the next step.

Step 3

Once the production is instantiated you can fire it by hitting the Resume button. Then, at the risk of too much repetition, you will need to instantiate two more instances of the production Increment. Then when the start and end slots of the goal both are equal, the Instantiation Viewer window will bring up an option between two productions, Stop and Increment. You should choose Stop and instantiate it to complete the exercise.

When you have completed this example and explored it as much as you want, choose Close Project in the Projects menu and then go onto the next section of this unit which will describe the next project.

Section 3: The Addition Example

The second example uses the same data base of count facts to do a somewhat more complicated task. It will do addition by repeated addition. Thus, given the goal to add 2 to five it will count 5, 6, 7, and return the answer 7. You should load the additiion project from the Unit 0 folder in the same way as you loaded the count project.

You will find the same count facts as initial working memory chunks. The goal now encodes the starting number (arg1) and the number to be added (arg2):
(second-goal ISA add arg1 5 arg2 2)

Cycle 0 Time 0.000: INITIALIZE-ADDITION
Cycle 1 Time 0.050: COUNT-ONE
Cycle 2 Time 0.100: COUNT-ONE
Cycle 3 Time 0.150: TERMINATE
7
In this sequence the production Initialize-addition fires once to set up the counting algorithm, Count-one fires twice to do the counting, and Terminate recognizes the completion of the problem and prints out the answer.

The Initialize-Addition Production

The first production to fire is Initialize-Addition:
(P initialize-addition
=goal>
ISA add
arg1 =num1
arg2 =num2
sum nil
==>
=goal>
sum =num1
count 0)
English Translation
If the goal is
to add the arguments
=num1 and
=num2
but the sum has not been initialized
Then
change the goal
by initializing the sum to =num1
and initializing the count to 0

Note that the add goal type has two additional slots, sum and count, to hold the sum and the count as the repeated addition algorithm is executed.

The Count-One Production

(P count-one
=goal>
ISA add
sum =sum
count =count
=c1>
ISA count-order
first =sum
second =newsum
=c2>
ISA count-order
first =count
second =newcount
==>
=goal>
sum =newsum
count =newcount
)
English Translation
If the goal is
to add the arguments
and the current sum is =sum
and the current count is =count
and there is
a counting order fact in which
=sum is followed by
=newsum
and there is
a counting order fact in which
=count is followed by
=newcount
Then
change the goal
resetting the sum to =newsum
and resetting the count to =newcount

The Terminate Production

(P terminate
=goal>
ISA add
count =num
arg2 =num
sum =answer
==>
!output! ("~S" =answer)
!pop!)
English Translation
If the goal is
to add the arguments
and the count is equal to
the second arguement
and the sum is =answer
Then
output the sum =answer
and pop the current goal

Note in these productions that if there is a variable in a slot name it will not match to nil. Thus, specifying a variable is specifying that the slot value cannot be nil. For instance, in the terminate production there must be an answer in the sum slot.

The Addition Exercise

Now we would like you to work with this example. In particular, as you did with the count example, we would like you to set up the Instantiation window to allow you to step through the matching of the four productions for this example. You will have to reset the tutor flag in that window. When you are finished with this example, close it so that you can go onto the next example.

Section 4: The Semantic Example

The last example, which can be loaded from the project Semantic, encodes the following network of categories and properties. It is capable of searching this network to make decisions about whether one category is a member of another category.


Encoding of the Semantic Network

Each of the links in this network is encoded in by chunks of type property with the slots object, attribute, and value. For instance, the following three chunks encode the links involving shark:
(p1 ISA property object shark attribute dangerous value true)
(p2 ISA property object shark attribute locomotion value swimming)
(p3 ISA property object shark attribute category value fish)
p1 encodes that a shark is dangerous by encoding a true value on the dangerous attribute. p2 encodes that a shark can swim by encoding the value swimming on the locomotion attribute. p3 encodes that a shark is a fish by encoding fish as the value on the category attribute.

You should inspect the chunks in the sematic Initial Wmes window to see how the rest of the semantic network is encoded.

Queries about Category Membership

Queries about category membership are encoded by goals of the is-member type. There are 6 goals encoded in working memory. The one initially encoded as the goal is g2:
(g2 ISA is-member object1 canary object2 bird)
which represents the query whether a canary is a bird. If you run the system on goal 2 you will see the following trace:
 Cycle 0  Time  0.000: DIRECT-VERIFY
 Yes
This is about the simplest case possible and involves retrieval of the property
(p14 ISA property object canary attribute category value bird)
And verification of the query. The next subsection presents the production Direct-Retrieval which is involved.

The Direct-Retrieval Production

(P direct-verify
=goal>
ISA is-member
object =obj
category =cat
=property>
ISA property
object =obj
attribute category
value =cat
==>
!output! ("Yes")
!pop!)
English Translation
If the goal is
to judge the membership
of =obj
in the category =cat
and there is a chunk
encoding the property that
an object =obj
has an attribute category
with a value =cat
Then
output the answer Yes
and pop the goal

Chaining Through Category Links

A slightly more complex case occurs when the category is not an immediate superordinate of the queried object and it is necessary to chain through an intermediate category. An example of this is given in the following goal.
(g3 ISA is-member object canary category animal)
If one goes to the semantic Misc window and edits the wmfocus to be g3, resets the model and then runs the system, one will get the following trace:
 Cycle 0  Time  0.000: GET-CATEGORY 
 Cycle 1  Time  0.493: DIRECT-VERIFY
 Yes
This involves an extra production, Get-Category, which retrieves the category in the case that an attribute has been retrieved which does not allow a decision to be made. The next subsection looks at that production.

The Get-Category Production

(P get-category
=goal>
ISA is-member
object =obj1
=property>
ISA property
object =obj1
attribute category
value =obj2
==>
=goal>
object =obj2)
English Translation
If the goal is
to judge the membership
of =obj1
and there is a chunk
encoding the property that
an object =obj1
has an attribute category
with a value =obj2
Then
change the goal
to judge the category membership of =obj2

The Quit Production

If you change the goal to g1:
(g1 ISA is-member object canary category ostrich)
If you run on this goal, you will see what happens when the chain reaches a dead end:
 Cycle 0  Time  0.000: GET-CATEGORY 
 Cycle 1  Time  0.493: GET-CATEGORY
 Cycle 2  Time  0.913: QUIT
 No
The production Quit applies which fires when nothing else is applicable:
(P quit
=goal>
ISA is-member
==>
!output! ("No")
!pop!)
English Translation
If the goal is
to judge membership
Then
output the answer No
and pop the goal

Skipping Exhaustive Search

If the system can retrieve contradictory properties it will be able to avoid exhaustive search as in the previous subsection. This can be illustrated if you switch the goal to g4:
(g4 ISA is-member object canary category fish)
If you run on this goal, you will get the following trace.
 Cycle 0  Time  0.000: GET-CATEGORY
 Cycle 1  Time  0.493: MISMATCH
 No
The production Get-Category retrieves the category, bird, of canary and then the production Mismatch detects the mismatch between the locomation attributes of bird and canary. The next subsection examines the production MisMatch.

The Mismatch Production

(P mismatch
=goal>
ISA is-member
object =obj
category =cat
=property1>
ISA property
object =obj
attribute =att
value =val
- attribute category
=property2>
ISA property
object =cat
attribute =att
- value =val
==>
!output! ("No")
!pop!)
English Translation
If the goal is
to judge the membership
of =obj
in the category =cat
and there is a chunk
encoding the property that
an object =obj
has an attribute =att
with a value =val
which is not a category attribute
and there is a chunk
encoding the property that
an object =cat
has an attribute =att
with a value that is not =val
Then
output the answer No
and pop the goal

Note the use of the negation sign (-) to negate values in particular slots.

The Semantic Memory Exercise

Now we would like you to work through the pattern matching of the goals, g1 -g4, just as you worked the pattern matching for the previous examples.

Unit 3: Parameters and Conflict Resolution

Conflict Resolution

One of the critical issues in writing a production system is conflict resolution. There are two dimensions to this issue. One is how one chooses which production to fire if there are multiple production rules that match. The other is what one does when there are multiple instantiations of the same production rule to fire. This section will consider the first question. With respect to the second question the answer is that one selects the most active instantiation and so we will be addressing this in the next two sections on activation.
To deal with the first problem, each production has associated with it an expected gain which reflects how much the production will contribute to achieving the system's goals. This is calculated from three quantities:

P: Probability the production will achieve the goal
G: Value of the goal
C. Expected cost of achieving that goal

The value of a production is defined as PG - C.

Calculation of PG - C

The value of a goal is set in ACT-R as the value of the parameter G which can be set in the Global Parameters window which can be accessed from the ACT-R Tools menu. G has the default value of 20. We will not be giving much consideration to its role in conflict resolution in this section. Most of the efforts at conflict resolution involve determining the value of P and C. P is conceived of as the probability of achieving the goal and is calculated as

P = qr

where q is the probability that the production in question succeeds and r is the probability that the productions after it will succeed in achieving the goal.

C is calculated as the cost of the goal and is calculated as

C = a + b

where a is cost of the production and b is the estimated cost to the goal after the production.

Setting of q and r

This subsection describes some rules of thumb for setting of q and r.

Parameter q: This is supposed to reflect the probability that the production will achieve its intended effect. This defaults to 1 which is the sensible value for most productions. In some cases it can reflect some external contingency (such as whether the light switch which the production flipped really succeeds in turning the light on) in which case it is a probability less than 1. Right now the way q is implemented, if it is set to less than 1 the production becomes probabilistic and only has its effect with that probability. This can lead to bizarre behavior and it is not recommended that q be changed from its default value.

Parameter r: This reflects the probability that the goal will eventually be achieved if that production is fired. More simply it can be interpreted as the probability of everything going correctly. This parameter defaults to 1 but can often be set to meaningful non-one values as we will illustrate in the example to come. All other things being equal, the production with the greater value of r will be preferred in the conflict resolution process.

Note that each production can have its own q and r which can be different from the default values.

Setting of a and b

This subsection describes some rules of thumb for setting of a and b. They are cost values. In ACT-R cost is best thought of in terms of time (typically measured in seconds):

Parameter a: This is supposed to reflect the non-matching (right-hand side) costs of the productions. Like the parameter q this is a "self-fulfilling" parameter in that the value of a will be added to the matching cost to give the total time for the production. It defaults to 0.05 second but it can be sensibly set to values that reflect the costs of various actions like typing a key or moving a mouse.

Parameter b: This reflects the future costs of a particular production on the way to achieving a goal. It currently defaults to 1 second. Again it can be profitably set to larger or smaller values to reflect the semantics of that particular production.

Again each production can have its own different a and b which are different from the default values.

The Simplify Example

You should go into your ACT-R environment and load the project simplify which contains a number of productions relevant to your assignment and which illustrate some features of conflict resolution. One of the things these productions do is simplify fractions. For instance, you can ask it to simplify -24/36 and it will produce -2/3. To invoke this system you can issue the following LISP call:

? (do-fraction 'minus 'twenty-four 'thirty-six)

and it will eventually print-out

MINUS TWO/THREE

The system models a rather "free-form" solution to the problem in which it just tries whatever factors of the numerator (e.g., 6x4=24) come to mind until no more come to mind. While one could have systematic search of factors this is not what is done. This reflects the way probably most people approach the problem of simplifying fractions. Conflict resolution arises in this example in two ways. First, it must keep track of what factors it has tried so that it does not get into an infinite loop of trying factors. Second, it must decide when to stop trying factors and accept the current reduced form.

Running and Tracing the Simplify Example

Go to the ACT-R Tools menu and select the Global Parameters option. Within it turn on Conflict Set Trace and Enable Rational Analysis by clicking on those two boxes. When you do this and run the example you get a trace like:

? 1 instantiations out of 1 considered; expected gain of best is: 18.950
Cycle 0 Time 0.000: START-SIMPLIFICATION>

2 instantiations out of 5 considered; expected gain of best is: 17.900
Cycle 1 Time 1.050: PROPOSE-FACTOR

2 instantiations out of 2 considered; expected gain of best is: 17.900
Cycle 2 Time 1.359: SUCCESSFUL-FACTOR

2 instantiations out of 4 considered; expected gain of best is: 17.900
Cycle 3 Time 1.703: PROPOSE-FACTOR

1 instantiations out of 1 considered; expected gain of best is: 8.425
Cycle 4 Time 2.037: FAILED-FACTOR

For current purposes we will consider the expected gain values.

The Productions for Simplification:

The Production Start-Simplification

The next 5 subsections will go through the five basic productions in this example. The production start-simplification is shown to the right. It basically retrieves the structure of the fraction and creates a new goal of simplification which focuses on the numerator and denominator. Note that =goal and =newgoal both share a new variable =a. This is the mechanism for passing results between goals. The value that appears in the answer slot of =newgoal will be passed to the finish slot of =goal.

This production has the default values of q=r=1 and a= .05 and b=1. This means that P=q*r=1 and C = a +b =1.05. Since G is 20 the value of PG - C is 18.95 which is what is printed out in the trace on the preceding page:

expected gain of best is: 18.950

(p start-simplification>
=goal>
isa simplify-fraction
start =fraction
finish nil
=fraction>
isa fraction
numerator =n
denominator =d
sign =s
==>
=newgoal>
isa simplify
numerator =n
denominator =d
sign =s
answer =a
=goal>
finish =a
!push! =newgoal)

The Production PROPOSE-FACTOR

The production propose-factor is shown to the right. It basically retrieves some times-fact which equals the numerator. There are two constraints on the times-fact it retrieves. First, it must not involve one as this would not lead to any simplification of the fraction. Second, it must not be a times fact already retrieved for this goal. This avoids repetition. The times-fact type has been extended to include a context slot for this purpose. The most active times-fact that fits these constraints will be retrieved.

This production is serving a subgoal and so does not have the full 20 points. Instead, this subgoal has the value, 18.95, of the previous production that created it. The expected gain calculations are as before: q=r=1, a= .05 and b=1, P=q*r=1, and C = a +b =1.05. This leads to a PG - C value of...

expected gain of best is: 17.900

(p propose-factor
=goal>
isa simplify
numerator =n
try nil
=fact>
isa times-fact
- context =goal
arg1 =x
- arg1 one
arg2 =y
product =n
==>
=fact>
context =goal
=goal>
try =x
temp =y)

The Production SUCCESSFUL-FACTOR

The production successful-factor is shown to the right. It basically retrieves some times-fact which involves =x which is the factor being tried for the numerator. If a times-fact involving =x can be found which equals the denominator, the production rewrites the numerator and denominator with the reduced values.

This production is serving the same subgoal as the previous propose-factor and so the value of G is 18.95. The parameters of successful-factor are again the default: q=r=1 and a=.05 and b=1. This means that P=q*r=1 and C = a +b =1.05. This leads to a PG-C value of

expected gain of best is: 17.900

(p successful-factor
=goal>
isa simplify
denominator =d
try =x
- try nil
temp =y
=fact>
isa times-fact
arg1 =x
arg2 =z
product =d
==>
=goal>
try nil
numerator =y
denominator =z)

The Production FAILED-FACTOR

The production failed-factor is shown to the right. It has basically the same condition as successful-factor except that it does not retrieve the times fact. Thus, it will match whenever successful-factor matches. However, it has non-default parameters specified in the parameters statement below it. It is given an r value of just .5. This reflects the intuition that only roughly half of the time when it would have fired it would lead to the right behavior.

This production is serving the same subgoal as the previous ones with a value of G of 18.95. Except for r the parameters for this production are still the default one: q=1 and a=.05 and b=1. This means that P=q*r=.5 and C = a +b =1.05. This leads to a PG -C value of .5*18.95 - 1.05:

expected gain of best is: 8.425

(p failed-factor
=goal>
isa simplify
denominator =d
try =x
- try nil
==>
=goal>
try nil
)

(parameters failed-factor
:r .5)

The Production NO-MORE-FACTORS

The production no-more-factors is shown to the right. It has basically the same condition as propose-factor except that it does not retrieve the times fact. Thus, it will match whenever propose-factor matches. However, it has non-default parameters specified in the parameters statement below. It is given an r value of just .25. This reflects the intuition that only roughly one-quarter of the time when it would have fired it would lead to the right behavior.

This production is serving the same subgoal as the previous ones with a value for G of 18.95. Except for r the parameters for this production are still the default ones: q=1 and a= .05 and b=1. This means that P=q*r=.25 and C = a +b =1.05. This leads to a PG-C value of .25*18.95 - 1.05:

expected gain of best is: 3.688

(p no-more-factors
=goal>
isa simplify
try nil
sign =s
numerator =n
denominator =d
==>
=newfraction>
isa fraction
numerator =n
denominator =d
sign =s
=goal>
answer =newfraction
!pop!)

(parameters no-more-factors
:r .25)

Parameter Menus

There are two parameter sets which are available under the ACT-R Tools menu. One is the Global Parameters which control the overall functioning of the system. So far you have had the opportunity to turn on one of the tracing facilities (Conflict Set Trace) and the Enable Rational Analysis flag. As the course progresses we will discuss others of the global parameters in that window. Note that any parameters you set here will be lost unless you click the save button in which case they become the operative parameters. Some of the other parameters are set as numerical values which you type into the appropriate boxes.

The other parameter set is the Production Parameters which allows you to explore various parameters associated with productions -- in particular for current purposes -- q, r, a, and b. You should explore that menu. If you select an item production it will report its current parameters. If you first select modify and then the production it will allow you to change the parameters.

Subgoaling Arithmetic

The other productions in the simplify project deal with the fact that all of the addition and multiplication facts one needs will not be in a memorized table. What does one do when one needs an arithmetic fact which is not memorized? In the current world one goes to a calculator. Therefore, the productions respond to the setting of goals of addition, subtraction, multiplication, and division. If the fact is stored it can be retrieved. If not a simulated calculator facility will be called up. This again creates a need for conflict resolution as it is necessary to choose between retrieval and computation by a calculator.

The structure of the productions is basically the same whether the goal is addition, subtraction, multiplication, or division. We will just consider the production rules for addition.

Example Trace of Arithmetic

There is a LISP function, do-operation to help with running this. The following is an example trace:

? (do-operation 'add 'fourteen 'sixteen)
? 1 instantiations out of 1 considered; expected gain of best is: 18.950
Cycle 10 Time 3.654: START-MATH-ADD

1 instantiations out of 1 considered; expected gain of best is: 8.900
Cycle 11 Time 3.704: ADD-CALCULATOR

2 instantiations out of 2 considered; expected gain of best is: 7.850
Cycle 12 Time 4.085: DIGIT-KNOWN

1 instantiations out of 1 considered; expected gain of best is: 18.950
Cycle 13 Time 5.135: PUT-OUT-ANSWER
The answer is THIRTY which has value 30.

The Productions for Arithmetic:

The Production START-MATH-ADD

The next subsections will go through the six basic productions involved in the arithmetic module that is subgoaled. The production start-math-add is shown to the right. It basically recognizes that we need to set an add subgoal.

This production has the default values of q=r=1 and a= .05 and b=1. This means that P=q*r=1 and C = a +b =1.05. Since G is 20 the value of PG - C is 18.95 which is what is printed out in the trace on the preceeding page:

expected gain of best is: 18.950

(p start-math-add
=goal>
isa do-integer-math
op add
arg1 =a
arg2 =b
result nil
==>
=newgoal>
isa add
arg1 =a
arg2 =b
result =c
=goal>
result =c
!push! =newgoal)

The Productions for Adding

The two productions, add and add-calculator, are basically in competition. Add retrieves an addition fact while add-calcualtor calls upon LISP with the command (!eval! (+ =v1 =v2)) to calculate the sum.

To reflect the expected greater cost of using a calculator the time cost of add-calulator is set at 10. Thus, it will only be chosen in conflict resolution if no sum is stored. Note that it creates its own subgoal to get a digit. This subgoal will determine whether the system already knows a digit with this value or whether it has to create a new one. The next subsection gives the two productions which make this decision.
(p add
=goal>
isa add
arg1 =n1
arg2 =n2
=fact>
isa plus-fact
arg1 =n1
arg2 =n2
sum =s
==>
=goal>
result =s
!pop!)
(p add-calculator
=goal>
isa add
arg1 =n1
arg2 =n2
=n1>
isa number-natural
value =v1
=n2>
isa number-natural
value =v2
==>
=newgoal>
isa get-digit
value (!eval! (+ =v1 =v2))
result =p
=goal>
result =p
!push! =newgoal)

(parameters add-calculator
:b 10)

The Productions for Identifying the Digit

The two productions, new-digit and digit-known, are basically in competition. Digit-known retrieves the fact that there is a number-natural with this value and uses that while new-digit creates a new number-natural with this value. To give digit-known the preference in the conflict resolution, new-digit has an value of only .5. This reflects the belief that about half of the time when a calculator value is obtained it will be a digit without an internal representation and so require a new one.

Note that both of these productions have two pops to go back to the top level. The next subsection will show the production that applies once control has returned to the top goal.

(p new-digit
=goal>
isa get-digit
value =v
==>
=n>
isa number-natural
value =v
=goal>
result =n
!pop! !pop!)
(parameters new-digit :r .5)

(p digit-known
=goal>
isa get-digit
value =v
=n>
isa number-natural
value =v
==>
=goal>
result =n
!pop! !pop!)

The Production PUT-OUT-ANSWER

This is the final production which prints out the answer and pops the goal. It prints out the chunk name (either an existing chunk or a made up chunk) and the numerical value stored with that chunk.
(p put-out-answer
=goal>
isa do-integer-math
- result nil
result =n
=n>
isa number-natural
value =v
==>
!output! ("The answer is ~S which has value ~S." =n =v)
!pop!)

Exercise: 8 puzzle

Your assignment is to create a production system to solve the 8-puzzle. If you don't know the puzzle by this particular name, read the subsection eight puzzle game to get information on the puzzle. In your folder you have some initial wmetypes and productions to help you do the mechanics of the 8 puzzle (but not to choose the right moves).
Please do this assignment within the general ACT-R Environment.

Eight puzzle game

Project 8-puzzle

There is a project called 8-puzzle in the Unit 3 folder which contains some maintenance productions for doing this task. There are the productions

1. Stop which recognizes when the goal is achieved.

2. Move which calls for another move when there is a tile out of position. It also sets a goal to print out the current state. It calls for a move by setting the state value of the eight-tile goal to move.

3. Show which will print out the current state.

Write a set of production rules for choosing moves. It is generally preferable to try to move tiles towards their goal positions and generally preferable to move tiles out of the center position. However, sometimes there are no moves which achieve either of these agenda and which do not just take a move back. To solve this task you must write a number of different rules for moving up, down, left, and right and parameterize these rules so that you can choose among them.

There are different ways of solving this problem and you are free to chose your own. One way of solving it is to have three classes of rules for moving up, down, left, right:
..1. Most Preferred: Moves that take a tile closer to its destination
..2. Middle Preferred: Moves that take a tile from in the center (2,2) location to the
periphery
..3. Least preferred: Other legal moves
In all of these cases you probably want to be biased against back-up moves that return a tile to the location it had on the previous move.

In doing this task you will find it of help to do simple arithmetic and logical tests. This can be done in your productions by means of the !eval! command. This is illustrated in your move production which has the following line in its condition:

!eval! (or (not (= =row1 =row2)) (not (= =col1 =col2)))

which performs a test of whether the row of the selected tile is the same as the goal row and whether the column is the same. The following are some other examples of eval commands:
1. !eval! (= (+ 1 =row2) =row1)
-- tests whether 1 more than row2 equals row1

2. !eval! (> =row3 =row2) 
-- tests whether row3 is larger than row2.

3. =tile>
     c-row (!eval! (+ 1 =row2)) 
-- an action side statement that increments row2 and places that in the c-row slot.

The current example assumes a representation that involves the following wmetypes:

1. (WMEType tile c-row c-col g-row g-col value)
Each tile is represented in terms of its current location (c-row and c-col) and its goal position (g-row and g-col). The slot value holds the digit representation of that tile.

2. (WMEType eight-tile state last row col empty)
The goal is represented in terms of its state (check to see if goal reached or move), the last move made (up,down, left, right), and the row and col of the empty cell.

3. (WMEType show)
A goal to request a print out of the current state.

This example requires you to update the state of the system everytime you make a move by changing the information about tile location.

Each of your rules needs to move the current location of the tile and of the blank space. The next subsection will bring you to a trace of a run of the system on this problem -- your solution need not reproduce this run (which is not the shortest solution). It only need solve this problem and other solvable 8 puzzle problems.

If you find your solution getting stuck in a rut you might want to add some variability to its choices by adding about 1 unit of noise to the expected gain noise in your Global Parameters box. This will add some noise to the evaluations and occasionally allow a less valued production to beat out a more valued production. Just how much noise you need to add will be determined by the exact parameters you associate with the productions to facillitate conflict resolution.

If you tire of the amount of trace information you might want to turn on Cycle Trace.

Remember you need to turn on Enable Rational Analysis for the conflict resolution to work

8 Puzzle Trace

 Cycle 0  Time  0.000: MOVE
 Matching latency:  0.094
 Action latency:  0.050

    Cycle 1  Time  0.144: SHOW
    Matching latency: 11.624
    
 2 1 6
 4 - 8
 7 5 3

    Action latency:  0.050

 Cycle 2  Time 11.818: MOVE-LEFT-1
 Matching latency:  1.237
 Action latency:  0.050

 Cycle 3  Time 13.105: MOVE
 Matching latency:  0.565
 Action latency:  0.050

    Cycle 4  Time 13.721: SHOW
    Matching latency: 13.922
    
 2 1 6
 4 8 -
 7 5 3

    Action latency:  0.050

 Cycle 5  Time 27.693: MOVE-DOWN-1
 Matching latency:  1.374
 Action latency:  0.050

 Cycle 6  Time 29.117: MOVE
 Matching latency:  0.391
 Action latency:  0.050

    Cycle 7  Time 29.559: SHOW
    Matching latency: 13.912
    
 2 1 -
 4 8 6
 7 5 3

    Action latency:  0.050

 Cycle 8  Time 43.520: MOVE-RIGHT-3
 Matching latency:  1.214
 Action latency:  0.050

 Cycle 9  Time 44.785: MOVE
 Matching latency:  0.245
 Action latency:  0.050

    Cycle 10  Time 45.080: SHOW
    Matching latency:  7.740
    
 2 - 1
 4 8 6
 7 5 3

    Action latency:  0.050

 Cycle 11  Time 52.870: MOVE-RIGHT-1
 Matching latency:  0.564
 Action latency:  0.050

 Cycle 12  Time 53.484: MOVE
 Matching latency:  0.125
 Action latency:  0.050

    Cycle 13  Time 53.659: SHOW
    Matching latency: 10.893
    
 - 2 1
 4 8 6
 7 5 3

    Action latency:  0.050

 Cycle 14  Time 64.602: MOVE-UP-3
 Matching latency:  2.503
 Action latency:  0.050

 Cycle 15  Time 67.156: MOVE
 Matching latency:  1.019
 Action latency:  0.050

    Cycle 16  Time 68.224: SHOW
    Matching latency: 25.099
    
 4 2 1
 - 8 6
 7 5 3

    Action latency:  0.050

 Cycle 17  Time 93.373: MOVE-LEFT-1
 Matching latency:  1.987
 Action latency:  0.050

 Cycle 18  Time 95.410: MOVE
 Matching latency:  0.189
 Action latency:  0.050

    Cycle 19  Time 95.649: SHOW
    Matching latency: 16.357
    
 4 2 1
 8 - 6
 7 5 3

    Action latency:  0.050

 Cycle 20  Time 112.056: MOVE-LEFT-1
 Matching latency:  2.833
 Action latency:  0.050

 Cycle 21  Time 114.939: MOVE
 Matching latency:  0.558
 Action latency:  0.050

    Cycle 22  Time 115.547: SHOW
    Matching latency: 10.814
    
 4 2 1
 8 6 -
 7 5 3

    Action latency:  0.050

 Cycle 23  Time 126.412: MOVE-UP-1
 Matching latency:  0.843
 Action latency:  0.050

 Cycle 24  Time 127.305: MOVE
 Matching latency:  0.786
 Action latency:  0.050

    Cycle 25  Time 128.141: SHOW
    Matching latency: 38.531
    
 4 2 1
 8 6 3
 7 5 -

    Action latency:  0.050

 Cycle 26  Time 166.722: MOVE-RIGHT-1
 Matching latency:  2.241
 Action latency:  0.050

 Cycle 27  Time 169.012: MOVE
 Matching latency:  0.134
 Action latency:  0.050

    Cycle 28  Time 169.197: SHOW
    Matching latency:  8.660
    
 4 2 1
 8 6 3
 7 - 5

    Action latency:  0.050

 Cycle 29  Time 177.907: MOVE-DOWN-1
 Matching latency:  1.412
 Action latency:  0.050

 Cycle 30  Time 179.369: MOVE
 Matching latency:  0.607
 Action latency:  0.050

    Cycle 31  Time 180.026: SHOW
    Matching latency: 16.687
    
 4 2 1
 8 - 3
 7 6 5

    Action latency:  0.050

 Cycle 32  Time 196.763: MOVE-RIGHT-3
 Matching latency:  2.496
 Action latency:  0.050

 Cycle 33  Time 199.309: MOVE
 Matching latency:  1.500
 Action latency:  0.050

    Cycle 34  Time 200.859: SHOW
    Matching latency: 10.434
    
 4 2 1
 - 8 3
 7 6 5

    Action latency:  0.050

 Cycle 35  Time 211.343: MOVE-DOWN-1
 Matching latency:  1.657
 Action latency:  0.050

 Cycle 36  Time 213.051: MOVE
 Matching latency:  0.818
 Action latency:  0.050

    Cycle 37  Time 213.918: SHOW
    Matching latency: 13.449
    
 - 2 1
 4 8 3
 7 6 5

    Action latency:  0.050

 Cycle 38  Time 227.417: MOVE-LEFT-3
 Matching latency:  1.118
 Action latency:  0.050

 Cycle 39  Time 228.585: MOVE
 Matching latency:  0.233
 Action latency:  0.050

    Cycle 40  Time 228.869: SHOW
    Matching latency: 16.420
    
 2 - 1
 4 8 3
 7 6 5

    Action latency:  0.050

 Cycle 41  Time 245.339: MOVE-LEFT-1
 Matching latency:  2.090
 Action latency:  0.050

 Cycle 42  Time 247.479: MOVE
 Matching latency:  1.594
 Action latency:  0.050

    Cycle 43  Time 249.123: SHOW
    Matching latency: 23.244
    
 2 1 -
 4 8 3
 7 6 5

    Action latency:  0.050

 Cycle 44  Time 272.417: MOVE-UP-1
 Matching latency:  0.648
 Action latency:  0.050

 Cycle 45  Time 273.115: MOVE
 Matching latency:  0.457
 Action latency:  0.050

    Cycle 46  Time 273.622: SHOW
    Matching latency:  7.385
    
 2 1 3
 4 8 -
 7 6 5

    Action latency:  0.050

 Cycle 47  Time 281.057: MOVE-RIGHT-2
 Matching latency:  2.851
 Action latency:  0.050

 Cycle 48  Time 283.959: MOVE
 Matching latency:  0.334
 Action latency:  0.050

    Cycle 49  Time 284.343: SHOW
    Matching latency: 11.993
    
 2 1 3
 4 - 8
 7 6 5

    Action latency:  0.050

 Cycle 50  Time 296.386: MOVE-RIGHT-1
 Matching latency:  2.505
 Action latency:  0.050

 Cycle 51  Time 298.942: MOVE
 Matching latency:  0.853
 Action latency:  0.050

    Cycle 52  Time 299.845: SHOW
    Matching latency:  9.948
    
 2 1 3
 - 4 8
 7 6 5

    Action latency:  0.050

 Cycle 53  Time 309.843: MOVE-DOWN-3
 Matching latency:  2.070
 Action latency:  0.050

 Cycle 54  Time 311.963: MOVE
 Matching latency:  0.427
 Action latency:  0.050

    Cycle 55  Time 312.439: SHOW
    Matching latency:  9.500
    
 - 1 3
 2 4 8
 7 6 5

    Action latency:  0.050

 Cycle 56  Time 321.989: MOVE-LEFT-1
 Matching latency:  2.459
 Action latency:  0.050

 Cycle 57  Time 324.498: MOVE
 Matching latency:  0.240
 Action latency:  0.050

    Cycle 58  Time 324.788: SHOW
    Matching latency: 14.521
    
 1 - 3
 2 4 8
 7 6 5

    Action latency:  0.050

 Cycle 59  Time 339.359: MOVE-UP-2
 Matching latency: 16.372
 Action latency:  0.050

 Cycle 60  Time 355.781: MOVE
 Matching latency:  0.073
 Action latency:  0.050

    Cycle 61  Time 355.904: SHOW
    Matching latency: 44.935
    
 1 4 3
 2 - 8
 7 6 5

    Action latency:  0.050

 Cycle 62  Time 400.889: MOVE-RIGHT-1
 Matching latency:  3.455
 Action latency:  0.050

 Cycle 63  Time 404.394: MOVE
 Matching latency:  0.342
 Action latency:  0.050

    Cycle 64  Time 404.787: SHOW
    Matching latency: 10.471
    
 1 4 3
 - 2 8
 7 6 5

    Action latency:  0.050

 Cycle 65  Time 415.307: MOVE-DOWN-3
 Matching latency:  1.896
 Action latency:  0.050

 Cycle 66  Time 417.253: MOVE
 Matching latency:  0.469
 Action latency:  0.050

    Cycle 67  Time 417.772: SHOW
    Matching latency:  5.406
    
 - 4 3
 1 2 8
 7 6 5

    Action latency:  0.050

 Cycle 68  Time 423.228: MOVE-LEFT-3
 Matching latency:  2.975
 Action latency:  0.050

 Cycle 69  Time 426.253: MOVE
 Matching latency:  0.087
 Action latency:  0.050

    Cycle 70  Time 426.390: SHOW
    Matching latency:  9.517
    
 4 - 3
 1 2 8
 7 6 5

    Action latency:  0.050

 Cycle 71  Time 435.957: MOVE-UP-1
 Matching latency:  3.579
 Action latency:  0.050

 Cycle 72  Time 439.586: MOVE
 Matching latency:  0.581
 Action latency:  0.050

    Cycle 73  Time 440.217: SHOW
    Matching latency: 24.406
    
 4 2 3
 1 - 8
 7 6 5

    Action latency:  0.050

 Cycle 74  Time 464.673: MOVE-LEFT-1
 Matching latency:  2.431
 Action latency:  0.050

 Cycle 75  Time 467.154: MOVE
 Matching latency:  0.455
 Action latency:  0.050

    Cycle 76  Time 467.660: SHOW
    Matching latency: 30.686
    
 4 2 3
 1 8 -
 7 6 5

    Action latency:  0.050

 Cycle 77  Time 498.396: MOVE-DOWN-3
 Matching latency:  2.465
 Action latency:  0.050

 Cycle 78  Time 500.910: MOVE
 Matching latency:  0.473
 Action latency:  0.050

    Cycle 79  Time 501.433: SHOW
    Matching latency: 17.019
    
 4 2 -
 1 8 3
 7 6 5

    Action latency:  0.050

 Cycle 80  Time 518.502: MOVE-RIGHT-3
 Matching latency:  1.989
 Action latency:  0.050

 Cycle 81  Time 520.541: MOVE
 Matching latency:  0.370
 Action latency:  0.050

    Cycle 82  Time 520.960: SHOW
    Matching latency: 17.983
    
 4 - 2
 1 8 3
 7 6 5

    Action latency:  0.050

 Cycle 83  Time 538.993: MOVE-RIGHT-1
 Matching latency:  1.609
 Action latency:  0.050

 Cycle 84  Time 540.652: MOVE
 Matching latency:  0.697
 Action latency:  0.050

    Cycle 85  Time 541.400: SHOW
    Matching latency: 11.995
    
 - 4 2
 1 8 3
 7 6 5

    Action latency:  0.050

 Cycle 86  Time 553.445: MOVE-UP-1
 Matching latency:  8.697
 Action latency:  0.050

 Cycle 87  Time 562.192: MOVE
 Matching latency:  0.092
 Action latency:  0.050

    Cycle 88  Time 562.334: SHOW
    Matching latency: 13.410
    
 1 4 2
 - 8 3
 7 6 5

    Action latency:  0.050

 Cycle 89  Time 575.794: MOVE-LEFT-1
 Matching latency:  4.133
 Action latency:  0.050

 Cycle 90  Time 579.977: MOVE
 Matching latency:  0.495
 Action latency:  0.050

    Cycle 91  Time 580.522: SHOW
    Matching latency: 10.413
    
 1 4 2
 8 - 3
 7 6 5

    Action latency:  0.050

 Cycle 92  Time 590.985: MOVE-DOWN-1
 Matching latency:  4.377
 Action latency:  0.050

 Cycle 93  Time 595.412: MOVE
 Matching latency:  0.668
 Action latency:  0.050

    Cycle 94  Time 596.130: SHOW
    Matching latency: 17.119
    
 1 - 2
 8 4 3
 7 6 5

    Action latency:  0.050

 Cycle 95  Time 613.299: MOVE-LEFT-1
 Matching latency:  4.216
 Action latency:  0.050

 Cycle 96  Time 617.565: MOVE
 Matching latency:  0.321
 Action latency:  0.050

    Cycle 97  Time 617.936: SHOW
    Matching latency:  9.798
    
 1 2 -
 8 4 3
 7 6 5

    Action latency:  0.050

 Cycle 98  Time 627.784: MOVE-UP-1
 Matching latency:  1.388
 Action latency:  0.050

 Cycle 99  Time 629.222: MOVE
 Matching latency:  0.066
 Action latency:  0.050

    Cycle 100  Time 629.337: SHOW
    Matching latency: 17.255
    
 1 2 3
 8 4 -
 7 6 5

    Action latency:  0.050

 
 Cycle 101  Time 646.643: MOVE-RIGHT-1
 Matching latency:  2.044
 Action latency:  0.050


 Cycle 102  Time 648.737: STOP
 Matching latency:  0.000
 Action latency:  0.050


 Cycle 103  Time 648.787: SHOW
 Matching latency: 13.413
 
 1 2 3
 8 - 4
 7 6 5

 Action latency:  0.050

Top goal popped.

Unit 4: Activation and Latency

In this section we will discuss the issues involved in controlling activation and latency in the ACT-R theory. The central equation describing the activation of a chunk is
Ai = Bi + S(Wj* Sji)            Equation 3.1
where Ai is the activation of chunk i, Bi is the base level activation, and the summation is over the elements j which are the current sources of activation. In the current ACT-R we have defaulted for a scheme in which the slots of the goal are the sources of activation. The Wj are the weightings of these sources. A unit of source activation is divided up evenly among the non-nil elements in slots of the goal. The Sji are the strengths of association from sources j to i. The base level activations Bi default to zero.

Mapping Activation onto Latency

The time to match a chunk i to the condition of a production p is given by the following equation:
Tip = B*exp[-b(Ai + Sp)]       Equation 3.2
where B is a parameter giving the time scale and b is the exponent parameter. Ai is the activation of i and Sp is the strength of production p. The parameters B and b default to 1 in the current model, although we will describe other ways to set them. The strength of a production defaults to 0, although again we will describe how to set it to non-zero values. The total time for a production to fire is given as
Tp = S(Tip) + a
where the summation is over the non-goal chunks (the goal chunk is assumed to take zero time) and a represents the fixed action cost of the production as described in the previous section. The parameter a defaults to .05 seconds although you may set other times for things like typing time.

The Example Production Set: Algebra

To illustrate these ideas we will use the production set that we developed in Chapter 2 for doing algebra. You will find a file encoding a modified version of this in Algebra latency. You should load it and run it. To run it we have developed a special LISP function call "do-equation". If you call (do-equation op1 n1 op2 n2 n3) this is equivalent to the equation (x op1 n1) op n2 = n3. For instance, (do-equation times three plus two eleven) is equivalent to (x*3) + 2 = 11. If the first two arguments are nil this is equivalent to ignoring the embedded expression. Thus, (do-algebra nil nil times three nine) is equivalent to x*3 = 9.

As an example, make sure Enable Rational Analysis is turned on in the Global Parameters and then type:

(do-equation nil nil times three nine)

The next subsection will show the behavior that results.

Production Trace

(do-equation nil nil 'times 'three 'nine)
Cycle 0 Time 0.000: SOLVE-EQUATION
Matching latency: 0.006
Action latency: 0.050
Cycle 1 Time 0.056: FIND-OPERATOR
Matching latency: 0.075
Action latency: 0.050
Cycle 2 Time 0.181: INVERT-OPERATOR
Matching latency: 0.009
Action latency: 0.050
Cycle 3 Time 0.240: COMBINE
Matching latency: 0.178
Action latency: 0.050
Cycle 4 Time 0.468: DO-DIVIDE
Matching latency: 0.230
Action latency: 0.050
Cycle 5 Time 0.748: DONE-TRANSFORMING
Matching latency: 0.000
Action latency: 0.050
Top goal popped.
Run latency: 0.798
This is a run which takes .798 
second to complete. The next
subsections will explain how
these latencies were obtained for
the first and fifth production.
More detailed information can be
obtained with the ACT-R parameter
activation trace set on. Go to
the Global Parameters window and
make this change and rerun
the problem again.

The First Production

If you turn on the Activation Trace flag in the Global Parameters, you will get the following detailed trace of the first production firing:

Adding instantiation of production SOLVE-EQUATION strength 0.000
Sources of activation are: ((EQUATION1 . 1.0))
WME EQUATION1 Activation 5.170 Latency 0.006
Total latency of production SOLVE-EQUATION is 0.006
Cycle 0 Time 0.000: SOLVE-EQUATION
Matching latency: 0.006
Action latency: 0.050

The total latency for this production is .056 seconds which is the sum of the .006 seconds matching latency plus .05 right-hand side latency. The next subsection will discuss the matching latency.

(P SOLVE-EQUATION
=goal>
isa SOLVE-EQUATION
EQUATION =EQUATION
=EQUATION>
isa EQUATION
LEFT =LEFT
RIGHT =RIGHT
==>
=NEW1>
isa ISOLATE-X
EXPRESSION =LEFT
OTHERSIDE =RIGHT
!focus-on! =NEW1
)

The Matching Latency for the First Production

The portion of the trace relevant to the matching latency is given below:
 Sources of activation are: ((EQUATION1 . 1.0))
 WME EQUATION1 Activation  5.170 Latency  0.006
The goal has a single slot and so all of the source activation goes to the one unit in that slot. This is shown in the ((EQUATION1 . 1.0)) portion of the trace. This source activation is multiplied by the strength of the association between equation 1 and itself. This strength can be inspected by bringing up the Declarative Memory Viewer and inspecting the chunk equation1. This will show a self activation value between equation1 and itself of 5.17. The activation in this case is just 1.0 * 5.17 = 5.17. This then is converted to the latency by applying Equation 3.2 with B = 1.0, b = 1.0, Sp = 0 (the default values):

1.0*exp(-1.0*5.17) = 0.006 seconds.

The Fifth Production

The fifth production to apply offers some interesting lessons and its detailed trace is given below:

Adding instantiation of production DO-DIVIDE strength 0.000
Sources of activation are: ((NINE . 0.33333334) (DIVIDE . 0.33333334) (THREE . 0.33333334))
WME THREE*THREE Activation 1.470 Latency 0.230
Total latency of production DO-DIVIDE is 0.230
Cycle 4 Time 0.468: DO-DIVIDE
Matching latency: 0.230
Action latency: 0.050

The total latency for this production is .280 seconds which is the sum of the .230 seconds matching latency plus .050 right-hand side latency. The matching latency is much longer in this case and a detailed analysis of it appears on the next subsection.

(P DO-DIVIDE
=goal>
isa DO-MATH
ARG1 =ARG1
OPERATOR DIVIDE
ARG2 =ARG2
=FACT>
isa TIMES-FACT
ARG1 =ANS
ARG2 =ARG2
PRODUCT =ARG1
==>
=goal>
answer =ANS
!pop!
)

The Matching Latency for the Fifth Production

The portion of the trace relevant to the matching latency is given below:
    Sources of activation are: ((NINE . 0.33333334) (DIVIDE .
0.33333334) (THREE . 0.33333334))
WME THREE*THREE Activation 1.470 Latency 0.230
In this case there are three sources of activation and so each has source value .333. Two of these (three and nine) are associated to the target chunk three*three. Their strength of association to the target value can beinspecting three*three in the Declarative Memory Viewer. This shows that the Sji value associated with three is 2.61 and with nine is 1.80. The total activation is .333*(1.80 + 2.61) = 1.47.

Determination of the ia Values

In Unit 6 we will discuss learning processes defined on the ia values (strengths of association -- Sij) but in this unit we will explain how the initial ia values are set. These are the static ia values unless learning is turned on. Basically, the ia values reflect the log likelihood that the chunk will be needed if the source is present. As a first approximation we assume that the probabilities of all chunks are equal and therefore the probability of any one chunk is 1/m where m is the number of chunks. We assume that if a source is associated to n chunks then the probability to each of these chunks is 1/n. Thus the likelihood ratio becomes 1/n / 1/m = m/n. Then

Sij = ln(m/n) = ln(m) - ln(n)

With this in mind let us consider the Sij between nine and 'three*three which is 1.80.
Since there are 352 facts involved in the data base and 58 of them involve nine, you may confirm that ln(352) - ln(58) = 1.80.

The Data to be Fit

Below we have some data on times for CMU subjects to solve eight types of equations and the times taken by the simulation you have
Equations

1. x * 4 = 12
2. x / 3 = 8
3. x + 3 = 9
4. x - 3 = 9
5. x * 3 + 2 = 8
6. x * 3 - 2 = 4
7. x / 3 + 2 = 8
8. x / 3 - 2 = 4
Data

1.93
2.53
2.88
3.02
3.45
3.99
6.03
5.62
Simulation

0.750
0.855
0.858
0.855
1.603
1.592
1.600
1.589
It is not clear that the model predicts much beyond a difference between one and two transformation equationsand is considerably off in the latencies. We will pursue in the following subsections issues of getting the simulation's predictions into correspond to the data.

The Data to be Fit: Parameter Changes

One can increase the latencies by increasing the scale parameter B. In the simulation reported below we increased the scale parameter (called Latencyfactor) from 1.0 to 4.0. We also added .2 to the a parameter for done-transforming to represent the typing time.
Equations

1. x * 3 = 12
2. x / 3 = 8
3. x + 3 = 9
4. x - 3 = 9
5. x * 3 + 2 = 8
6. x * 3 - 2 = 4
7. x / 3 + 2 = 8
8. x / 3 - 2 = 4
Data

1.93
2.53
2.88
3.02
3.45
3.99
6.03
5.62
Simulation

2.244
2.670
2.681
2.670
5.061
5.016
5.050
5.005
The one apparent discrepancy between the data and the simulation is that subjects appear to be faster in problems that involve the times operator. As an illustration of parameter setting we will deal with this in the next subsection.

The Data to be Fit: Strength Parameter

The actual reason for the advantage of the "*" equations is that they involved multiplication facts with smaller integers as arguments which probably have greater base level strength. However, to illustrate the parameters statement we can change the strength parameter of do-divide which undoes the multiplication.
Equations

1. x * 3 = 12
2. x / 3 = 8
3. x + 3 = 9
4. x - 3 = 9
5. x * 3 + 2 = 8
6. x * 3 - 2 = 4
7. x / 3 + 2 = 8
8. x / 3 - 2 = 4
Data

1.93
2.53
2.88
3.02
3.45
3.99
6.03
5.62
Simulation

1.788
2.670
2.681
2.670
4.337
4.292
5.050
5.005
Add this to the file:

(parameters do-divide
:strength 1.0)

or setting the strength in the
production parameter window
This completes our discussion of the example. For a more thorough discussion see Anderson, Reder, and Lebiere (in press). We will now discuss the exercise for this section -- fitting data on serial recall.


                   Unit Exercises

There are two choices for unit exercises this time.
Either you can try to model memory span data oe the
fan effect. The next three subsections will describe
your options.

I think the right assignment is the fan assignment and
students should be seeded with the right representation
of enough facts to make it go. Also give suggestions
of separate intercepts

Unit Exercise: Serial Recall

For the section's exercise we would like you to try your hand at reproducing the latencies generated by subjects recalling lists of digits varying in length from 3 to 12 after seeing them once at a 1-per-second rate. They were visually chunked into sublists of size 2, 3 or 4. Below are the latencies of recall of each digit for each length with the chunk boundaries indicated by "|". They are prefixed by proportion of correct perfect reproductions of that length. The next subsection will contain some comments which might be useful in doing this assignment.
99%:   1241   383   185
99%: 1394 404 267 268
95%: 1441 437 315 | 491 370
94%: 1495 398 279 | 646 379 285
85%: 1504 439 306 | 791 402 451 309
76%: 1650 437 300 | 765 417 412 | 597 322
59%: 1890 538 324 | 1096 419 618 | 877 468 384
54%: 1910 498 342 | 1007 425 517 | 1104 568 585 296
35%: 2221 463 371 | 1372 467 495 | 1171 427 573 | 1304 323
23%: 2481 529 277 | 1310 636 526 | 1555 597 597 | 1385 441 303

Section Exercise: Knowledge Representation

It probably makes sense to first focus on getting some production set that will perform the task before worrying about how to get the latencies out of it. With respect to knowledge representation, it might seem more natural to represent elements in chunks as in
chunk>
isa chunk
first two
second six
third five
However, everytime we attack such problems we eventually find it turns out better to use reverse representations like
a>
isa element
position first
parent chunk
value two

Unit Exercise: Fan Effect

Anderson (1974) performed an experiment in which subjects studied 26 facts such as the following sentences:

  1. A hippie is in the park.    
2. A hippie is in the church.
3. A hippie is in the bank.
4. A captain is in the park.
5. A captain is in the church.
6. A debutante is in the bank
7. A fireman is in the park
-
- .
-
26. A lawyer is in the cave.
After studying these facts subjects had to judge whether the saw facts such as the following:
3-3. A hippie is in the park.
1-1. A lawyer is in the cave.
1-2. A debutante is in the bank.
when they are mixed in with foils like
3-1. A hippie is in the cave.
1-2. A lawyer is in the park.
1-1. A debutante is in the cave.
2-2. A captain is in the bank
The following data shows the recognition latencies in seconds for targets as foils as a function of person fan and location fan:
           Targets                      Foils                   

Location Person Fan Person Fan
Fan 1 2 3 Mean 1 2 3 Mean
1 1.111 1.174 1.222 1.169 1.197 1.221 1.264 1.227
2 1.167 1.198 1.222 1.196 1.250 1.356 1.291 1.299
3 1.153 1.233 1.357 1.248 1.262 1.471 1.465 1.399
Mean 1.144 1.202 1.357 1.20 1.236 1.349 1.340 1.308
Write a simulation that is able to reproduce this data to some approximation. You should be able to do this by just manipulating the Latency Factor global parameter, the :a parameter for specific productions, and the base levels (via the setgeneralbaselevels command) for chunks.

As a aspiration reference the following is the simulation results that I was able to produce:
  Targets

1.121 1.158 1.183
1.158 1.192 1.224
1.183 1.224 1.257

Foils

1.247 1.247 1.247
1.247 1.336 1.336
1.262 1.336 1.410

Unit 5: Partial Matching and Accuracy

Now we turn to a discussion of how activation processes can lead to errors of recall. There are two types of errors of recall which can be modelled in ACT-R:

Errors of Omission: These occur when a critical chunk falls below the activation threshold for retrieval. The production which would have used this information then cannot apply and often some default "give-up" production will apply. The activation threshold is controlled by the variable retrievalthreshold which is set a retrieval threshhold in the Global Parameters window..

Errors of Commission: These occur when some partially matching chunk is retrieved instead of the correct one. Then wrong information from this chunk can intrude into the recall. We will discuss how the partial matching process occurs in ACT-R to produce such errors.

Such errors only occur stochasitically. To get such randomness one needs to introduce some activation noise into the run. Activation Noise can also be set in the Global Parameters window.

Activation Formulas

The central equation describing the activation of a chunk is
Ai = Bi + S(Wj* Sji)          Equation 3.1
When Activation Noise is set to some number this is treated as the variance of a normal distribution and this noise is added to the activation values to determine the actual activation of a chunk. If the slot of a chunk does not perfectly match the slot specification in a condition pattern, a mismatch penalty is subtracted from it. Thus, the effective activation of a chunk for purposes of matching a pattern in a production condition is:
Ai + N(s) - P*Mvd
where N(s) is the normally distributed noise with variance s, P is the mismatch scaling constant, and Mvd is the degree of mismatch (on a 0-1 scale where 0 is perfect match).

Section Example: Chunked Recall

To illustrate these ideas we will use a project developed in response to one of the exercises from the last unit. This is the project Chunked Recall. You should open it. If you check the global parameters you will see that partial matching has been enabled for this exercise, the mismatch penalty has been set at 10 and activation noise has been set to a value of 0.5.You can test it out on a recall task by the command (do-experiment lis) where lis is a list of chunk sizes. It can handle lists up to length 12 and chunk sizes up to length 4. Thus (do-experiment '(4 4)) would cause it to recall a list of length 8 broken into two groups of size 4. If the partial matching trace is also on you will get a complete trace of its behavior given such a call. The next subsection contains that trace.

This trace will show a particularly errorful recall where "1234 5678" is recalled as "5678 213". This involves a reversal of the two groups, a reversal of 1 and 2 in one group, and a failure to retrieve 4 from that group.

Subsections after that will discuss particular episodes from that trace.

Recalling "1234 5678" as "5678 213"

? (do-experiment '(4 4))
 Partial matching wme LIST with activation  4.618
 Similarity between wmes CURRENT and CURRENT is  1.000
 Post-matching activation of wme LIST is  4.618: success.
 Activation ~6,3F is larger than previous best  4.618: selecting 0.0.
 Partial matching wme CHUNK1 with activation  0.889
 Non-wme mismatch between NIL and CURRENT: failure.
 Partial matching wme CHUNK2 with activation -0.483
 Post-matching activation of wme CHUNK2 is -0.483: failure.
 Partial matching wme CHUNK3 with activation  2.027
 Non-wme mismatch between NIL and CURRENT: failure.
 Partial matching wme CHUNK4 with activation  2.488
 Non-wme mismatch between NIL and CURRENT: failure.
 Cycle 0  Time  0.000: START-UP
 Matching latency:  0.010
 Action latency:  0.050
 
 Partial matching wme LIST with activation  5.111
 Non-wme mismatch between NIL and FIRST: failure.
 Partial matching wme CHUNK1 with activation  1.738
 Similarity between wmes FIRST and FIRST is  1.000
 Similarity between wmes LIST and LIST is  1.000
 Post-matching activation of wme CHUNK1 is  1.738: success.
 Activation ~6,3F is larger than previous best  1.738: selecting 0.0.
 Partial matching wme CHUNK2 with activation  2.941
 Similarity between wmes SECOND and FIRST is  0.900
 Decreasing activation to  1.941
 Similarity between wmes LIST and LIST is  1.000
 Post-matching activation of wme CHUNK2 is  1.941: success.
 Activation ~6,3F is larger than previous best  1.941: selecting 1.7384195.
 Partial matching wme CHUNK3 with activation  1.928
 Non-wme mismatch between NIL and FIRST: failure.
 Partial matching wme CHUNK4 with activation  2.591
 Non-wme mismatch between NIL and FIRST: failure.
 Cycle 1  Time  0.060: RECALL-FIRST-CHUNK
 Matching latency:  0.144
 Action latency:  0.050
    
    Partial matching wme ITEM1 with activation -0.237
    Post-matching activation of wme ITEM1 is -0.237: failure.
    Partial matching wme ITEM2 with activation -1.240
    Post-matching activation of wme ITEM2 is -1.240: failure.
    Partial matching wme ITEM3 with activation -0.291
    Post-matching activation of wme ITEM3 is -0.291: failure.
    Partial matching wme ITEM4 with activation  1.251
    Similarity between wmes FOURTH and FIRST is  0.700
    Decreasing activation to -1.749
    Post-matching activation of wme ITEM4 is -1.749: failure.
    Partial matching wme ITEM5 with activation  2.314
    Similarity between wmes FIRST and FIRST is  1.000
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Post-matching activation of wme ITEM5 is  2.314: success.
    Activation ~6,3F is larger than previous best  2.314: selecting 0.0.
    Partial matching wme ITEM6 with activation  2.905
    Similarity between wmes SECOND and FIRST is  0.900
    Decreasing activation to  1.905
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Post-matching activation of wme ITEM6 is  1.905: success.
    Partial matching wme ITEM7 with activation  1.981
    Similarity between wmes THIRD and FIRST is  0.800
    Decreasing activation to -0.019
    Post-matching activation of wme ITEM7 is -0.019: failure.
    Partial matching wme ITEM8 with activation  2.138
    Similarity between wmes FOURTH and FIRST is  0.700
    Decreasing activation to -0.862
    Post-matching activation of wme ITEM8 is -0.862: failure.
    Partial matching wme ITEM9 with activation  0.579
    Non-wme mismatch between NIL and FIRST: failure.
    Partial matching wme ITEM10 with activation  0.860
    Non-wme mismatch between NIL and FIRST: failure.
    Partial matching wme ITEM11 with activation  0.932
    Non-wme mismatch between NIL and FIRST: failure.
    Partial matching wme ITEM12 with activation  0.801
    Non-wme mismatch between NIL and FIRST: failure.
    Cycle 2  Time  0.253: RECALL-FIRST-ITEM
    Matching latency:  0.099
    Action latency:  0.050
       
       Partial matching wme ITEM5 with activation  3.808
       Post-matching activation of wme ITEM5 is  3.808: success.
       Cycle 3  Time  0.402: RECALL-ITEM
       Matching latency:  0.008
       Action latency:  0.200
       FIVE
    
    Partial matching wme ITEM1 with activation  0.742
    Similarity between wmes FIRST and SECOND is  0.900
    Decreasing activation to -0.258
    Post-matching activation of wme ITEM1 is -0.258: failure.
    Partial matching wme ITEM2 with activation -0.581
    Post-matching activation of wme ITEM2 is -0.581: failure.
    Partial matching wme ITEM3 with activation  0.125
    Similarity between wmes THIRD and SECOND is  0.900
    Decreasing activation to -0.875
    Post-matching activation of wme ITEM3 is -0.875: failure.
    Partial matching wme ITEM4 with activation  0.856
    Similarity between wmes FOURTH and SECOND is  0.800
    Decreasing activation to -1.144
    Post-matching activation of wme ITEM4 is -1.144: failure.
    Partial matching wme ITEM5 with activation  3.239
    Similarity between wmes FIRST and SECOND is  0.900
    Decreasing activation to  2.239
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Similarity between wmes DONE and DONE is  1.000
    Decreasing activation to -7.761
    Partial matching wme ITEM6 with activation  1.779
    Similarity between wmes SECOND and SECOND is  1.000
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Post-matching activation of wme ITEM6 is  1.779: success.
    Activation ~6,3F is larger than previous best  1.779: selecting 0.0.
    Partial matching wme ITEM7 with activation  2.420
    Similarity between wmes THIRD and SECOND is  0.900
    Decreasing activation to  1.420
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Post-matching activation of wme ITEM7 is  1.420: success.
    Partial matching wme ITEM8 with activation -0.062
    Post-matching activation of wme ITEM8 is -0.062: failure.
    Partial matching wme ITEM9 with activation  1.138
    Non-wme mismatch between NIL and SECOND: failure.
    Partial matching wme ITEM10 with activation  1.088
    Non-wme mismatch between NIL and SECOND: failure.
    Partial matching wme ITEM11 with activation  0.245
    Non-wme mismatch between NIL and SECOND: failure.
    Partial matching wme ITEM12 with activation  0.761
    Non-wme mismatch between NIL and SECOND: failure.
    Cycle 4  Time  0.611: RECALL-SECOND-ITEM
    Matching latency:  0.169
    Action latency:  0.050
       
       Partial matching wme ITEM6 with activation  4.817
       Post-matching activation of wme ITEM6 is  4.817: success.
       Cycle 5  Time  0.829: RECALL-ITEM
       Matching latency:  0.003
       Action latency:  0.200
       SIX
    
    Partial matching wme ITEM1 with activation -0.340
    Post-matching activation of wme ITEM1 is -0.340: failure.
    Partial matching wme ITEM2 with activation  1.285
    Similarity between wmes SECOND and THIRD is  0.900
    Decreasing activation to  0.285
    Similarity between wmes CHUNK1 and CHUNK2 is  0.000
    Decreasing activation to -9.715
    Post-matching activation of wme ITEM2 is -9.715: failure.
    Partial matching wme ITEM3 with activation  0.551
    Similarity between wmes THIRD and THIRD is  1.000
    Similarity between wmes CHUNK1 and CHUNK2 is  0.000
    Decreasing activation to -9.449
    Post-matching activation of wme ITEM3 is -9.449: failure.
    Partial matching wme ITEM4 with activation -0.763
    Post-matching activation of wme ITEM4 is -0.763: failure.
    Partial matching wme ITEM5 with activation  1.464
    Similarity between wmes FIRST and THIRD is  0.800
    Decreasing activation to -0.536
    Post-matching activation of wme ITEM5 is -0.536: failure.
    Partial matching wme ITEM6 with activation  3.843
    Similarity between wmes SECOND and THIRD is  0.900
    Decreasing activation to  2.843
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Similarity between wmes DONE and DONE is  1.000
    Decreasing activation to -7.157
    Partial matching wme ITEM7 with activation  1.580
    Similarity between wmes THIRD and THIRD is  1.000
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Post-matching activation of wme ITEM7 is  1.580: success.
    Activation ~6,3F is larger than previous best  1.580: selecting 0.0.
    Partial matching wme ITEM8 with activation  1.422
    Similarity between wmes FOURTH and THIRD is  0.900
    Decreasing activation to  0.422
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Post-matching activation of wme ITEM8 is  0.422: success.
    Partial matching wme ITEM9 with activation  0.746
    Non-wme mismatch between NIL and THIRD: failure.
    Partial matching wme ITEM10 with activation  0.275
    Non-wme mismatch between NIL and THIRD: failure.
    Partial matching wme ITEM11 with activation  0.971
    Non-wme mismatch between NIL and THIRD: failure.
    Partial matching wme ITEM12 with activation  1.081
    Non-wme mismatch between NIL and THIRD: failure.
    Cycle 6  Time  1.032: RECALL-THIRD-ITEM
    Matching latency:  0.206
    Action latency:  0.050
       
       Partial matching wme ITEM7 with activation  4.188
       Post-matching activation of wme ITEM7 is  4.188: success.
       Cycle 7  Time  1.288: RECALL-ITEM
       Matching latency:  0.006
       Action latency:  0.200
       SEVEN
    
    Partial matching wme ITEM1 with activation -1.382
    Post-matching activation of wme ITEM1 is -1.382: failure.
    Partial matching wme ITEM2 with activation  0.014
    Similarity between wmes SECOND and FOURTH is  0.800
    Decreasing activation to -1.986
    Post-matching activation of wme ITEM2 is -1.986: failure.
    Partial matching wme ITEM3 with activation  2.272
    Similarity between wmes THIRD and FOURTH is  0.900
    Decreasing activation to  1.272
    Similarity between wmes CHUNK1 and CHUNK2 is  0.000
    Decreasing activation to -8.728
    Post-matching activation of wme ITEM3 is -8.728: failure.
    Partial matching wme ITEM4 with activation  0.013
    Similarity between wmes FOURTH and FOURTH is  1.000
    Similarity between wmes CHUNK1 and CHUNK2 is  0.000
    Decreasing activation to -9.987
    Post-matching activation of wme ITEM4 is -9.987: failure.
    Partial matching wme ITEM5 with activation  1.595
    Similarity between wmes FIRST and FOURTH is  0.700
    Decreasing activation to -1.405
    Post-matching activation of wme ITEM5 is -1.405: failure.
    Partial matching wme ITEM6 with activation  1.845
    Similarity between wmes SECOND and FOURTH is  0.800
    Decreasing activation to -0.155
    Post-matching activation of wme ITEM6 is -0.155: failure.
    Partial matching wme ITEM7 with activation  3.169
    Similarity between wmes THIRD and FOURTH is  0.900
    Decreasing activation to  2.169
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Similarity between wmes DONE and DONE is  1.000
    Decreasing activation to -7.831
    Partial matching wme ITEM8 with activation  1.026
    Similarity between wmes FOURTH and FOURTH is  1.000
    Similarity between wmes CHUNK2 and CHUNK2 is  1.000
    Post-matching activation of wme ITEM8 is  1.026: success.
    Activation ~6,3F is larger than previous best  1.026: selecting 0.0.
    Partial matching wme ITEM9 with activation  2.204
    Non-wme mismatch between NIL and FOURTH: failure.
    Partial matching wme ITEM10 with activation  0.009
    Non-wme mismatch between NIL and FOURTH: failure.
    Partial matching wme ITEM11 with activation -0.459
    Post-matching activation of wme ITEM11 is -0.459: failure.
    Partial matching wme ITEM12 with activation  0.407
    Non-wme mismatch between NIL and FOURTH: failure.
    Cycle 8  Time  1.494: RECALL-FOURTH-ITEM
    Matching latency:  0.358
    Action latency:  0.050
       
       Partial matching wme ITEM8 with activation  4.319
       Post-matching activation of wme ITEM8 is  4.319: success.
       Cycle 9  Time  1.902: RECALL-ITEM
       Matching latency:  0.005
       Action latency:  0.200
       EIGHT
    
    Cycle 10  Time  2.107: RECALL-DONE-CHUNK
    Matching latency:  0.000
    Action latency:  0.050
 
 Partial matching wme LIST with activation  2.015
 Non-wme mismatch between NIL and SECOND: failure.
 Partial matching wme CHUNK1 with activation  1.125
 Similarity between wmes FIRST and SECOND is  0.900
 Decreasing activation to  0.125
 Similarity between wmes LIST and LIST is  1.000
 Post-matching activation of wme CHUNK1 is  0.125: success.
 Activation ~6,3F is larger than previous best  0.125: selecting 0.0.
 Partial matching wme CHUNK2 with activation  2.477
 Similarity between wmes SECOND and SECOND is  1.000
 Similarity between wmes LIST and LIST is  1.000
 Similarity between wmes DONE and DONE is  1.000
 Decreasing activation to -7.523
 Partial matching wme CHUNK3 with activation  0.360
 Non-wme mismatch between NIL and SECOND: failure.
 Partial matching wme CHUNK4 with activation  0.364
 Non-wme mismatch between NIL and SECOND: failure.
 Cycle 11  Time  2.157: RECALL-SECOND-CHUNK
 Matching latency:  0.883
 Action latency:  0.050
    
    Partial matching wme ITEM1 with activation  0.925
    Similarity between wmes FIRST and FIRST is  1.000
    Similarity between wmes CHUNK1 and CHUNK1 is  1.000
    Post-matching activation of wme ITEM1 is  0.925: success.
    Activation ~6,3F is larger than previous best  0.925: selecting 0.0.
    Partial matching wme ITEM2 with activation  2.112
    Similarity between wmes SECOND and FIRST is  0.900
    Decreasing activation to  1.112
    Similarity between wmes CHUNK1 and CHUNK1 is  1.000
    Post-matching activation of wme ITEM2 is  1.112: success.
    Activation ~6,3F is larger than previous best  1.112: selecting 0.9245738.
    Partial matching wme ITEM3 with activation  1.805
    Similarity between wmes THIRD and FIRST is  0.800
    Decreasing activation to -0.195
    Post-matching activation of wme ITEM3 is -0.195: failure.
    Partial matching wme ITEM4 with activation  1.608
    Similarity between wmes FOURTH and FIRST is  0.700
    Decreasing activation to -1.392
    Post-matching activation of wme ITEM4 is -1.392: failure.
    Partial matching wme ITEM5 with activation  0.600
    Similarity between wmes FIRST and FIRST is  1.000
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -9.400
    Post-matching activation of wme ITEM5 is -9.400: failure.
    Partial matching wme ITEM6 with activation  1.567
    Similarity between wmes SECOND and FIRST is  0.900
    Decreasing activation to  0.567
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -9.433
    Post-matching activation of wme ITEM6 is -9.433: failure.
    Partial matching wme ITEM7 with activation  0.601
    Similarity between wmes THIRD and FIRST is  0.800
    Decreasing activation to -1.399
    Post-matching activation of wme ITEM7 is -1.399: failure.
    Partial matching wme ITEM8 with activation  0.935
    Similarity between wmes FOURTH and FIRST is  0.700
    Decreasing activation to -2.065
    Post-matching activation of wme ITEM8 is -2.065: failure.
    Partial matching wme ITEM9 with activation -0.625
    Post-matching activation of wme ITEM9 is -0.625: failure.
    Partial matching wme ITEM10 with activation  0.694
    Non-wme mismatch between NIL and FIRST: failure.
    Partial matching wme ITEM11 with activation  0.588
    Non-wme mismatch between NIL and FIRST: failure.
    Partial matching wme ITEM12 with activation  0.780
    Non-wme mismatch between NIL and FIRST: failure.
    Cycle 12  Time  3.090: RECALL-FIRST-ITEM
    Matching latency:  0.329
    Action latency:  0.050
       
       Partial matching wme ITEM2 with activation  4.894
       Post-matching activation of wme ITEM2 is  4.894: success.
       Cycle 13  Time  3.469: RECALL-ITEM
       Matching latency:  0.003
       Action latency:  0.200
       TWO
    
    Partial matching wme ITEM1 with activation  2.284
    Similarity between wmes FIRST and SECOND is  0.900
    Decreasing activation to  1.284
    Similarity between wmes CHUNK1 and CHUNK1 is  1.000
    Post-matching activation of wme ITEM1 is  1.284: success.
    Activation ~6,3F is larger than previous best  1.284: selecting 0.0.
    Partial matching wme ITEM2 with activation  1.462
    Similarity between wmes SECOND and SECOND is  1.000
    Similarity between wmes CHUNK1 and CHUNK1 is  1.000
    Similarity between wmes DONE and DONE is  1.000
    Decreasing activation to -8.538
    Partial matching wme ITEM3 with activation -0.605
    Post-matching activation of wme ITEM3 is -0.605: failure.
    Partial matching wme ITEM4 with activation  1.405
    Similarity between wmes FOURTH and SECOND is  0.800
    Decreasing activation to -0.595
    Post-matching activation of wme ITEM4 is -0.595: failure.
    Partial matching wme ITEM5 with activation  2.179
    Similarity between wmes FIRST and SECOND is  0.900
    Decreasing activation to  1.179
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -8.821
    Post-matching activation of wme ITEM5 is -8.821: failure.
    Partial matching wme ITEM6 with activation  0.159
    Similarity between wmes SECOND and SECOND is  1.000
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -9.841
    Post-matching activation of wme ITEM6 is -9.841: failure.
    Partial matching wme ITEM7 with activation  1.014
    Similarity between wmes THIRD and SECOND is  0.900
    Decreasing activation to  0.014
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -9.986
    Post-matching activation of wme ITEM7 is -9.986: failure.
    Partial matching wme ITEM8 with activation  1.773
    Similarity between wmes FOURTH and SECOND is  0.800
    Decreasing activation to -0.227
    Post-matching activation of wme ITEM8 is -0.227: failure.
    Partial matching wme ITEM9 with activation  0.780
    Non-wme mismatch between NIL and SECOND: failure.
    Partial matching wme ITEM10 with activation  0.701
    Non-wme mismatch between NIL and SECOND: failure.
    Partial matching wme ITEM11 with activation -0.258
    Post-matching activation of wme ITEM11 is -0.258: failure.
    Partial matching wme ITEM12 with activation -1.411
    Post-matching activation of wme ITEM12 is -1.411: failure.
    Cycle 14  Time  3.672: RECALL-SECOND-ITEM
    Matching latency:  0.277
    Action latency:  0.050
       
       Partial matching wme ITEM1 with activation  4.966
       Post-matching activation of wme ITEM1 is  4.966: success.
       Cycle 15  Time  3.999: RECALL-ITEM
       Matching latency:  0.003
       Action latency:  0.200
       ONE
    
    Partial matching wme ITEM1 with activation  1.460
    Similarity between wmes FIRST and THIRD is  0.800
    Decreasing activation to -0.540
    Post-matching activation of wme ITEM1 is -0.540: failure.
    Partial matching wme ITEM2 with activation  1.851
    Similarity between wmes SECOND and THIRD is  0.900
    Decreasing activation to  0.851
    Similarity between wmes CHUNK1 and CHUNK1 is  1.000
    Similarity between wmes DONE and DONE is  1.000
    Decreasing activation to -9.149
    Partial matching wme ITEM3 with activation  0.011
    Similarity between wmes THIRD and THIRD is  1.000
    Similarity between wmes CHUNK1 and CHUNK1 is  1.000
    Post-matching activation of wme ITEM3 is  0.011: success.
    Activation ~6,3F is larger than previous best  0.011: selecting 0.0.
    Partial matching wme ITEM4 with activation  0.252
    Similarity between wmes FOURTH and THIRD is  0.900
    Decreasing activation to -0.748
    Post-matching activation of wme ITEM4 is -0.748: failure.
    Partial matching wme ITEM5 with activation  0.893
    Similarity between wmes FIRST and THIRD is  0.800
    Decreasing activation to -1.107
    Post-matching activation of wme ITEM5 is -1.107: failure.
    Partial matching wme ITEM6 with activation  1.703
    Similarity between wmes SECOND and THIRD is  0.900
    Decreasing activation to  0.703
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -9.297
    Post-matching activation of wme ITEM6 is -9.297: failure.
    Partial matching wme ITEM7 with activation  0.506
    Similarity between wmes THIRD and THIRD is  1.000
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -9.494
    Post-matching activation of wme ITEM7 is -9.494: failure.
    Partial matching wme ITEM8 with activation -0.029
    Post-matching activation of wme ITEM8 is -0.029: failure.
    Partial matching wme ITEM9 with activation  0.391
    Non-wme mismatch between NIL and THIRD: failure.
    Partial matching wme ITEM10 with activation  0.415
    Non-wme mismatch between NIL and THIRD: failure.
    Partial matching wme ITEM11 with activation  0.675
    Non-wme mismatch between NIL and THIRD: failure.
    Partial matching wme ITEM12 with activation -0.367
    Post-matching activation of wme ITEM12 is -0.367: failure.
    Cycle 16  Time  4.201: RECALL-THIRD-ITEM
    Matching latency:  0.989
    Action latency:  0.050
       
       Partial matching wme ITEM3 with activation  3.814
       Post-matching activation of wme ITEM3 is  3.814: success.
       Cycle 17  Time  5.241: RECALL-ITEM
       Matching latency:  0.008
       Action latency:  0.200
       THREE
    
    Partial matching wme ITEM1 with activation  0.737
    Similarity between wmes FIRST and FOURTH is  0.700
    Decreasing activation to -2.263
    Post-matching activation of wme ITEM1 is -2.263: failure.
    Partial matching wme ITEM2 with activation  1.348
    Similarity between wmes SECOND and FOURTH is  0.800
    Decreasing activation to -0.652
    Post-matching activation of wme ITEM2 is -0.652: failure.
    Partial matching wme ITEM3 with activation  3.055
    Similarity between wmes THIRD and FOURTH is  0.900
    Decreasing activation to  2.055
    Similarity between wmes CHUNK1 and CHUNK1 is  1.000
    Similarity between wmes DONE and DONE is  1.000
    Decreasing activation to -7.945
    Partial matching wme ITEM4 with activation -1.317
    Post-matching activation of wme ITEM4 is -1.317: failure.
    Partial matching wme ITEM5 with activation  2.463
    Similarity between wmes FIRST and FOURTH is  0.700
    Decreasing activation to -0.537
    Post-matching activation of wme ITEM5 is -0.537: failure.
    Partial matching wme ITEM6 with activation -0.683
    Post-matching activation of wme ITEM6 is -0.683: failure.
    Partial matching wme ITEM7 with activation  1.540
    Similarity between wmes THIRD and FOURTH is  0.900
    Decreasing activation to  0.540
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -9.460
    Post-matching activation of wme ITEM7 is -9.460: failure.
    Partial matching wme ITEM8 with activation  1.784
    Similarity between wmes FOURTH and FOURTH is  1.000
    Similarity between wmes CHUNK2 and CHUNK1 is  0.000
    Decreasing activation to -8.216
    Post-matching activation of wme ITEM8 is -8.216: failure.
    Partial matching wme ITEM9 with activation -0.062
    Post-matching activation of wme ITEM9 is -0.062: failure.
    Partial matching wme ITEM10 with activation -0.870
    Post-matching activation of wme ITEM10 is -0.870: failure.
    Partial matching wme ITEM11 with activation  0.270
    Non-wme mismatch between NIL and FOURTH: failure.
    Partial matching wme ITEM12 with activation -0.615
    Post-matching activation of wme ITEM12 is -0.615: failure.
    No wme reached activation threshold  0.000: partial matching fails.
    Cycle 18  Time  5.449: RECALL-DONE-CHUNK
    Matching latency:  0.000
    Action latency:  0.050
 
 Partial matching wme LIST with activation  2.648
 Non-wme mismatch between NIL and THIRD: failure.
 Partial matching wme CHUNK1 with activation  1.551
 Similarity between wmes FIRST and THIRD is  0.800
 Decreasing activation to -0.449
 Post-matching activation of wme CHUNK1 is -0.449: failure.
 Partial matching wme CHUNK2 with activation  2.304
 Similarity between wmes SECOND and THIRD is  0.900
 Decreasing activation to  1.304
 Similarity between wmes LIST and LIST is  1.000
 Similarity between wmes DONE and DONE is  1.000
 Decreasing activation to -8.696
 Partial matching wme CHUNK3 with activation -0.906
 Post-matching activation of wme CHUNK3 is -0.906: failure.
 Partial matching wme CHUNK4 with activation -0.353
 Post-matching activation of wme CHUNK4 is -0.353: failure.
 No wme reached activation threshold  0.000: partial matching fails.
 No instantiation found.
 Run latency:  5.499
19
? :

Positional Errors Because of Partial Matching

In this simulation ACT-R studies "1234 5678" but recalls "5678 213". Let us consider the misordering of the two chunks which occurs early in the list. This is produced by the production recall-first-chunk which is displayed to the right. The correctly matching chunk1 is decribed in the protocol

Partial matching wme CHUNK1 with activation 1.738
Similarity between wmes FIRST and FIRST is 1.000
Similarity between wmes LIST and LIST is 1.000
Post-matching activation of wme CHUNK1 is 1.738

While the partially matching chunk2 is described:

Partial matching wme CHUNK2 with activation 2.941
Similarity between wmes SECOND and FIRST is 0.900
Decreasing activation to 1.941
Similarity between wmes LIST and LIST is 1.000
Post-matching activation of wme CHUNK2 is 1.941:

(P recall-first-chunk
=goal>
ISA recall-top
piece =chunk
position nil
=item>
ISA chunk
position first
parent =chunk
- status done
==>
=item>
status done
=newgoal>
ISA recall-chunk
piece =item
=goal>
position first
!push! =newgoal
)

Analysis of the Mismatch

The reason for the mismatch is that chunk1 had only 1.738 activation to start with, while chunk2 had 2.941 activation. This is just the result of random fluctuations in the activation values (the s squared for activation noise is set at .500) for these items. Their expected values on any trial is equal. Chunk2 received a mismatch penalty of -1.0 because of mismatch between second and first but this is not enough to overcome the activation difference. The size of the mismatch penalty is determined from P which is set as 10 as the value of Mismatch Penalty which can also be set in the Global Parameters window. The degree of mismatch, Mvd, is determined by the following settings which are similarities: (1 - Mvd):
(Setsimilarities
(first second 0.9)
(second third 0.9)
(first third 0.8)
(first fourth .7)
(second fourth 0.8)
(third fourth .9))
Thus, the total mismatch is 10.0*(1-.9) = 1.0. Similarities are symmetrical so that setting the similarity between first and second implies the same similarity between second and first.

Example of Errors of Ommission

For an example of an error of ommission we can look at the failure to recall the final 4. In the trace where the final 4 should be recalled you will find the following record:
Partial matching wme ITEM4 with activation -1.317
Post-matching activation of wme ITEM4 is -1.317: failure.
By random fluctuation and because of decay over time the activation level of item4 had fallen below the Retrieval Threshold set in the Global Parameters at 0.0. Thus, even though it perfectly matched it is not considered for retrieval.

Unit Exercise: Simple Addition

The following are data obtained by Siegler and Shrager on the relative frequencies of different responses by 4 year olds to addition problems.

      0    1    2    3    4    5    6    7    8   Other including failure
1+1   -  .05  .86    -  .02    -  .02    -    -   .06
1+2   -  .04  .07  .75  .04    -  .02    -    -   .09
1+3   -  .02    -  .10  .75  .05  .01  .03    -   .06
2+2 .02    -  .04  .05  .80  .04    -  .05    -     -
2+3   -    -  .07  .09  .25  .45  .08  .01  .01   .06
3+3 .04    -    -  .05  .21  .09  .48    -  .02   .11
It seems likely that many of the kids did not know the answers to the larger problems so let's just focus on the addition table from 1+1 to 3+3. Your task is to set up a system which retrieves answers to these questions and use the partial matching mechanism to produce a comparable distribution of errors. This should be achievable by manipulating the mismatch penalty, the activation noise, and the similarity among chunks by the command Setsimilarities.

In my effort to solve this assignment I encoded all the addition problems from 0+0 to 5+5. There is also now a run many option in ACT-R which allows you to run your model multiple times to get stable estimates of proportions.

To establish an aspiration level the following is the best I was able to do in fitting the frequencies:

       0    1    2    3    4    5    6    7    8    Other including failure
1+1    -  .14  .77  .05    -    -    -    -    -   .03
1+2    -  .01  .16  .68  .06  .01    -    -    -   .09
1+3    -    -  .01  .13  .71  .05  .01    -    -   .09
2+2    -    -  .04  .13  .70  .05    -    -    -   .09
2+3    -    -    -  .04  .13  .55  .08  .01    -   .19
3+3    -    -    -    -  .01  .05  .78  .05  .01   .10

Unit 6: Learning Activation Parameters

In this section we will address the question of how to model the learning of the parameters that control activation and latency. These are the base level activations, the strengths of association, and the strengths of productions. To review, the time for a production to match a chunk is given by the equation:
Tip = B*exp[-b(Ai + Sp)]       Equation 3.2
where Ai is the level of activation of the chunk and Sp is the strength of the production. The level of activation is given by the equation:
Ai = Bi + S(Wj* Sji)           Equation 3.1
where Bi is the base level of activation and Sji is the strength of association. Thus, we will be discussing how learning serves to tune the Sp, Bi, and Sji parameters with experience.

Addition Learning Example

To illustrate these points we will be working with the multicolumn addition example that we developed as part of Chapter 1. This file is available in the project Addition Learning. You can load it and inspect it. The production rules and working memory elements are basically the same as before. We have set the parameters to particular values to get reasonable performance and learning. You might inspect the global parameters file to see what these are:

Latency Factor -- B -- 0.1 seconds
Latency exponent -- b -- 1.0
Base Level Constant -- -5
Base Level Learning -- d -- 0.5
Associative Learning -- 10
Strength Learning -- d -- 0.5

The file also contains a LISP function, doit, which allows one to run the system through a set of problems. Issuing the command (doit 25), for instance, would run ACT-R on 25 problems. We will examine the impact of 250 problems. The system starts out taking over 60 seconds to solve a 3 column addition problem and speeds up to about 3 seconds over those 250 problems. It takes about 2250 seconds or about 37.5 simulated minutes to do these 250 problems.

Production Parameters and Latency Calculations

The first production, to apply in solving a problem is given to the right. A trace of its first firing, with activation trace on, is given below:

Adding instantiation of production START-PROBLEM strength 0.000
Sources of activation are: (CURRENT)
Spreading activation 3.192 from source CURRENT level 1.000 times IA 3.192
Computing a base level of -5.000 from 10 references from creation time -400.000
WME COLUMN3 Activation -1.808 Latency 0.610
Total latency of production START-PROBLEM is 0.610
Cycle 0 Time 0.000: START-PROBLEM
Matching latency: 0.610
Action latency: 0.050

The total latency is the matching latency of 0.610 plus the action latency of 0.050. Using Equation 3.2, the matching latency of 1.207 comes from the total activation of -1.808 since 0.610 = .1*exp(1*1.808). The next subsection will discuss how the total activation of -1.808 was arrived at.

(P START-PROBLEM
=goal>
isa PROBLEM
identifier =id
COLUMN NIL
=COLUMN>
isa COLUMN
identifier =id
RIGHT NIL
==>
=NEWGOAL>
isa ADD-COLUMN
COLUMN =COLUMN
=GOAL>
#|ISA-TYPE|#
COLUMN =COLUMN
!push! =NEWGOAL)

(parameters start-problem
:creation-time -400
:references 10)

Computation of Total Activation

The total activation represents the quantity in the exponent of Equation 3.2 before being multiplified by the scaling factor of b. Thus, it is
Total Activation = Bi + Wj*Sji  + Sp
where Bi is the base level activation of column3 (which, as we will see, is -5.), Wj is the source activation of current which is listed as 1, Sji is the strength of association from current to column3 which can be assessed by inspecting column3 in the Declarative Memory Viewer or by typing into the listener.
? (ia current column3)
3.192
and Sp is the strength of the production START-PROBLEM which, as we will see, is 0. Thus,
Total Activation = -5 + 1*3.192 + 0 =  -1.808
The next subsection will discuss how the values of production strength get set and learned.

Setting and Learning Production Strengths

The parameters statement below in the addition learning Misc window contains information stating that in the past 400 seconds each production has been used 10 times. For instance, we have for start-problem:
(parameters start-problem
   :creation-time -400
   :references 10)
This creates 10 uniformly distributed references over that interval (40 seconds ago, 80 seconds ago, etc). The strength Sp of any production at a later point in time is determined from this initial strength and subsequent experience as
           -d
Sp =log(Stj )
where tj is the time since the ith occurrence and d is a decay rate. If one starts ACT-R up with optimized learning turned off (in the Global Parameters window), this value will be calculated precisely and can be obtained by the following command:
? (production-parameter start-problem :strength)
 Parameters for production START-PROBLEM:
 :STRENGTH -0.231
(-0.23081102838873996)
This formula is quite computationally expensive and often we use the following approximation:
Sp =  log(n / (1-d)) - d*log(L)
where n is the number of presentations and L is the time. If this version is used (by turning optimized learning on in the global parameters window), the inital strengths will be zero. If one turns optimized learning on and runs 250 problems one gets the following production strengths:
START-PROBLEM  2.31
NEXT-COLUMN 2.99
STOP-PROBLEM 2.31
READ-NUMBERS 3.39
ADD-NUMBERS 3.64
MARK-CARRY  2.67
SPLIT-AND-CARRY 2.67
PROCESS-CARRY 2.20
WRITE-ANSWER 3.39
Thus, there has been a significant strengthening of the production rules which contributes to the speed up. The next slide will examine the nature of that speed up in detail. One can get a complete listing of the strengths and base-level activations by typing (output-it) into the listener.

Strength Accrual for Start-Problem and Read-Numbers

We will examine how Start-Problem shifted from a strength of 0 to 2.31 over the 250 practice sessions. Anderson (1993, p71, footnote 4) shows that the following approximation holds:
       -d
log(Stj    ) = log(n / (1-d)) - d*log(L)
where n are the number of times the item is practiced and L is the period or time of that practice. In this case, d = .5, n = 260 since (START-PROBLEM gets practiced once every problem and starts with 10 references), and L = 2650 (2250 + 400) sec. Therefore,
 log(520) - .5*log(2650) = 2.31
Some of the other productions end up with greater base strength because they are used multiple times per problem and so get more practice. So, for instance, READ-NUMBERS gets practice three times each problem and
log(1520) - .5*log(2650) = 3.39

Setting and Learning Base Level Activations

We will now consider the setting and learning of the base level activations of the chunks. The base level activation of chunk i is defined as
                -d
Bi = B + log(Stj    ).
The parameter d is controlled by the base level learning setting in the Global Parameters window and has the value 0.5. The constant B is controlled by the baselevel constant parameter and is set at -5.

The base level activation reflects the prior odds of a fact being matched in a production cycle. A setting of -5 reflects an assumption of odds of about 1 in 150 which is unrealistically high. We also give each fact the same prior experienceas the productions by the command
(setallbaselevels 10 -400)
which is to be read as asserting that each fact has been used 10 times in the last 400 seconds. This turns out to add 0 to the basel level constant, but doing it this way makes the overall activation levels somewhat less votalile as time passes. Unless we did this each fact would be treated as having occurred just once prior to the beginning of the experiment.

The Initial Base Level Activations

One can print out the base level strengths of the facts in the addition table at the beginning of the experiment:
                                   Addend2
Addend1 0 1 2 3 4 5 6 7 8 9
0+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
1+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
2+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
3+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
4+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
5+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
6+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
7+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
8+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
9+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00
10+ -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00 -5.00

Final Base Level Activations

At the end of the 250 problems, these were the base level activations:
                                    Addend2
Addend1 0 1 2 3 4 5 6 7 8 9
0+ -5.25 -5.25 -5.36 -5.41 -5.36 -5.36 -5.47 -5.41 -5.47 -5.41
1+ -5.47 -5.07 -5.30 -5.54 -5.25 -5.30 -5.54 -5.47 -5.25 -5.61
2+ -5.54 -5.16 -5.30 -5.68 -5.25 -5.25 -5.54 -5.20 -5.41 -5.47
3+ -5.30 -4.99 -5.61 -5.54 -5.36 -5.41 -5.30 -5.41 -5.68 -5.11
4+ -5.16 -4.78 -5.47 -5.47 -5.68 -5.11 -5.36 -5.16 -5.36 -5.47
5+ -5.54 -4.81 -5.36 -5.25 -5.47 -5.47 -5.41 -5.25 -5.25 -5.30
6+ -5.54 -4.81 -5.25 -5.30 -5.36 -5.47 -5.30 -5.20 -5.54 -5.30
7+ -5.61 -4.99 -5.16 -5.36 -5.36 -5.76 -5.41 -5.20 -5.47 -5.16
8+ -5.36 -4.61 -5.54 -5.41 -5.54 -5.25 -5.16 -5.30 -5.30 -5.41
9+ -5.36 -4.49 -5.61 -5.36 -5.30 -5.54 -5.47 -5.76 -5.54 -5.41
10+ -3.86 -3.85 -4.20 -4.04 -4.19 -4.46 -4.72 -5.11 -5.20 -5.76
The different activations reflect the differing numbers of times the various facts were used. In the next subsection we will consider the base level activations for 4+5 = 9 and 10+1=11 which are -5.11 and -3.85, respectively.

Final Base Level Activations of Fact45 and Fact101

The fact 4+5=9 only came up 13 times during the experiment while the fact that 10+1 = 11 came up 71 times. Adding the 10 prior exposures gives 23 and 81. The second fact is used whenever it is necessary to split 11 into a tens part and a ones part for purposes of carrying. These numbers can be put into the approximation for strength accrual:
       -d
log(Stj    ) = log(n / (1-d)) - d*log(L)
In this run L was 2650 seconds yielding in the case of fact45:
log(46) - .5*log(2650) = -.11
while in the case of fact101 this is
log(162) - .5*log(2650) = 1.15
These numbers, added to the base level constant of -5 give the numbers in the table in the previous subsection.

Setting and Learning Associative Strengths

The strength of association from item j and item i is taken as reflecting the log likelihood ratio that j will occur if i is present. An approximation to this which we actually try to estimate is
Sji  =  Log(P(i|j) / P(i))
or the log of the ratio of the conditional probability to the base probability. One can set ia values between elements by means of the command addia. However, if not explicitly set there are a set of principles for creating default strengths. This is determined on the basis of connectedness. Chunk i is considered to be connected to chunk j (and vice versa) if one appears as an element of the other. Also each chunk is considered connected to itself. If two chunks are not connected we consider P(i|j) / P(i) = 1 which means an associative strength of zero, which is a great computational convenience. If j is connected to i we set P(i|j) = 1/n where n is the number of facts that j is connected to. This reflects the simple assumption that each fact is equally likely. Similarly, we assume that P(i) = 1/m where m is the number of facts in the data base. Given these assumptions the above formula for Sji becomes
Sji = log(m) - log(n)