Left: COGS Home Page
Up: COGS Home Page
LECTURE 2: PRODUCTION SYSTEMS
http://www.informatics.sussex.ac.uk/users/bend/cogmod/outline.html
- Background
- Mode of Working
- Worked Example
- Learning

BACKGROUND
- Used since earliest days of AI/Cognitive Science
specific individual or class of individuals
- Runnable symbolic representation
- Individual rules, modular chunks of expertise
- Focus of attention and ``working memory'' of
limited capacity
- Specific misconceptions can be modelled
- Increasing expertise can be modelled, e.g. by adding new rules

MODELLING WITH RULES
- Expert Systems
- Backward chaining (often)
- models goal-directed behaviour
- Production Systems
- Forward Chaining (often)
- models attention/data-directed behaviour

PRODUCTION SYSTEM COMPONENTS
- Working Memory
- Set of rules in a Production Memory
where each rule has:
- left hand side: pattern elements
-- specific tokens that might be in WM
-- variables that can match and retrieve values from WM elements
- right hand side: action elements
-- add tokens to WM
-- procedures e.g. to compute, to halt, to print
- Method of choosing which rule(s) to fire

CYCLE OF OPERATION
- Prime Working Memory with some initial content
- Find rules whose (LHS) pattern elements match WM
-- the Conflict Set
- If no rules match: halt
- Select rule from Conflict Set using
Conflict Resolution method
- ``Fire'' rule i.e. carry out actions on RHS of rule
-- adding new items to WM
-- carrying out computations
- Start next cycle -- goto 2

SOME CONFLICT RESOLUTION METHODS
- Recency in working memory
items more recently arriving in WM favoured
- Recency in production memory
rules more recently added take priority
- Refractoriness
same rule not allowed to fire more than once on exactly same items in WM
- Special Case
Rules with more (specific) conditions favoured
- Arbitrary choice

DECOMPOSITION and EQUAL ADDITIONS
7 4 minuend
- 2 8 subtrahend
-----
difference
7 4
- 2 8
-----

YOUNG AND O'SHEA SYSTEM -- Paper
FD: M =m, S =s => NextColumn, FindDiff
B2A: S > M => Borrow
BS1: Borrow => *AddTenToM
BS2: Borrow => *Decrement
CM: M =m, S =s => *Compare
IN: ProcessColumn => *ReadMandS
NXT: NextColumn => ProcessColumn, *ShiftLeft
TS: FindDiff => *TakeAbsDiff
WA: Result =x => *Write =x
DONE: NoMore => *HALT
B2C: S = M => NextColumn, Result 0
AC: Result 1 =x => *carry, Result =x

YOUNG AND O'SHEA SYSTEM -- POP11
fd: [m ?m][s ?s] => assert([nextcolumn]); assert([finddiff]);
b2a: [s greater m] => assert([borrow]);
bs1: [borrow] => addtentom();
bs2: [borrow] => decrement();
cm: [m ?m][s ?s] => compare();
in: [processcolumn] => readmands();
nxt: [nextcolumn] => assert([processcolumn]); shiftleft();
ts: [finddiff] => takeabsdiff();
wa: [result ?x] => write(x);
done: [nomore] => halt();
b2c: [s equals m] => assert([nextcolumn]); assert([result 0]);
ac: [result 1 ?x] => carry(); assert([result ^x])

YOUNG AND O'SHEA CONFLICT RESOLUTION METHOD
Reduce Conflict Set using these methods in this order:
- Refractoriness
- Recency in working memory
- Special Case
- Recency in production memory
- Arbitrary choice

CYCLE 1
The production rules available are:
[fd b2a bs1 bs2 cm in nxt ts wa done b2c ac]
PAPER:
*
7 4
2 8
------
WORKING MEMORY:
[processcolumn]
USING RULE:in
[processcolumn]=>readmands ( ) ;

CYCLE 2
PAPER:
*
7 4
2 8
------
WORKING MEMORY:
[s 8][m 4][processcolumn]
USING RULE:cm
[m ? m][s ? s]=>compare ( ) ;

CYCLE 3
PAPER:
*
7 4
2 8
------
WORKING MEMORY:
[s greater m][s 8][m 4][processcolumn]
USING RULE:b2a
[s greater m]=>assert ( [ borrow ] ) ;

CYCLE 4
PAPER:
*
7 4
2 8
------
WORKING MEMORY:
[borrow][s greater m][s 8][m 4][processcolumn]
USING RULE:bs2
[borrow]=>decrement ( ) ;

CYCLE 5
PAPER:
*
6 4
2 8
------
WORKING MEMORY:
[borrow][s greater m][s 8][m 4][processcolumn]
USING RULE:bs1
[borrow]=>addtentom ( ) ;

CYCLE 6
PAPER:
*
6 14
2 8
------
WORKING MEMORY:
[borrow][s greater m][s 8][m 4][processcolumn]
USING RULE:fd
[m ? m][s ? s]=>assert([nextcolumn]); assert([finddiff]);

MODELLING LEARNING -- 1
- adding new rules by hand
- subtraction examples
- Young's model of seriation -- TEACH * SERIATION
- Models ``stages'' of learning but not learning mechanism
- changing architectural features of overall system
e.g. change size of working memory, rate of change of activation
of WM elements
(Jones, G. Ritter, F.E., Wood, D.J. (2000)
Using a cognitive architecture to examine what develops,
Psychological Science)

MODELLING LEARNING -- 2
Anderson's work on ACT* (page 335-336 Green et al.)
- declarative to procedural transformation
- WM elements also have a degree of activation: used by conflict
resolution method
- changing rules dynamically
- If pair of rules normally fire in sequence -- combine
into a single more complex rule.
- generalize rules by generalizing patterns
- discriminate cases by adding special purpose rules
- Models ``stages'' of learning and learning mechanism
See also work on SOAR (page 335-336 Green et al.)

PRODUCTION SYSTEMS CONCLUSION
- Background
- Mode of Working
- Worked Example
- Learning


Left: COGS Home Page
Up: COGS Home Page
Benedict du Boulay, Cognitive Modelling web pages updated on Sunday 5 May 2002