Modeling Primitive Skill Elements in Soar

Slides:



Advertisements
Similar presentations
Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
Advertisements

Programming Languages and Paradigms
1 Programming Languages (CS 550) Lecture Summary Functional Programming and Operational Semantics for Scheme Jeremy R. Johnson.
The Assembly Language Level
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
Common Sub-expression Elim Want to compute when an expression is available in a var Domain:
1 Episodic Memory for Soar Andrew Nuxoll 15 June 2005.
1 Episodic Memory for Soar Agents Andrew Nuxoll 11 June 2004.
Impact of Working Memory Activation on Agent Design John Laird, University of Michigan 1.
1 Soar Semantic Memory Yongjia Wang University of Michigan.
A Soar’s Eye View of ACT-R John Laird 24 th Soar Workshop June 11, 2004.
Chapter 9: Subprogram Control
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
Composing Dataflow Analyses and Transformations Sorin Lerner (University of Washington) David Grove (IBM T.J. Watson) Craig Chambers (University of Washington)
Precision Going back to constant prop, in what cases would we lose precision?
New SVS Implementation Joseph Xu Soar Workshop 31 June 2011.
-1- Philipp Heim, Thomas Ertl, Jürgen Ziegler Facet Graphs: Complex Semantic Querying Made Easy Philipp Heim 1, Thomas Ertl 1 and Jürgen Ziegler 2 1 Visualization.
1 Names, Scopes and Bindings Aaron Bloomfield CS 415 Fall
Compilation and Instruction ACT-R Post Graduate Summer School 2001 Coolfont Resort ACT-R Home Page: John R. Anderson Psychology.
1.1 CAS CS 460/660 Introduction to Database Systems Relational Algebra.
UMBC CMSC Common Lisp II. UMBC CMSC Input and Output Print is the most primitive output function > (print (list 'foo 'bar)) (FOO BAR) The.
CSCE 240 – Intro to Software Engineering Lecture 3.
Knowledge Representation. A knowledge base can be organised in several different configurations to facilitate fast inferencing Knowledge Representation.
Jacob Crossman With help from Bob Marinier Anthony Deschamps
Knowledge Representation and Reasoning
Run-Time Environments Chapter 7
Efficient Evaluation of XQuery over Streaming Data
Learning Fast and Slow John E. Laird
CPS216: Data-intensive Computing Systems
Chapter 14: System Protection
6.001 Jeopardy.
CS 326 Programming Languages, Concepts and Implementation
Implementing Subprograms
The DE Language Erik Reeber 6/30/04.
Understanding Agent Knowledge through Conversation
Ch. 4 – Semantic Analysis Errors can arise in syntax, static semantics, dynamic semantics Some PL features are impossible or infeasible to specify in grammar.
Knowledge Representation and Reasoning
Process & Logic Modeling
PROGRAMME F10 FUNCTIONS.
Linked Lists head One downside of arrays is that they have a fixed size. To solve this problem of fixed size, we’ll relax the constraint that the.
Soar 9.6.0’s Instance-Based Model of Semantic Memory
Knowledge Representation
Nondeterministic Evaluation
Data Structures (CS212D) Overview & Review.
Relational Algebra 461 The slides for this text are organized into chapters. This lecture covers relational algebra, from Chapter 4. The relational calculus.
Achieving parsimony between NGS and the Michigan approach
Chapter 5 - Functions Outline 5.1 Introduction
6.001 SICP Data abstractions
Arrays and Linked Lists
Memory and Thought Chapter 3.
John E. Laird 32nd Soar Workshop
Playing with Semantic Memory
Chapter 6 Methods: A Deeper Look
Algorithm An algorithm is a finite set of steps required to solve a problem. An algorithm must have following properties: Input: An algorithm must have.
Bryan Stearns University of Michigan Soar Workshop - May 2018
Bryan Stearns University of Michigan Soar Workshop - May 2018
Learning the Task Definition of Games through ITL
Coding Concepts (Basics)
Hierarchical Search on DisCSPs
Chapter 14: Protection.
Hierarchical Modeling & Constructive Solid Geometry
Languages and Compilers (SProg og Oversættere)
Lecture 14: The environment model (cont
COP 3330 Object-oriented Programming in C++
How to use hash tables to solve olympiad problems
Hierarchical Search on DisCSPs
Common Lisp II.
ECE 352 Digital System Fundamentals
Lecture-Hashing.
Presentation transcript:

Modeling Primitive Skill Elements in Soar Bryan Stearns University of Michigan June 2016

Outline Motivation PRIMs Theory: Primitive Skill Elements Rule Composition PRIMs in Soar Learning Operator Composition Roadmap Conclusion

Primitive Skill Elements Learning is a composition of procedural knowledge What are the primitive building blocks of that knowledge? Tic Tac Toe Find a Move Move Piece Search Ask Pickup Place And how may those primitive building blocks be exploited to learn more complex structures and procedures? Op 1 Op 2 Op 3 Op 1 Op 2 Op 3 ?

Objectives Identify the primitive building blocks of procedural knowledge in Soar Is there a fundamental set of operators? How may these be composed via chunking? Exploit primitives for construction of more complex structures and procedures Increasing the range of knowledge manipulation Learning internal tasks sp my*rule { (state <s> ^operator <o> ^stack-size <x> -^possession <p> ^output-link <ol>) (<o> ^name lift-stack) --> (<ol> ^action lift-stack) (<s> ^possession <x> -^stack-size <x>) } graphic

Outline Motivation PRIMs Theory: Primitive Skill Elements Rule Composition PRIMs in Soar Learning Operator Composition Roadmap Conclusion

Original PRIMs Model (Taatgen, 2013) Primitive Information Processing Elements Actransfer: An extension of ACT-R (Anderson, 2007) Any rule may be constructed from three primitive memory operations Compare (==, <>) Copy Retrieve Constant example*pseudo*rule { IF (Goal is “pick up stack”) AND (Stack has <X> blocks) THEN (Set output to “lift stack”) (Set stack to 0 blocks) (Set possession to <X> blocks) } “Learning any skill leads to combinations of these building blocks.” – Niels Taatgen

PRIMs Need Memory Elements Each PRIM represents fixed processing on specific memory locations, not values Below, “compare1” is a different PRIM from “compare2” Three PRIM types, many combinations of memory elements Compare (2 elements) Copy (2 elements) Retrieve Constant (1 element) Rules on same elements but different constants share PRIMs compare1 compare2 copy1 retrieve Exchanges Among Fixed Memory Locations

Receiving Instructions The user gives the agent a rule in terms of PRIMs Constants are separated from condition and action PRIMs Each PRIM is linked in declarative memory under an instruction head The head contains any constants When manually evaluating instructions, constants are loaded first pp {my*production # Constants: <const1> := |pick up stack| <const2> := |lift stack| <const3> := 0 -- # Conditions: <goal> == <const1> --> # Actions: <output> := <const2> <stack> := <const3> <possession> := <x> } “Sequencing in diagram to show evaluation process” goal == const1 output := const2 stack := const3 possession := x My Production const1 := “pick up stack” const2 := “lift stack” const3 := 0

Example: Iterating Numbers Count Init const1 := “order” input1 <> nil var1 == nil var1 := input1 output := var1 cue1 := const1 cue2 := var1 retrieved <> input2 Count Step const1 := “order” Query cue1 = “order” cue2 = “2” Result retrieved = “3” var1:= retrieved retrieved == input2 Count Final const1 := “done” output := var1 status := const1 Input input1 = “2” input2 = “5” Output “2 3 4 5”

Example: Iterating Semantics Category Init const1 := “isa” input1 <> nil var1 == nil var1 := input1 output := var1 cue1 := const1 cue2 := var1 retrieved <> input2 Category Step const1 := “isa” Query cue1 = “isa” cue2 = “cat” Result retrieved = “feline” var1:= retrieved retrieved == input2 Category Final const1 := “done” output := var1 status := const1 Input input1 = “cat” input2 = “animal” Output “cat feline mammal animal”

Outline Motivation PRIMs Theory: Primitive Skill Elements Rule Composition PRIMs in Soar Learning Operator Composition Roadmap Conclusion

Soar PROPs Define PROPs as PRIMs applied to Soar Primitive Operator Processing Elements Let each PROP be an operator implementing a primitive information processing element: Condition primitives ==, <>, <=>, >, <, >=, <=, disjunction Action primitives add-wme, remove-wme, operator preferences, RHS functions Restrict ID:attribute pairs to have only one value at a time for primitive operations Compose PROPs bottom-up through a substate hierarchy into more complex operators

Learning Operator Composition Build up a useful hierarchical composition of PROPs before chunking the instructions Shared composition accelerates deliberate evaluation Composed PROPs enable simpler user-given instructions High level operator Place Block Production Operator Op 1 Op 2 More complex operator Learning Transfer PROPs

Learning Process Receive instructions and represent them in working memory (Each node depicted corresponds to an operator) (Each level depicted corresponds to a substate) Instructions state 1 Instructions state 2 sp apply*prop*eq { (state <s> ^operator <o>) (<o> ^name prop_eq ^ID1 <id1> ^attr1 <attr1> ^ID2 <id2> ^attr2 <attr2>) (<id1> ^<attr1> <val>) (<id2> ^<attr2> <val>) --> … # Return Success } ^2 “foo” ^1 “bar” const “equality” const 1 S1 “name” == ^type ^ID1 ^attr1 ^ID2 ^attr2 ^condition ^action Instructions

Learning Process Manually evaluate and perform instructions over the lifetime of the agent Until the full operator is chunked, deliberately follow instructions each time Keep a count of how frequently each pair of PROPs are evaluated together Repeatedly combine common pairs of PROPs into new symbols The new symbol will be evaluated as its own new operator A B X Y Z Instructions C D E X Y Instructions +1 +1 A B X Y Z Instructions A B Z XY Instructions X Y A B X Y Z Instructions

Learning Process Once a full hierarchy is learned, the entire instruction set may be chunked to avoid future deliberate primitive instruction evaluation New learned operators may be used instead of PROPs in higher level instructions state 1 Instructions Instructions state 2 chunked apply rule state 3 state 4 Operator 42 Operator 16 Operator 1 Operator 2 Operator 3

The Result Operator 16 Operator 1 Operator 2

The Result Tic Tac Toe Find a Move Move Piece Search Ask Pickup Place Op 3 Op 1 Op 2 Op 3

Roadmap Basic PROPs learning Elaboration learning (from conditions) Interactive labeling of new operators Retroactive instruction modification Plan

Conclusion Nuggets Coal Can be taught procedural reasoning from scratch Low-level may quickly be extended to high-level Learned hierarchy can be made viewable and labelable Coal Not yet implemented/tested Writing PROPs instructions requires expert knowledge ID:attr pairs referenced by PROPs must be kept unique until those PROPs are chunked Takeaway: Separating task-specific constants from task-general rule knowledge allows:

Bibliography Anderson, J. R. (2007). How can the human mind occur in the physical universe? doi:10.1093/acprof:oso/9780195324259.001.0001 Taatgen, N.A. (2013). The nature and transfer of cognitive skills. Psychological Review, 120(3), 439-471. 

Modeling Primitive Skill Elements in Soar Bryan Stearns Questions?

Declarative Instructions The agent is given primitive instructions for information processing As instructions are deliberately evaluated the agent learns which combinations of instruction-elements are most common Such elements are repeatedly combined to learn a hierarchical composition Once the full composition is learned, the instructions may be chunked into a single task-specific operator input <> nil var1 == nil --> var1 := input1 output := var1 cue1 := const1 input <> nil var1 == nil --> var1 := input1 output := var1 cue1 := “order” var1 := input1 output := var1 input1 <> nil var1 == nil Count Init const1 := “order” input1 <> nil var1 == nil output := var1 var1 := input1 output := var1 cue1 := const1 var1 := input1 cue1 := const1

Learning a Rule Hierarchy task*specific*42 { (slot1 == “foo”) (slot2 <> “bar”) --> (slot3 := slot2) (slot2 := “foo”) (slot1 := “bar”) } { … (slot2 := const1) (slot1 := const2) task*general { (slot1 == const1) (slot2 <> const2) task*specific*43 { (slot1 == “goo”) (slot2 <> “car”) (slot2 := “goo”) (slot1 := “car”)

CONDITION ACTION EMACS EDT ED Image: (Taatgen, 2013)

Gradually Chunking PROPs Keep a frequency count of co-occurring PROPs If this count passes a threshold, chunk a new operator combining the pair Once the hierarchy is learned, the instructions may be chunked into an operator implemented by a chunked rule Count Init

Learning Primitive Composition Primitives are combined until a task-specific rule is learned Combinations may be shared with new rules Image credit: (Taatgen, 2013) Down vs up

Growing PRIMs Combinations load constants slot conditions slot actions RULE 42 task*general { (slot1 == const1) (slot2 <> const2) --> (slot3 := slot2) (slot2 := const1) (slot1 := const2) } rule42*constants { (goal == rule42) --> (const1 := foo) (const2 := bar) } task*specific*42 { (goal == rule42) (slot1 == “foo”) (slot2 <> “bar”) --> (slot3 := slot2) (slot2 := “foo”) (slot1 := “bar”) }

Growing PRIMs Combinations load constants slot conditions slot actions RULE 43 task*general { (slot1 == const1) (slot2 <> const2) --> (slot3 := slot2) (slot2 := const1) (slot1 := const2) } rule43*constants { (goal == rule43) --> (const1 := goo) (const2 := car) } TASK-GENERAL SKILL TRANSFERRED FROM RULE42 task*specific*43 { (goal == rule43) (slot1 == “goo”) (slot2 <> “car”) --> (slot3 := slot2) (slot2 := “goo”) (slot1 := “car”) }

Using Variables Soar does not use fixed memory slots There are infinitely many possible attributes WMEs are referenced via relations Conditions and actions can’t be broken apart without losing relation constraints S1 foo 42 bar 43 If (S1 ^bar <v2>) <> (S1 ^foo <v1>) If (S1 ^bar <v2>) <> (S1 ^foo <v1>) Remove S1 ^bar <v2>

Variable Solution Restrict WMEs to behave like unique slots Let an ID:attribute pair represent a unique slot It may only have one value at a time (at first) As composite operators/rules are built, this restriction may be weaned away S1 foo 42 bar1 bar2 43 If (S1 ^bar2 <v2>) <> (S1 ^foo <v1>) Remove S1 ^bar2 <v2>