Richard Griffiths - Lecture Notes
A number of different types of problem solving architecture for different domains have been proposed. For example, connectionist systems that can solve problems of distinguishing one pattern from another, or genetic algorithms systems that can solve problems of optimization. These are known as sub-symbolic architectures. However in areas where manipulation of complete symbols are modelled, the main cognitive architectures that have been proposed are based around production systems.
Production SystemsProduction systems as a computational model were first developed by the American logician, Emil Post in the 1930's. It is simply one of a whole range of mathematical and machine concepts (Church's lambda calculus, Kleene's recursive functions, Turing's universal machine) devised to explore problems of computability, which have all been shown to be equivalent. (Harel p222.) However, the specific architecture of the production system has been used in cognitive modelling because its implementation by the brain is, in some way, psychologically plausible essentially it embodies a stimulus-response mechanism.
A production system consist of:
Examples of sets of production rules might be:
- a workspace containing a representation of the state of the world relevant to the problem being worked on.
- production rules a set of condition/action rules that encode the behaviour of the system.
- an evaluator a method of matching the condition of the production rules to the workspace contents, selecting a particular rule and applying its action....A more extensive set of production rules are given in the example below:
If you are approaching traffic lights which are red, then stop.
If you are approaching traffic lights which are amber and you are closer than 30 feet from the junction, then carry on.
If you are approaching traffic lights which are amber and you are greater than 30 feet from the junction, then stop.
If you are approaching traffic lights which are green, then carry on.
If the bicycle veers to the right, then lean to the left.
If the bicycle veers to the left, then lean to the right.
The Farmer's ProblemAn example of a production rules that actually solve a (very simple) problem.
A farmer must move a chicken, bag of grain and fox from one bank of the river to the other by boat. The boat can hold only the farmer and one other object at a time. If the chicken is left unattended on a bank with the grain, it will eat it. The fox will also eat the chicken if they are left unattended.
One solution sequence:Source Bank | | Destination Bank
Farmer Chicken Grain Fox | |
Grain Fox | | Farmer Chicken
Farmer Grain Fox | | Chicken
Fox | | Farmer Chicken Grain
Farmer Chicken Fox | | Grain
Chicken | | Farmer Grain Fox
Farmer Chicken | | Grain Fox
| | Farmer Chicken Grain Fox
Production rules to generate these moves are given below. Each rule must be tested against the current state of the world, in sequence, 1 to 6, and the first rule that matches must be applied. Then the rules are matched again.
How can a set of production rules be developed so as to generate a particular sequence of actions? A method for doing this is described below. However, it requires that the sequence has already been specified, i.e., the problem has already been solved! This is intended just as a demonstration of how a set of production rules can be created. An architecture capable of actually solving the problem, and generating the sequence of moves from scratch will be described later.
- If Farmer, Chicken, Grain and Fox are on the destination bank, then STOP!
- If Farmer, Grain and Fox are on the source bank, and Chicken on the destination bank, then Farmer row Grain to the destination bank.
- If Farmer, Chicken and Grain are on the destination bank, and Fox on the source bank, then Farmer row Chicken to the source bank.
- If Farmer, Chicken and Fox are on the source bank, and Grain on the destination bank, then Farmer row Fox to the destination bank.
- If Farmer and Chicken are on the source bank, then Farmer row Chicken to the destination bank.
- If Farmer is on the destination bank, then Farmer row to the source bank.
List the basic states and state modifications:1 [Goal D] [Farmer S] [Chicken S] [Grain S] [Fox S] -> [Farmer D] [Chicken D]
2 [Goal D] [Grain S] [Fox S] [Farmer D] [Chicken D] -> [Farmer S]
3 [Goal D] [Farmer S] [Grain S] [Fox S] [Chicken D] -> [Farmer D] [Grain D]
4 [Goal D] [Fox S] [Farmer D] [Chicken D] [Grain D] -> [Farmer S] [Chicken S]
5 [Goal D] [Farmer S] [Chicken S] [Fox S] [Grain D] -> [Farmer D] [Fox D]
6 [Goal D] [Chicken S] [Farmer D] [Grain D] [Fox D] -> [Farmer S]
7 [Goal D] [Farmer S] [Chicken S] [Grain D] [Fox D] -> [Farmer D] [Chicken D]
Set them out as a decision table:This table recognizes the conditions as objects on specific banks. I.e., the predicate on same bank is not used.
1 2 3 4 5 6 7 Goal D D D D D D D Farmer S D S D S D S Chicken S D D D S S S Grain S S S D D D D Fox S S S S S D D Action Fa,C:D Fa:S Fa,G:D Fa,C:S Fa,F:D Fa:S Fa,C:D
Simplified the table:
N.B., if you end up with two columns that have identical condition entries but different actions, then an additional element in the environment that will provide an extra condition element, and will differ between the two rules, is required.
- Delete all rows which are constant for all columns.
- For each pair of columns with the same action, delete all condition entries which differ, and combine the columns.
1,7 2,6 3 4 5 Goal Farmer S D S D S Chicken S D D S Grain S D D Fox S S S Action Fa,C:D Fa:S Fa,G:D Fa,C:S Fa,F:D
Turn the decision table into productions and prioritize them:The productions are ordered by specificity (i.e., number of conditions), the most specific first.
3 [Farmer S] [Chicken D] [Grain S] [Fox S] -> [Farmer D] [Grain D]
4 [Farmer D] [Chicken D] [Grain D] [Fox S] -> [Farmer S] [Chicken S]
5 [Farmer S] [Chicken S] [Grain D] [Fox S] -> [Farmer D] [Fox D]
1,7 [Farmer S] [Chicken S] -> [Farmer D] [Chicken D]
2,6 [Farmer D] -> [Farmer S]
Add a terminating production:However there is still a problem with this. Once all of the items are on the destination bank, this set of production rules will compel the farmer to row on his own to the source bank! This can be prevented with a rule that recognizes the goal state and terminates the system.
[Farmer D] [Chicken D] [Grain D] [Fox D] -> [STOP]
This rule must be given the highest priority.
Domain-General Production SystemsThe productions described above are obviously only relevant in the very specific situation described. Also, they are unlikely to be much use for solving new problems. (And how were they acquired in the first place?) What is needed are productions that encode general problem solving behaviour.
For example, the means-ends strategy, described earlier, can be encoded thus:
Means-Ends Strategy ProductionsThis example is taken from (Anderson pp220-221.)
P1 IF the goal is to transform the current state into the goal state
and D is the largest difference between the states
THEN set as subgoals:
1) To eliminate the difference D.
2) To convert the resulting state into the goal state.
P2 IF the goal is to eliminate a difference D
and O is an operator relevant to reducing the difference
THEN set as a subgoal:
1) To apply O.
P3 IF the goal is to apply an operator O
and D is the most important difference between the application
condition of O and the current state
THEN set as subgoals:
1) To eliminate the difference D.
2) To apply the operator O.
The preceding rules generate the embedding of goals and subgoals. Eventually, an operator may be applied done by the following rule.
P4 IF the goal is to apply operator O
and there are no differences between the application condition of O and the
and operator O calls for action A
THEN set as a goal:
1) To perform A.
Goal A would be a domain specific production, such as in the problem above, e.g.,
P5 IF the goal is to move an object to a bank
THEN set as subgoals:
1) Place object in boat.
2) Row boat to bank.
The cognitive architecture SOAR incorporates a production system running general problem solving rules not unlike those described above but considerably more sophisticated, giving greater flexibility and power. This will be described in the next lecture.
ReferencesAnderson, J. R. 1985 "Cognitive Psychology and Its Implications" (Second Edition). W.H. Freeman and Company, New York.
Harel, D., 1987 "Algorithmics: The spirit of computing" Addison-Wesley.
This page is maintained by Richard Griffiths and does not necessarily reflect the official position of the University of Brighton.
Index Previous Next