(Classical) AI Planning. General-Purpose Planning: State & Goals Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C) Goals: (on C Table)

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Practical Planning: Scheduling and Hierarchical Task Networks Chapter CS 63 Adapted from slides by Tim Finin and Marie desJardins.
In the name of God An Application of Planning An Application of PlanningJSHOP BY: M. Eftekhari and G. Yaghoobi.
CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
Planning
1 Planning Chapter CMSC 471 Adapted from slides by Tim Finin and Marie desJardins. Some material adopted from notes by Andreas Geyer-Schulz,
ARCHITECTURES FOR ARTIFICIAL INTELLIGENCE SYSTEMS
Planning II: Partial Order Planning
Hierarchical Task Network (HTN) Planning Hai Hoang 4/17/2007.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
1 Chapter 4 State-Space Planning. 2 Motivation Nearly all planning procedures are search procedures Different planning procedures have different search.
Hierarchical Plan Representations for Encoding Strategic Game AI Hai Hoang Stephen Lee-Urban Héctor Muñoz-Avila Lehigh University
Automated Planning & Computer Games: Perspectives and Applications Hector Munoz-Avila.
Artificial Intelligence 2005/06
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Planning II GraphPlan and Russell and Norvig: ch.12 CMSC421 – Fall 2006 based on material from Jim Blythe, JC Latombe, Marie desJardins and Daphne Koller.
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
Using Search in Problem Solving
1 Planning. R. Dearden 2007/8 Exam Format  4 questions You must do all questions There is choice within some of the questions  Learning Outcomes: 1.Explain.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Universal Plans for Reactive Robots in Unpredictable Environments By M.J. Schoppers Presented by: Javier Martinez.
Automated Planning and HTNs Planning – A brief intro Planning – A brief intro Classical Planning – The STRIPS Language Classical Planning – The STRIPS.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Classical Planning Chapter 10.
State-Space Planning Sources: Ch. 3 Appendix A
1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture.
Domain-Independent Plan Adaptation Héctor Muñoz-Avila Department of Computer Science and Engineering Lehigh University USA.
(Classical) AI Planning. Some Examples Route search: Find a route between Lehigh University and the Naval Research Laboratory Project management: Construct.
General Purpose Case-Based Planning. General Purpose vs Domain Specific (Case-Based) Planning General purpose: symbolic descriptions of the problems and.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Strategic Planning for Unreal Tournament© Bots Héctor Muñoz-Avila Todd Fisher Department of Computer Science and Engineering Lehigh University USA Héctor.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
22/11/04 AIPP Lecture 16: More Planning and Operators1 More Planning Artificial Intelligence Programming in Prolog.
Planning (Chapter 10)
First-Order Logic and Plans Reading: C. 11 (Plans)
Hierarchical Plan Representations for Encoding Strategic Game AI Hai Hoang Stephen Lee-Urban Héctor Muñoz-Avila Lehigh University
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
For Friday No reading Homework: –Chapter 11, exercise 4.
Planning (Chapter 10)
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Automated Planning Dr. Héctor Muñoz-Avila. What is Planning? Classical Definition Domain Independent: symbolic descriptions of the problems and the domain.
Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
CSCI 4310 Lecture 2: Search. Search Techniques Search is Fundamental to Many AI Techniques.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Introduction to State Space Search
1 CMSC 471 Fall 2004 Class #21 – Thursday, November 11.
1 CMSC 471 Fall 2002 Class #24 – Wednesday, November 20.
Planning I: Total Order Planners Sections
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
ADVANCED PLANNING TECHNIQUES Dr. Adam Anthony Lecture 22.
Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world.
CSE573 Autumn /11/98 Planning Administrative –PS3 due 2/23 –Midterm Friday Last time –regression planning algorithm –introduction to plan-space.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Automated Planning & Computer Games: Perspectives and Applications
SNS College of Engineering Department of Computer Science and Engineering AI Planning Presented By S.Yamuna AP/CSE 5/23/2018 AI.
Review for the Midterm Exam
Chapter 23 Planning in the Game of Bridge
Planning José Luis Ambite.
Chapter 23 Planning in the Game of Bridge
Class #20 – Wednesday, November 5
Chapter 23 Planning in the Game of Bridge
Some Additional Notes about GOAP
Search.
Search.
Class #17 – Tuesday, October 30
Presentation transcript:

(Classical) AI Planning

General-Purpose Planning: State & Goals Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C) Goals: (on C Table) (on B C) (on A B) (clear A) A C BC B A Initial stateGoals ( Ke Xu )

General-Purpose Planning: Operators (I) ?y ?x No block on top of ?x transformation ?y ?x … … No block on top of ?y nor ?x Operator: (Unstack ?x ?y) Preconditions: (on ?x ?y) (clear ?x) Effects: –Add: (on ?x table) (clear ?y) –Delete: (on ?x ?y) On table

General-Purpose Planning: Operators (II) ?y ?x No block on top of ?x transformation ?y … … No block on top of ?y nor ?x Operator: (Stack ?x ?y ?z) Preconditions: (on ?x ?z) (clear ?y) (clear ?x) Effects: –Add: (on ?x ?y) (clear ?z) –Delete: (on ?x ?z) (clear ?y) ?z ?x ?z

So what is the solution plan for this problem? Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C) Goals: (on C Table) (on B C) (on A B) (clear A) Operators: (Stack ?x ?y), (Unstack ?x ?y ?z) A C BC B A Initial stateGoals ( Ke Xu )

Planning: Search Space A C B ABC AC B C B A B A C B A C BC A C A B A C B B C A AB C A B C A B C ( Michael Moll )

Some Examples Route search: Find a route between Lehigh University and the Naval Research Laboratory Project management: Construct a project plan for organizing an event (e.g., the Musikfest) Military operations: Develop an air campaign Information gathering: Find and reserve an airline ticket to travel from Newark to Miami Game playing: plan the behavior of a computer controlled player Resources control: Plan the stops of several of elevators in a skyscraper building. Which of the following problems can be modeled as AI planning problems? Answer: ALL!

FSM vs AI Planning Planning Operators Patrol  Preconditions: No Monster  Effects: patrolled Fight  Preconditions: Monster in sight  Effects: No Monster PatrolFight Monster In Sight No Monster FSM: A resulting plan: Patrol patrolled Fight No Monster Monster in sight Neither is more powerful than the other one

But Planning Gives More Flexibility “Separates implementation from data” --- Orkin reasoning knowledge Planning Operators Patrol  Preconditions: No Monster  Effects: patrolled Fight  Preconditions: Monster in sight  Effects: No Monster … Many potential plans: PatrolFight PatrolFight PatrolFight PatrolFight PatrolFight … If conditions in the state change making the current plan unfeasible: replan!

But… Does Classical Planning Work for Games? F.E.A.R. not!

General Purpose vs. Domain-Specific General purpose: symbolic descriptions of the problems and the domain. The plan generation algorithm the same Domain Specific: The plan generation algorithm depends on the particular domain Advantage: - opportunity to have clear semantics Disadvantage: - symbolic description requirement Advantage: - can be very efficient Disadvantage: - lack of clear semantics - knowledge-engineering for plan generation Planning: find a sequence of actions to achieve a goal

Classes of General-Purpose Planners General purpose planners can be classified according to the space where the search is performed: SAT Hierarchical Disjunctive plans state plan We are going to discuss these forms

State- and Plan-Space Planning State-space planners transform the state of the world. These planners search for a sequence of transformations linking the starting state and a final state State of the world (total order) Plan-space planners transform the plans. These planners search for a a plan satisfying certain conditions (partial-order, least-commitment)

Why Plan-Space Planning? 1. Motivation: “Sussman Anomaly” –Two subgoals to achieve: (on A B) (on B C) BA C C B A

Why Plan-Space Planning? Problem of state-space search: –Try (on A B) first: put C on the Table, then put A on B Accidentally wind up with A on B when B is still on the Table We can not get B on C without taking A off B Try to solve the first subgoal first appears to be mistaken ABCCB A C B A

Hierarchical (HTN) Planning Travel(UMD, Lehigh) Fly(National, L.V. International) Travel(L.V. Int’nal,Lehigh) Travel(UMD,National) Principle: Complex tasks are decomposed into simpler tasks. The goal is to decompose all the tasks into primitive tasks, which define actions that change the world. alternative methods Travel from UMD to Lehigh University Travel by car Enough money for gasoline Roads are passableSeats available Travel by plane Enough money for air fare available Taxi(UMD,UMD-Metro) Metro(UMD-Metro,National) Taxi(L.V. Int’nal,Lehigh)

Application to Computer Bridge Chess:better than all but the best humans Bridge:worse than many good players Why bridge is difficult for computers –It is an imperfect information game –Don’t know what cards the others have (except the dummy) –Many possible card distributions, so many possible moves If we encode the additional moves as additional branches in the game tree, this increases the number of nodes exponentially –worst case: about 6x10 44 leaf nodes –average case: about leaf nodes Not enough time to search the game tree (Dana S. Nau)

How to Reduce the Size of the Game Tree? Bridge is a game of planning –Declarer plans how to play the hand by combining various strategies (ruffing, finessing, etc.) –If a move doesn’t fit into a sensible strategy, then it probably doesn’t need to be considered HTN approach for declarer play –Use HTN planning to generate a game tree in which each move corresponds to a different strategy, not a different card Reduces average game-tree size to about 26,000 leaf nodes Bridge Baron: implements HTN planning –Won the 1997 World Bridge Computer Challenge –All commercial versions of Bridge Baron since 1997 have include an HTN planner (has sold many thousands of copies) (Dana S. Nau)

Loop: –If the current partial plan is a solution, then exit –Nondeterministically choose a way to refine the plan Some of the possible refinements –Forward & backward state-space refinement –Plan-space refinement –Hierarchical refinements Universal Classical Planning (UCP) (Khambampati, 1997) Plan-space partially instantiated steps, plus constraints add steps & constraints State-space

Abstract Example Initial state final state Initial plan: Plan-space refinement State-space refinement Plan-space refinement State-space refinement

Why “Classical”? Classical planning makes a number of assumptions: –Symbolic information (i.e., non numerical) –Actions always succeed –The “Strips” assumption: only changes that takes place are those indicated by the operators Despite these (admittedly unrealistic) assumptions some work-around can be made (and have been made!) to apply the principles of classical planning to games Neoclassical planning removes some of these assumptions