SlideShare uma empresa Scribd logo
1 de 50
Pat Langley Computational Learning Laboratory Center for the Study of Language and Information Stanford University, Stanford, California http://cll.stanford.edu/ Learning Hierarchical Task Networks from Problem Solving Thanks to Dongkyu Choi, Kirstin Cummings, Seth Rogers, and Daniel Shapiro for contributions to this research, which was funded by Grant HR0011-04-1-0008 from DARPA IPTO and by Grant IIS-0335353 from NSF.
Classical Approaches to Planning Classical Planning Generated plan Operators Problem ?
Planning with Hierarchical Task Networks HTN Planning Generated plan Problem ? Task Network
Classical and HTN Planning ,[object Object],[object Object],[object Object]
Mixed Classical / HTN Planning HTN Planning impasse? Classical Planning yes no Generated plan Problem ? Task Network Operators
Learning HTNs from Classical Planning HTN Planning impasse? Classical Planning yes no HTN Learning Generated plan Problem ? Task Network Operators
Four Contributions of the Research ,[object Object],[object Object],[object Object],[object Object]
A New Representational Formalism ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],This special class of hierarchical task networks can be executed reactively but in a goal-directed manner (Nilsson, 1994). A  teleoreactive logic program  consists of three components:
Some Defined Concepts (Axioms) (clear (?block)  :percepts ((block ?block))  :negatives ((on ?other ?block))) (hand-empty (  )  :percepts ((hand ?hand status ?status))  :tests  ((eq ?status 'empty))) (unstackable (?block ?from)  :percepts ((block ?block) (block ?from))  :positives ((on ?block ?from) (clear ?block) (hand-empty))) (pickupable (?block ?from)  :percepts ((block ?block) (table ?from))  :positives ((ontable ?block ?from) (clear ?block) (hand-empty))) (stackable (?block ?to)  :percepts  ((block ?block) (block ?to))  :positives ((clear ?to) (holding ?block))) (putdownable (?block ?to)  :percepts ((block ?block) (table ?to))  :positives ((holding ?block)))
Some Primitive Skills (Operators) (unstack (?block ?from)  :percepts ((block ?block ypos ?ypos) (block ?from))  :start (unstackable ?block ?from)  :actions (( * grasp ?block) ( * vertical-move ?block (+ ?ypos 10)))  :effects  ((clear ?from) (holding ?block))) (pickup (?block ?from)  :percepts ((block ?block) (table ?from height ?height))  :start  (pickupable ?block ?from)  :effects  ((holding ?block))) (stack (?block ?to)  :percepts ((block ?block) (block ?to xpos ?xpos ypos ?ypos height ?height))  :start  (stackable ?block ?to)  :effects  ((on ?block ?to) (hand-empty))) (putdown (?block ?to)  :percepts  ((block ?block) (table ?to xpos ?xpos ypos ?ypos height ?height))  :start  (putdownable ?block ?to)  :effects  ((ontable ?block ?to) (hand-empty)))
Some NonPrimitive Recursive Skills (clear (?C)  :percepts ((block ?D) (block ?C))  :start (unstackable ?D ?C)  :skills ((unstack ?D ?C))) (clear (?B)  :percepts  ((block ?C)  (block ?B))  :start [(on ?C ?B)  (hand-empty)]  :skills ((unstackable ?C ?B)  (unstack ?C ?B))) (unstackable (?C ?B)  :percepts ((block ?B)  (block ?C))  :start  [(on ?C ?B)  (hand-empty)]  :skills ((clear ?C)  (hand-empty))) (hand-empty (  )  :percepts  ((block ?D)  (table ?T1))  :start  (putdownable ?D ?T1)  :skills  ((putdown ?D ?T1))) [Expanded for readability] Teleoreactive logic programs are executed in a top-down, left-to-right manner, much as in Prolog but extended over  time, with a single path being selected on each time step.
Interleaving HTN Execution and Classical Planning Solve(G)   Push the goal literal G onto the empty goal stack GS.   On each cycle,   If the top goal G of the goal stack GS is satisfied,   Then pop GS.   Else if the goal stack GS does not exceed the depth limit,   Let S be the skill instances whose heads unify with G.   If any applicable skill paths start from an instance in S,   Then select one of these paths and execute it.   Else let M be the set of primitive skill instances that have not already failed in which G is an effect.   If the set M is nonempty,   Then select a skill instance Q from M.   Push the start condition C of Q onto goal stack GS. Else if G is a complex concept with the unsatisfied subconcepts H and with satisfied subconcepts F,   Then if there is a subconcept I in H that has not yet failed,   Then push I onto the goal stack GS.   Else pop G from the goal stack GS and store information about failure with G's parent.   Else pop G from the goal stack GS.   Store information about failure with G's parent. This is traditional means-ends analysis, with three exceptions: (1) conjunctive  goals must be defined concepts; (2) chaining occurs over both skills/operators and concepts/axioms; and (3) selected skills are executed whenever applicable.
A Successful Planning Trace (ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) initial state goal A B C B A C
Three Questions about HTN Learning ,[object Object],[object Object],[object Object],The answers follow naturally from our representation and from our approach to plan generation.
Recording Results for Learning Solve(G)   Push the goal literal G onto the empty goal stack GS.   On each cycle,   If the top goal G of the goal stack GS is satisfied,   Then pop GS  and let New be Learn(G).   If G's parent P involved skill chaining,   Then store New as P's first subskill.   Else if G's parent P involved concept chaining,   Then store New as P's next subskill.   Else if the goal stack GS does not exceed the depth limit,   Let S be the skill instances whose heads unify with G.   If any applicable skill paths start from an instance in S,   Then select one of these paths and execute it.   Else let M be the set of primitive skill instances that have not already failed in which G is an effect.   If the set M is nonempty,   Then select a skill instance Q from M,  store Q with goal G as its last subskill,   Push the start condition C of Q onto goal stack GS , and mark goal G as involving skill chaining.   Else if G is a complex concept with the unsatisfied subconcepts H and with satisfied subconcepts F,   Then if there is a subconcept I in H that has not yet failed,   Then push I onto the goal stack GS,  store F with G as its initially true subconcepts,  and mark goal G as involving concept chaining.   Else pop G from the goal stack GS and store information about failure with G's parent.   Else pop G from the goal stack GS.   Store information about failure with G's parent. The extended problem solver calls on  Learn  to construct a new skill clause and stores the information it needs in the goal stack generated during search.
Three Questions about HTN Learning ,[object Object],[object Object],[object Object],[object Object]
(ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) 1 skill chaining Constructing Skills from a Trace A B C B A C
(ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) 1 2 skill chaining Constructing Skills from a Trace A B C B A C
(ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) 1 3 2 concept chaining Constructing Skills from a Trace A B C B A C
(ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) 1 3 2 4 skill chaining Constructing Skills from a Trace A B C B A C
Learned Skills After Structure Determined (<head>  (?C)  :percepts ((block ?D) (block ?C))  :start <condition>  :skills ((unstack ?D ?C))) (<head>  (?B)  :percepts  ((block ?C)  (block ?B))  :start <condition>  :skills ((unstackable ?C ?B)  (unstack ?C ?B))) (<head>  (?C ?B)  :percepts ((block ?B)  (block ?C))  :start  <condition>  :skills ((clear ?C)  (hand-empty))) (<head>  (  )  :percepts  ((block ?D)  (table ?T1))  :start  <condition>  :skills  ((putdown ?D ?T1)))
Three Questions about HTN Learning ,[object Object],[object Object],[object Object],[object Object],[object Object]
Learned Skills After Heads Inserted (clear (?C)  :percepts ((block ?D) (block ?C))  :start <condition>  :skills ((unstack ?D ?C))) (clear (?B)  :percepts  ((block ?C)  (block ?B))  :start <condition>  :skills ((unstackable ?C ?B)  (unstack ?C ?B))) (unstackable (?C ?B)  :percepts ((block ?B)  (block ?C))  :start  <condition>  :skills ((clear ?C)  (hand-empty))) (hand-empty (  )  :percepts  ((block ?D)  (table ?T1))  :start  <condition>  :skills  ((putdown ?D ?T1)))
Three Questions about HTN Learning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Learned Skills After Conditions Inferred (clear (?C)  :percepts ((block ?D) (block ?C))  :start (unstackable ?D ?C)  :skills ((unstack ?D ?C))) (clear (?B)  :percepts  ((block ?C)  (block ?B))  :start [(on ?C ?B)  (hand-empty)]  :skills ((unstackable ?C ?B)  (unstack ?C ?B))) (unstackable (?C ?B)  :percepts ((block ?B)  (block ?C))  :start  [(on ?C ?B)  (hand-empty)]  :skills ((clear ?C)  (hand-empty))) (hand-empty ( )  :percepts  ((block ?D)  (table ?T1))  :start  (putdownable ?D ?T1)  :skills  ((putdown ?D ?T1)))
Learning an HTN Method from a Problem Solution Learn(G)   If the goal G involves skill chaining,   Then let S 1  and S 2  be G's first and second subskills.   If subskill S 1  is empty,   Then return the literal for clause S 2 .   Else create a new skill clause N with head G,   with S 1  and S 2  as ordered subskills, and   with the same start condition as subskill S 1 .   Return the literal for skill clause N.   Else if the goal G involves concept chaining,   Then let {C k+1 , ..., C n } be G's initially satisfied subconcepts.   Let {C 1 , ..., C k } be G's stored subskills.   Create a new skill clause N with head G,   with {C k+1 , ..., C n } as ordered subskills, and   with the conjunction of {C 1 , ..., C k } as start condition.   Return the literal for skill clause N.
Creating a Clause from Skill Chaining Problem Solution New Method 1 8 3 X Z 2 8 1 2 X Z Y
Creating a Clause from Concept Chaining Problem Solution New Method 8 2 1 Y B X C Z D A A D # B 8 3 Z C
Important Features of Learning Method ,[object Object],[object Object],[object Object],Our approach to learning HTNs has some important features:  In these ways, it is similar to explanation-based approaches to learning from problem solving. However, the method for finding conditions involves neither analytic or inductive learning in their traditional senses.
An In-City Driving Environment Our focus on learning for reactive control comes from an interest in complex physical domains, such as driving a vehicle in a city. To study this problem, we have developed a realistic simulated environment that can support many different driving tasks.
Skill Clauses Learning for In-City Driving parked (?ME ?G1152)   :percepts ( (lane-line ?G1152) (self ?ME))   :start (  )   :skills ( (in-rightmost-lane ?ME ?G1152)     (stopped ?ME))  in-rightmost-lane (?ME ?G1152)   :percepts ( (self ?ME) (lane-line ?G1152))   :start  ( (last-lane ?G1152))   :skills  ( (driving-in-segment ?ME ?G1101 ?G1152)) driving-in-segment (?ME ?G1101 ?G1152)   :percepts ( (lane-line ?G1152) (segment ?G1101) (self ?ME))   :start  ( (steering-wheel-straight ?ME))   :skills  ( (in-lane ?ME ?G1152)   (centered-in-lane ?ME ?G1101 ?G1152)   (aligned-with-lane-in-segment ?ME ?G1101 ?G1152)   (steering-wheel-straight ?ME))
Learning Curves for In-City Driving
Transfer Studies of HTN Learning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Transfer Effects in the Blocks World On 20-block tasks, there is no difference in solved problems.  20 blocks
Transfer Effects in the Blocks World However, there is difference in the effort needed to solve them.  20 blocks
FreeCell Solitaire FreeCell is a full-information card game that, in most cases, can be solved by planning; it also has a highly recursive structure.
Transfer Effects in FreeCell On 16-card FreeCell tasks, prior training aids solution probability. 16 cards
Transfer Effects in FreeCell However, it also lets the system solve problems with less effort.  16 cards
Transfer Effects in FreeCell On 20-card tasks, the benefits of prior training are much stronger. 20 cards
Transfer Effects in FreeCell However, it also lets the system solve problems with less effort.  20 cards
Where is the Utility Problem? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Related Work on Planning and Execution ,[object Object],[object Object],[object Object],[object Object],Our approach to planning and execution bears similarities to:  These mappings are valid but provide no obvious approach to learning HTN structures from successful plans. ,[object Object],[object Object],Other mappings between classical and HTN planning come from:
Related Research on Learning ,[object Object],[object Object],[object Object],[object Object],Our learning mechanisms are similar to those in earlier work on:   which also learned decomposition rules from problem solutions.  ,[object Object],[object Object],[object Object],But they do not rely on analytical schemes like goal regression, and their creation of hierarchical structures is closer to that by:
The I CARUS  Architecture Long-Term Conceptual Memory Long-Term Skill Memory Short-Term Conceptual Memory Goal/Skill Stack Categorization and Inference Skill Execution Perception Environment Perceptual Buffer Problem Solving Skill Learning Motor Buffer Skill Retrieval
Hierarchical Structure of Long-Term Memory concepts skills Each concept is defined in terms of other concepts and/or percepts. Each skill is defined in terms of other skills, concepts, and percepts. I CARUS  organizes both concepts and skills in a hierarchical manner.
Interleaved Nature of Long-Term Memory For example, the skill highlighted here refers directly to the highlighted concepts. I CARUS  interleaves its long-term memories for concepts and skills. concepts skills
Recognizing Concepts and Selecting Skills concepts skills Concepts are matched bottom up, starting from percepts. Skill paths are matched top down, starting from intentions. I CARUS  matches patterns to recognize concepts and select skills.
Directions for Future Work ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],We have described an approach to planning and execution that: This approach holds promise for bridging the longstanding divide between two major paradigms for planning.  Concluding Remarks
End of Presentation

Mais conteúdo relacionado

Semelhante a Classical And Htn Planning

Cs221 logic-planning
Cs221 logic-planningCs221 logic-planning
Cs221 logic-planningdarwinrlo
 
Cs221 lecture7-fall11
Cs221 lecture7-fall11Cs221 lecture7-fall11
Cs221 lecture7-fall11darwinrlo
 
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08Praveen Kumar
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1Stavros Vassos
 
Declarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere MortalsDeclarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere MortalsBertram Ludäscher
 
Unit 5 Introduction to Planning and ANN.pptx
Unit 5 Introduction to Planning and ANN.pptxUnit 5 Introduction to Planning and ANN.pptx
Unit 5 Introduction to Planning and ANN.pptxDrYogeshDeshmukh1
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1Stavros Vassos
 
What can scala puzzlers teach us
What can scala puzzlers teach usWhat can scala puzzlers teach us
What can scala puzzlers teach usDaniel Sobral
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqssaadkhan672
 
09 logic programming
09 logic programming09 logic programming
09 logic programmingsaru40
 
Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit isonalisraisoni
 

Semelhante a Classical And Htn Planning (20)

Cs221 logic-planning
Cs221 logic-planningCs221 logic-planning
Cs221 logic-planning
 
Cs221 lecture7-fall11
Cs221 lecture7-fall11Cs221 lecture7-fall11
Cs221 lecture7-fall11
 
Planning
PlanningPlanning
Planning
 
Planning
PlanningPlanning
Planning
 
Chapter02b
Chapter02bChapter02b
Chapter02b
 
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
 
20 prolog5
20 prolog520 prolog5
20 prolog5
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
 
Declarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere MortalsDeclarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere Mortals
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
"Let us talk about output features! by Florence d’Alché-Buc, LTCI & Full Prof...
"Let us talk about output features! by Florence d’Alché-Buc, LTCI & Full Prof..."Let us talk about output features! by Florence d’Alché-Buc, LTCI & Full Prof...
"Let us talk about output features! by Florence d’Alché-Buc, LTCI & Full Prof...
 
Unit 5 Introduction to Planning and ANN.pptx
Unit 5 Introduction to Planning and ANN.pptxUnit 5 Introduction to Planning and ANN.pptx
Unit 5 Introduction to Planning and ANN.pptx
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
 
Jeop game-final-review
Jeop game-final-reviewJeop game-final-review
Jeop game-final-review
 
What can scala puzzlers teach us
What can scala puzzlers teach usWhat can scala puzzlers teach us
What can scala puzzlers teach us
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqs
 
09 logic programming
09 logic programming09 logic programming
09 logic programming
 
Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit i
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
 

Mais de ahmad bassiouny (20)

Work Study & Productivity
Work Study & ProductivityWork Study & Productivity
Work Study & Productivity
 
Work Study
Work StudyWork Study
Work Study
 
Motion And Time Study
Motion And Time StudyMotion And Time Study
Motion And Time Study
 
Motion Study
Motion StudyMotion Study
Motion Study
 
The Christmas Story
The Christmas StoryThe Christmas Story
The Christmas Story
 
Turkey Photos
Turkey PhotosTurkey Photos
Turkey Photos
 
Mission Bo Kv3
Mission Bo Kv3Mission Bo Kv3
Mission Bo Kv3
 
Miramar
MiramarMiramar
Miramar
 
Mom
MomMom
Mom
 
Linearization
LinearizationLinearization
Linearization
 
Kblmt B000 Intro Kaizen Based Lean Manufacturing
Kblmt B000 Intro Kaizen Based Lean ManufacturingKblmt B000 Intro Kaizen Based Lean Manufacturing
Kblmt B000 Intro Kaizen Based Lean Manufacturing
 
How To Survive
How To SurviveHow To Survive
How To Survive
 
Dad
DadDad
Dad
 
Ancient Hieroglyphics
Ancient HieroglyphicsAncient Hieroglyphics
Ancient Hieroglyphics
 
Dubai In 2009
Dubai In 2009Dubai In 2009
Dubai In 2009
 
DesignPeopleSystem
DesignPeopleSystemDesignPeopleSystem
DesignPeopleSystem
 
Organizational Behavior
Organizational BehaviorOrganizational Behavior
Organizational Behavior
 
Work Study Workshop
Work Study WorkshopWork Study Workshop
Work Study Workshop
 
Workstudy
WorkstudyWorkstudy
Workstudy
 
Time And Motion Study
Time And  Motion  StudyTime And  Motion  Study
Time And Motion Study
 

Último

The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsRommel Regala
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 

Último (20)

The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 

Classical And Htn Planning

  • 1. Pat Langley Computational Learning Laboratory Center for the Study of Language and Information Stanford University, Stanford, California http://cll.stanford.edu/ Learning Hierarchical Task Networks from Problem Solving Thanks to Dongkyu Choi, Kirstin Cummings, Seth Rogers, and Daniel Shapiro for contributions to this research, which was funded by Grant HR0011-04-1-0008 from DARPA IPTO and by Grant IIS-0335353 from NSF.
  • 2. Classical Approaches to Planning Classical Planning Generated plan Operators Problem ?
  • 3. Planning with Hierarchical Task Networks HTN Planning Generated plan Problem ? Task Network
  • 4.
  • 5. Mixed Classical / HTN Planning HTN Planning impasse? Classical Planning yes no Generated plan Problem ? Task Network Operators
  • 6. Learning HTNs from Classical Planning HTN Planning impasse? Classical Planning yes no HTN Learning Generated plan Problem ? Task Network Operators
  • 7.
  • 8.
  • 9. Some Defined Concepts (Axioms) (clear (?block) :percepts ((block ?block)) :negatives ((on ?other ?block))) (hand-empty ( ) :percepts ((hand ?hand status ?status)) :tests ((eq ?status 'empty))) (unstackable (?block ?from) :percepts ((block ?block) (block ?from)) :positives ((on ?block ?from) (clear ?block) (hand-empty))) (pickupable (?block ?from) :percepts ((block ?block) (table ?from)) :positives ((ontable ?block ?from) (clear ?block) (hand-empty))) (stackable (?block ?to) :percepts ((block ?block) (block ?to)) :positives ((clear ?to) (holding ?block))) (putdownable (?block ?to) :percepts ((block ?block) (table ?to)) :positives ((holding ?block)))
  • 10. Some Primitive Skills (Operators) (unstack (?block ?from) :percepts ((block ?block ypos ?ypos) (block ?from)) :start (unstackable ?block ?from) :actions (( * grasp ?block) ( * vertical-move ?block (+ ?ypos 10))) :effects ((clear ?from) (holding ?block))) (pickup (?block ?from) :percepts ((block ?block) (table ?from height ?height)) :start (pickupable ?block ?from) :effects ((holding ?block))) (stack (?block ?to) :percepts ((block ?block) (block ?to xpos ?xpos ypos ?ypos height ?height)) :start (stackable ?block ?to) :effects ((on ?block ?to) (hand-empty))) (putdown (?block ?to) :percepts ((block ?block) (table ?to xpos ?xpos ypos ?ypos height ?height)) :start (putdownable ?block ?to) :effects ((ontable ?block ?to) (hand-empty)))
  • 11. Some NonPrimitive Recursive Skills (clear (?C) :percepts ((block ?D) (block ?C)) :start (unstackable ?D ?C) :skills ((unstack ?D ?C))) (clear (?B) :percepts ((block ?C) (block ?B)) :start [(on ?C ?B) (hand-empty)] :skills ((unstackable ?C ?B) (unstack ?C ?B))) (unstackable (?C ?B) :percepts ((block ?B) (block ?C)) :start [(on ?C ?B) (hand-empty)] :skills ((clear ?C) (hand-empty))) (hand-empty ( ) :percepts ((block ?D) (table ?T1)) :start (putdownable ?D ?T1) :skills ((putdown ?D ?T1))) [Expanded for readability] Teleoreactive logic programs are executed in a top-down, left-to-right manner, much as in Prolog but extended over time, with a single path being selected on each time step.
  • 12. Interleaving HTN Execution and Classical Planning Solve(G) Push the goal literal G onto the empty goal stack GS. On each cycle, If the top goal G of the goal stack GS is satisfied, Then pop GS. Else if the goal stack GS does not exceed the depth limit, Let S be the skill instances whose heads unify with G. If any applicable skill paths start from an instance in S, Then select one of these paths and execute it. Else let M be the set of primitive skill instances that have not already failed in which G is an effect. If the set M is nonempty, Then select a skill instance Q from M. Push the start condition C of Q onto goal stack GS. Else if G is a complex concept with the unsatisfied subconcepts H and with satisfied subconcepts F, Then if there is a subconcept I in H that has not yet failed, Then push I onto the goal stack GS. Else pop G from the goal stack GS and store information about failure with G's parent. Else pop G from the goal stack GS. Store information about failure with G's parent. This is traditional means-ends analysis, with three exceptions: (1) conjunctive goals must be defined concepts; (2) chaining occurs over both skills/operators and concepts/axioms; and (3) selected skills are executed whenever applicable.
  • 13. A Successful Planning Trace (ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) initial state goal A B C B A C
  • 14.
  • 15. Recording Results for Learning Solve(G) Push the goal literal G onto the empty goal stack GS. On each cycle, If the top goal G of the goal stack GS is satisfied, Then pop GS and let New be Learn(G). If G's parent P involved skill chaining, Then store New as P's first subskill. Else if G's parent P involved concept chaining, Then store New as P's next subskill. Else if the goal stack GS does not exceed the depth limit, Let S be the skill instances whose heads unify with G. If any applicable skill paths start from an instance in S, Then select one of these paths and execute it. Else let M be the set of primitive skill instances that have not already failed in which G is an effect. If the set M is nonempty, Then select a skill instance Q from M, store Q with goal G as its last subskill, Push the start condition C of Q onto goal stack GS , and mark goal G as involving skill chaining. Else if G is a complex concept with the unsatisfied subconcepts H and with satisfied subconcepts F, Then if there is a subconcept I in H that has not yet failed, Then push I onto the goal stack GS, store F with G as its initially true subconcepts, and mark goal G as involving concept chaining. Else pop G from the goal stack GS and store information about failure with G's parent. Else pop G from the goal stack GS. Store information about failure with G's parent. The extended problem solver calls on Learn to construct a new skill clause and stores the information it needs in the goal stack generated during search.
  • 16.
  • 17. (ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) 1 skill chaining Constructing Skills from a Trace A B C B A C
  • 18. (ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) 1 2 skill chaining Constructing Skills from a Trace A B C B A C
  • 19. (ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) 1 3 2 concept chaining Constructing Skills from a Trace A B C B A C
  • 20. (ontable A T) (on B A) (on C B) (hand-empty) (clear C) (unst. C B) (unstack C B) (clear B) (putdown C T) (unst. B A) (unstack B A) (clear A) (holding C) (hand-empty) (holding B) 1 3 2 4 skill chaining Constructing Skills from a Trace A B C B A C
  • 21. Learned Skills After Structure Determined (<head> (?C) :percepts ((block ?D) (block ?C)) :start <condition> :skills ((unstack ?D ?C))) (<head> (?B) :percepts ((block ?C) (block ?B)) :start <condition> :skills ((unstackable ?C ?B) (unstack ?C ?B))) (<head> (?C ?B) :percepts ((block ?B) (block ?C)) :start <condition> :skills ((clear ?C) (hand-empty))) (<head> ( ) :percepts ((block ?D) (table ?T1)) :start <condition> :skills ((putdown ?D ?T1)))
  • 22.
  • 23. Learned Skills After Heads Inserted (clear (?C) :percepts ((block ?D) (block ?C)) :start <condition> :skills ((unstack ?D ?C))) (clear (?B) :percepts ((block ?C) (block ?B)) :start <condition> :skills ((unstackable ?C ?B) (unstack ?C ?B))) (unstackable (?C ?B) :percepts ((block ?B) (block ?C)) :start <condition> :skills ((clear ?C) (hand-empty))) (hand-empty ( ) :percepts ((block ?D) (table ?T1)) :start <condition> :skills ((putdown ?D ?T1)))
  • 24.
  • 25. Learned Skills After Conditions Inferred (clear (?C) :percepts ((block ?D) (block ?C)) :start (unstackable ?D ?C) :skills ((unstack ?D ?C))) (clear (?B) :percepts ((block ?C) (block ?B)) :start [(on ?C ?B) (hand-empty)] :skills ((unstackable ?C ?B) (unstack ?C ?B))) (unstackable (?C ?B) :percepts ((block ?B) (block ?C)) :start [(on ?C ?B) (hand-empty)] :skills ((clear ?C) (hand-empty))) (hand-empty ( ) :percepts ((block ?D) (table ?T1)) :start (putdownable ?D ?T1) :skills ((putdown ?D ?T1)))
  • 26. Learning an HTN Method from a Problem Solution Learn(G) If the goal G involves skill chaining, Then let S 1 and S 2 be G's first and second subskills. If subskill S 1 is empty, Then return the literal for clause S 2 . Else create a new skill clause N with head G, with S 1 and S 2 as ordered subskills, and with the same start condition as subskill S 1 . Return the literal for skill clause N. Else if the goal G involves concept chaining, Then let {C k+1 , ..., C n } be G's initially satisfied subconcepts. Let {C 1 , ..., C k } be G's stored subskills. Create a new skill clause N with head G, with {C k+1 , ..., C n } as ordered subskills, and with the conjunction of {C 1 , ..., C k } as start condition. Return the literal for skill clause N.
  • 27. Creating a Clause from Skill Chaining Problem Solution New Method 1 8 3 X Z 2 8 1 2 X Z Y
  • 28. Creating a Clause from Concept Chaining Problem Solution New Method 8 2 1 Y B X C Z D A A D # B 8 3 Z C
  • 29.
  • 30. An In-City Driving Environment Our focus on learning for reactive control comes from an interest in complex physical domains, such as driving a vehicle in a city. To study this problem, we have developed a realistic simulated environment that can support many different driving tasks.
  • 31. Skill Clauses Learning for In-City Driving parked (?ME ?G1152) :percepts ( (lane-line ?G1152) (self ?ME)) :start ( ) :skills ( (in-rightmost-lane ?ME ?G1152) (stopped ?ME)) in-rightmost-lane (?ME ?G1152) :percepts ( (self ?ME) (lane-line ?G1152)) :start ( (last-lane ?G1152)) :skills ( (driving-in-segment ?ME ?G1101 ?G1152)) driving-in-segment (?ME ?G1101 ?G1152) :percepts ( (lane-line ?G1152) (segment ?G1101) (self ?ME)) :start ( (steering-wheel-straight ?ME)) :skills ( (in-lane ?ME ?G1152) (centered-in-lane ?ME ?G1101 ?G1152) (aligned-with-lane-in-segment ?ME ?G1101 ?G1152) (steering-wheel-straight ?ME))
  • 32. Learning Curves for In-City Driving
  • 33.
  • 34. Transfer Effects in the Blocks World On 20-block tasks, there is no difference in solved problems. 20 blocks
  • 35. Transfer Effects in the Blocks World However, there is difference in the effort needed to solve them. 20 blocks
  • 36. FreeCell Solitaire FreeCell is a full-information card game that, in most cases, can be solved by planning; it also has a highly recursive structure.
  • 37. Transfer Effects in FreeCell On 16-card FreeCell tasks, prior training aids solution probability. 16 cards
  • 38. Transfer Effects in FreeCell However, it also lets the system solve problems with less effort. 16 cards
  • 39. Transfer Effects in FreeCell On 20-card tasks, the benefits of prior training are much stronger. 20 cards
  • 40. Transfer Effects in FreeCell However, it also lets the system solve problems with less effort. 20 cards
  • 41.
  • 42.
  • 43.
  • 44. The I CARUS Architecture Long-Term Conceptual Memory Long-Term Skill Memory Short-Term Conceptual Memory Goal/Skill Stack Categorization and Inference Skill Execution Perception Environment Perceptual Buffer Problem Solving Skill Learning Motor Buffer Skill Retrieval
  • 45. Hierarchical Structure of Long-Term Memory concepts skills Each concept is defined in terms of other concepts and/or percepts. Each skill is defined in terms of other skills, concepts, and percepts. I CARUS organizes both concepts and skills in a hierarchical manner.
  • 46. Interleaved Nature of Long-Term Memory For example, the skill highlighted here refers directly to the highlighted concepts. I CARUS interleaves its long-term memories for concepts and skills. concepts skills
  • 47. Recognizing Concepts and Selecting Skills concepts skills Concepts are matched bottom up, starting from percepts. Skill paths are matched top down, starting from intentions. I CARUS matches patterns to recognize concepts and select skills.
  • 48.
  • 49.