CPSC 322 Introduction to Artificial Intelligence

Slides:



Advertisements
Similar presentations
CPSC 322 Introduction to Artificial Intelligence November 5, 2004.
Advertisements

TWEAK solving the Sussman anomaly ON(A,B) ON(B,C) ON(C,A) ONTABLE(A) ONTABLE(B) CLEAR(C) CLEAR(B) ARMEMPTY STACK(A,B) STACK(B,C) Two step additions to.
Planning Chapter 10.
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Planning Planning is fundamental to “intelligent” behaviour. E.g.
All rights reserved ©L. Manevitz Lecture 61 Artificial Intelligence Planning System L. Manevitz.
Sussman anomaly - analysis The start state is given by: ON(C, A) ONTABLE(A) ONTABLE(B) ARMEMPTY The goal by: ON(A,B) ON(B,C) This immediately leads to.
1  Planning (under complete Knowledge) Intro to Artificial Intelligence.
Planning Russell and Norvig: Chapter 11 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/ home.htm.
Artificial Intelligence II S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning.
1 CSC 8520 Spring Paula Matuszek On the syllabus page there are links to two Prolog programs: a simple Prolog planner and an ADT library. Download.
1 Chapter 4 State-Space Planning. 2 Motivation Nearly all planning procedures are search procedures Different planning procedures have different search.
Planning Some material adapted from slides by Tim Finin,Jean-Claude Latombe, Lise Getoor, and Marie desJardins.
CLASSICAL PLANNING AND GRAPHPLAN Classes 17 and 18 All slides created by Dr. Adam P. Anthony.
1 Classical STRIPS Planning Alan Fern * * Based in part on slides by Daniel Weld.
CPSC 322 Introduction to Artificial Intelligence November 24, 2004.
EXAMPLE OF PARTIAL ORDER PLANNING. Action Recipes: Action: Stack(x,y) Prec: Clear(x) ^ Clear(y) ^ OnTable(x) Effect: ~Clear(y) ^ ~OnTable(x) ^ On(x,y)
CPSC 322 Introduction to Artificial Intelligence November 19, 2004.
Planning Russell and Norvig: Chapter 11. Planning Agent environment agent ? sensors actuators A1A2A3.
OnT-A onT-B onT-C cl-A cl-C cl-B he Pick-A Pick-B Pick-C onT-A onT-B onT-C cl-A cl-C cl-B he h-A h-B h-C ~cl-A ~cl-B ~cl-C ~he st-A-B st-A-C st-B-A st-B-C.
CPSC 322 Introduction to Artificial Intelligence November 26, 2004.
1 Planning Adapted from Tim Finin, UMBC, Marie desJardins Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
A: A Unified Brand-name-Free Introduction to Planning Subbarao Kambhampati Jan 28 th My lab was hacked and the systems are being rebuilt.. Homepage is.
CSE 574: Planning & Learning Subbarao Kambhampati 1/17: State Space and Plan-space Planning Office hours: 4:30—5:30pm T/Th.
1 Lecture 12 example (from slides prepared by Prof. J. Rosenchein)
Planning Where states are transparent and actions have preconditions and effects Notes at
Intro to AI Fall 2002 © L. Joskowicz 1 Introduction to Artificial Intelligence LECTURE 12: Planning Motivation Search, theorem proving, and planning Situation.
1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.
1 Action Planning (Where logic-based representation of knowledge makes search problems more interesting) R&N: Chap. 11, Sect. 11.1–4.
Planning Where states are transparent and actions have preconditions and effects Notes at
AI Principles, Lecture on Planning Planning Jeremy Wyatt.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
An Introduction to Artificial Intelligence CE Chapter 11 – Planning Ramin Halavati In which we see how an agent can take.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1 07. The planning problem 2  Inputs: 1. A description of the world state 2. The goal state description 3. A set of actions  Output: A sequence of actions.
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:
Planning Chapter Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 07 : Planning.
1 CMSC 671 Fall 2010 Class #12/13 – Wednesday, October 13/ Monday, October 18 Some material adapted from slides by Jean-Claude Latombe / Lise Getoor.
PLANNING He whose undertakings are all devoid of plan and desire for results, and whose actions are burnt by the fire of knowledge, him the sages call.
1 Planning Chapter 10 Some material adopted from notes by Tim Finin, Marie desJardins Andreas Geyer-Schulz, and Chuck Dyer.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
1/16 Planning Chapter 11- Part1 Author: Vali Derhami.
Towards Model-lite Planning A Proposal For Learning & Planning with Incomplete Domain Models Sungwook Yoon Subbarao Kambhampati Supported by DARPA Integrated.
CS621: Artificial Intelligence Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay Lecture 19: Hidden Markov Models.
1 Planning Chapter 10 Some material adopted from notes by Tim Finin, Marie desJardins Andreas Geyer-Schulz, and Chuck Dyer.
1 Planning Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
Planning Chapter Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
CMSC 471 Spring 2014 Class #24 Thursday, April 24, 2014 Planning
An Introduction to Artificial Intelligence CE 40417
Planning Chapter 16.
Planning Chapter and Chuck Dyer
Combined Lecture CS621: Artificial Intelligence (lecture 19) CS626/449: Speech-NLP-Web/Topics-in-AI (lecture 20) Hidden Markov Models Pushpak Bhattacharyya.
Introduction Contents Sungwook Yoon, Postdoctoral Research Associate
CSC 8520 Spring Paula Matuszek
CMSC 471 Fall 2011 Class #16 Tuesday, October 25, 2011 Planning
Planning Chapter and Chuck Dyer
CS344 : Introduction to Artificial Intelligence
AI Planning.
Planning Chapter and Chuck Dyer
Planning Chapter
CPSC 322 Introduction to Artificial Intelligence
CS344 : Introduction to Artificial Intelligence
Class #15 / 16 – Tuesday, October 20 / Thursday, October 22
Chapter 2 Representations for Classical Planning
Russell and Norvig: Chapter 11 CS121 – Winter 2003
CMSC 471 Fall 2002 Class #20/21/23 – Wednesday, November 6 / Monday, November 11 / Monday, November 18.
L9. STRIPS Examples Recursive STRIPS Block world
Prof. Pushpak Bhattacharyya, IIT Bombay
Presentation transcript:

CPSC 322 Introduction to Artificial Intelligence November 22, 2004

Things... Term project is due one week from today The final exam will be at noon on Friday, December 10, in MCML 166

How about some tasty CILOG code? /* This is an implementation of the simple STRIPS planner shown on page 302 of the Computational Intelligence text. launch it with the query: cilog: ask goals(G) & achieve_all(G,init,Plan). Note that the add list is denoted here by "achieves" instead of "add", and that the add and delete lists aren't exactly lists. */ /* stack action */ preconditions(stack(X,Y),[cleartop(Y),holding(X)]). achieves(stack(X,Y),armempty). achieves(stack(X,Y),on(X,Y)). deletes(stack(X,Y),cleartop(Y)). deletes(stack(X,Y),holding(X)).

How about some tasty CILOG code? /* unstack action */ preconditions(unstack(X,Y),[on(X,Y),clear(X),armempty]). achieves(unstack(X,Y),holding(X)). achieves(unstack(X,Y),cleartop(Y)). deletes(unstack(X,Y),on(X,Y)). deletes(unstack(X,Y),armempty). /* pickup action */ preconditions(pickup(X),[cleartop(X),ontable(X),armempty]). achieves(pickup(X),holding(X)). deletes(pickup(X),ontable(X)). deletes(pickup(X),armempty). /* putdown action */ preconditions(putdown(X),[holding(X)]). achieves(putdown(X),ontable(X)). achieves(putdown(X),armempty). deletes(putdown(X),holding(X)).

How about some tasty CILOG code? /* initial situation */ holds(ontable(a),init). holds(ontable(b),init). holds(cleartop(a),init). holds(cleartop(b),init). holds(armempty,init). achieves(init,X) <- holds(X,init). goals([ontable(b),cleartop(a),armempty,on(a,b)]).

How about some tasty CILOG code? /* the simple STRIPS planner */ remove(X,[X|Y],Y). achieve_all([],W0,W0). achieve_all(Goals,W0,W2) <- remove(G,Goals,Rem_Gs) & achieve(G,W0,W1) & achieve_all(Rem_Gs,W1,W2). achieve(G,W,W) <- holds(G,W). achieve(G,W0,do(Action,W1)) <- achieves(Action,G) & preconditions(Action,Pre) & achieve_all(Pre,W0,W1).

Desirable attributes of a knowledge representation approach • capture generalities in the world being modeled • easily modifiable to reflect changes so that new knowledge can be derived from old knowledge • transparent - understandable by people who provide the knowledge as well as those who look at it later • usable even if not entirely accurate or complete • explicitly represent important objects and relationships • natural constraints on how one object or relation influences another should be obvious • irrelevant detail should be suppressed (abstracted away) • complete -- everything that needs to be represented can be represented • concise -- what needs to be said can be said efficiently • fast -- you can store and retrieve information quickly • computable -- enables reasoning to proceed easily with known procedures (doesn’t rely on bizarre coding tricks)

How about some tasty CILOG code? /* This is an implementation of the simple STRIPS planner shown on page 302 of the Computational Intelligence text. launch it with the query: cilog: ask goals(G) & achieve_all(G,init,Plan). Note that the add list is denoted here by "achieves" instead of "add", and that the add and delete lists aren't exactly lists. */ /* stack action */ preconditions(stack(X,Y),[cleartop(Y),holding(X)]). achieves(stack(X,Y),armempty). achieves(stack(X,Y),on(X,Y)). deletes(stack(X,Y),cleartop(Y)). deletes(stack(X,Y),holding(X)).

How about some tasty CILOG code? /* unstack action */ preconditions(unstack(X,Y),[on(X,Y),cleartop(X),armempty]). achieves(unstack(X,Y),holding(X)). achieves(unstack(X,Y),cleartop(Y)). deletes(unstack(X,Y),on(X,Y)). deletes(unstack(X,Y),armempty). /* pickup action */ preconditions(pickup(X),[cleartop(X),ontable(X),armempty]). achieves(pickup(X),holding(X)). deletes(pickup(X),ontable(X)). deletes(pickup(X),armempty). /* putdown action */ preconditions(putdown(X),[holding(X)]). achieves(putdown(X),ontable(X)). achieves(putdown(X),armempty). deletes(putdown(X),holding(X)).

How about some tasty CILOG code? /* initial situation */ holds(ontable(a),init). holds(ontable(b),init). holds(cleartop(a),init). holds(cleartop(b),init). holds(armempty,init). achieves(init,X) <- holds(X,init). goals([ontable(b),cleartop(a),armempty,on(a,b)]).

Did choosing a good KR approach make this problem easier? /* the simple STRIPS planner */ remove(X,[X|Y],Y). achieve_all([],W0,W0). achieve_all(Goals,W0,W2) <- remove(G,Goals,Rem_Gs) & achieve(G,W0,W1) & achieve_all(Rem_Gs,W1,W2). achieve(G,W,W) <- holds(G,W). achieve(G,W0,do(Action,W1)) <- achieves(Action,G) & preconditions(Action,Pre) & achieve_all(Pre,W0,W1).

A new start state B C A ontable(a) ontable(b) ontable(c) cleartop(a) cleartop(b) cleartop(c) armempty B C A

A new goal state on(a,b) on(b,c) ontable(c) cleartop(a) armempty A B C

Finding the plan plan: stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: on(b,c) on(a,b) ontable(c) clear(a) armempty if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan plan: stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: on(b,c) on(a,b) ontable(c) clear(a) armempty if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan plan: stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: on(b,c) on(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan plan: stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: on(b,c) on(a,b) for remaining goals, reduce difference between goal and current state

Finding the plan find an action with add list that contains goal... stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: on(b,c) on(a,b) find an action with add list that contains goal...

Finding the plan post that action’s preconditions as new goals... stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: clear(c) holding(b) on(a,b) post that action’s preconditions as new goals...

Finding the plan post that action as a step in the plan... plan: stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: clear(c) holding(b) on(a,b) post that action as a step in the plan...

Finding the plan plan: stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: clear(c) holding(b) on(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan plan: stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: clear(c) holding(b) on(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan plan: stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: holding(b) on(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan plan: stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: holding(b) on(a,b) for remaining goals, reduce difference between goal and current state

Finding the plan find an action with add list that contains goal... stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: holding(b) on(a,b) find an action with add list that contains goal...

Finding the plan post that action’s preconditions as new goals... stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: clear(b) ontable(b) armempty on(a,b) post that action’s preconditions as new goals...

Finding the plan post that action as a step in the plan... plan: pickup(b) stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: clear(b) ontable(b) armempty on(a,b) post that action as a step in the plan...

Do you see a problem developing? plan: pickup(b) stack(b,c) stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) ontable(c) clear(a) clear(b) clear(c) armempty goals: clear(b) ontable(b) armempty on(a,b) post that action as a step in the plan...