Upload
ellis
View
43
Download
0
Tags:
Embed Size (px)
DESCRIPTION
AI Plannning. Vivek Paharia (100050044) Pulkit Bansal (100050045) Rishabh Kumar(100050050). Agenda. Motivation Real world applications Conceptual Modeling Algorithms. What is Planning ?. Planning - PowerPoint PPT Presentation
Citation preview
AI PlannningVivek Paharia (100050044)Pulkit Bansal (100050045)
Rishabh Kumar(100050050)
Motivation Real world applications Conceptual Modeling Algorithms
Agenda
What is Planning ? Planning
◦ explicit deliberation process that chooses and organizes actions by anticipating their outcomes
◦ aims at achieving some pre-stated objectives AI planning
◦ computational study of this deliberation process
Why study planning in AI ? scientific goal of AI:
◦ understand intelligence◦ planning is an important component of
rational (intelligent) behavior engineering goal of AI:
◦ build intelligent entities ◦ build planning software for choosing
and organizing actions for autonomousintelligent machines
Applications
Harbor with several locations (docks), docked ships, storage areas for containers, and parking area for trucks and trains
Cranes to load and unload ships etc., and robot carts to move containers around
Representative problem
Example State
Conceptual Model The standard conceptual model consists of
three parts◦ State- Transition system: formal model of real
world systems◦ Controller: performs actions to change state of
the world ◦ Planner: produces plans which dictates the
actions of the controller
A State-transition system is a 4-tuple Σ = (S, A, E, γ), where◦ S = {s0, s1, s2, …} is a set of states;◦ A = {a1, a2, …} is a set of actions, that is, state
transitions whose occurrence is controlled by the plan executor;
◦ E = {e1, e2, …} is a set of events, that is, state transitions whose occurrence is not controlled by the plan executor;
◦ γ : S × (A ∪ E)→2S is a state-transition function.
State Transition System
S = Grounding instances of tuple {position of robot, contents of piles, cargo held by crane}◦ {l1,{CB ,CC},{ø},CA , ø}
A = load container c held by crane k onto unloaded robot r all located at location l, etc.
E = strike of dock workers γ =
load × {l1,ø,{CB ,CC},{ø},CA,ø} → {l1, CA,{CB ,CC},{ø}, ø, ø}
State-transition system of representative problem
Input: planning problem, which includes a description of the system Σ, an initial situation and final objective state
Output: A plan, a sequence of actions<take, move1, load, move2>
Planner
Controller is the interface between our system and the real world.
Input: Plan generated by the planner Output: The controller’s output consists of
commands to be issued to machinery to perform the actions in the state-transition System. As it performs its actions, it receives observations, each observation being a collection of sensor inputs giving information about the system’s current state
Controller
STRIPS representation Language that describe states and action States: conjunction of ground literals,
predicate applied to constant◦ Initial State
robot_location(l1) ^ robot_carry(ø) ^ crane1(CA) ^ crane2(ø) ^ on(pallet1,CC) ^ on(CC, CB)◦ Goal State
on(pallet2,CC) ^ on(CC, CB) ^ on(CB, CA)
Action: consists of two components◦ Precondition: conjunction of literal that says what
must be true before applying the action◦ Effects: conjunction of literals which tells how
situation changes on applying the action
Op(Action: load(CX), PRECOND:craneY(CX) ^ robot_location(LY) ^ robot_carry(ø), EFFECT: craneY(ø) ^ robot_location(LY) ^ robot_carry(CX))
STRIPS representation
Algorithms for AI Planning Classical planning
◦ Forward chaining state space search◦ Backward chaining state space search
Reduction to other problem◦ Propositional satisfiability
robot_location(l1) ^ robot_carry(ø) ^ crane1(CA) ^ crane2(ø) ^ on(pallet1,CC) ^ on(CC, CB)
Load(CA)
robot_location(l1) ^ robot_carry(CA) ^ crane1(ø) ^ crane2(ø) ^ on(pallet1,CC) ^ on(CC, CB)
Move()
robot_location(l2) ^ robot_carry(ø) ^ crane1(CA) ^ crane2(ø) ^ on(pallet1,CC) ^ on(CC, CB)
……………………
Forward Chaining
on(pallet2,CC) ^ on(CC, CB) ^ on(CB, CA)
put(CA)on(pallet2,CC) ^ on(CC, CB) ^ crane1(ø) ^ crane2(CC)
^ robot_carry(ø) ^ robot_location(L1) …
…
on(pallet2,CC) ^ on(CC, CB) ^ crane1(ø) ^ crane2(CC) ^ robot_carry(ø) ^ robot_location(L2)
…
...
Backward ChainingConsiders only relevant actions
How is it different from graph search “Get a packet of milk and a bunch of
bananas and a iPhone”StartGo to Pet Store
Buy a dogTalk to a parrotGo to school
Go to classGo to market
Buy milkGo to homeBuy iPhoneBuy bananasBuy orangesBuy iPhone
Read a BookSit in chairRead a book
Sit some more……….
…….
Choose amongst states but cannot eliminate actions from consideration◦ buying an orange, tuna fish, corn flakes, buying
milk◦ bad, bad, bad, good
considers sequences of actions starting from the initial state◦ Until it is figured out how to obtain items—by
buying, borrowing, leasing,◦ it cannot really decide where to go
Search-based problem solving
“Open up” states and actions◦ make direct connection between states and actions◦ goal: Have(milk), action: Buy(x) achives Have(x) ◦ consider Buy(milk) but not Buy(egg), gotoSchool()
“free to add actions to plan” wherever needed◦ "obvious" or "important” decision first◦ reduce branch factor and backtracking◦ add Buy(milk) even before deciding where to buy,
how to get there “most parts of the world are independent of
most other parts”◦ Divide and conquer◦ Get milk and get iPhone
AI planning
Tackling real world problems often require considering constraints that can vary from simpler one to complex one.
Such problems are dealt with general constraint solving frame works.
Using constraints and related techniques as an underlying framework for problem-solving tasks such as planning has proven successful for many domains.
Constraints and Planning
Constraints Based Frameworks
The basic modeling units of constraint-based frame-works are constraints and variables; a constraint is an entity that restricts the values of variables.
Most constraint-based search frameworks use only a restricted scenario for e.g. propositional satisfiability (SAT), integer programming (IP), which impose restriction on proposition formulae & numerical variables respectively.
Planning ProblemA basic planning problem usually comprises of an:- Initial world description a partial description of the goal world a set of actions also called operators that map a
partial world description to another
Planning as Propositional Satisfiability SAT determines whether a propositional formula is satisfiable. Our Problem is governed by a
formulae:
This formulae consists of two-valued variables (true and false), related through the operators ∧ (and) ,∨(or) and ¬ (not).
We state the problem as a conjunctive normal form (a conjunction of disjunctions), and SAT-solving techniques include refinement approaches which are based mostly on the Davis Putnam procedure.
Propositional Satisfiabilty (Description and representation)Suppose we state our planning problem by anautomated planner STRIPS D.There are several ways to write such a propositional formulae Pi whose models are one to one with transition in D. For our goals, it suffices to say that Pi has a propositional variable Ai for each groundaction A and two propositional variables Fi and Fi+1 for each ground state variable F in D. Intuitively, Fi
represents the value of F at time i (and similarly for Ai and Fi+1).
If D is deterministic and we’re given a single initial state represented by a formula I, we can find a
valid plan that reaches a goal state represented by a formula G in n steps if we can satisfy
I0 ∧ (∧Pi )0≤i<n ∧ Gn
where I0 is the formula obtained from I by replacing
each state variable F with F0, and Gn is obtained from G by replacing each state variable F with Fn. This idea has led to impressive results and has
thus greatly influenced.
Propositional Satisfiabilty (Description and representation)
Planning as Integer Programming
An integer programming problem is a mathematical optimization or feasibility program in which some or all of the variables are restricted to be integers.
With integer variables, one can model logical requirements, fixed costs, sequencing and scheduling requirements, and many other problem aspects.
Application of integer programmingSuppose we want to solve following block problem:-
We introduce integer variables that take the value of 1 or 0, depending on whether a certain condition holds:- Do[a,t] = 1 if and only if action a is taken in time step t. True[f,t] = 1 if and only if assertion f is true in time step
t
Now in above case of blocks, suppose we have an arm that can pick up, hold, or put down at least two blocks. There must be a constraint to implement the rule that the arm may not put down block B at time step t unless it holds that block at that time:
Do[‘put_down_B’,t] <= True[‘hold_B’,t]Another type of constraint ensures that arm may not hold block B at time step t unless it has performed one of the three actions compatible with holding it at time step t’< t:True[‘hold_B’,t]<= Do[‘pick_up_B’,t’] + Do[‘unstack_B_A’,t’] + Do[‘unstack_B_C’,t’]
Application of integer programming (continued..)
Further constraints rule out the performance of incompatible actions in the same time step, such as both putting down and picking up block B:
Do[‘put_down_B’,3] + Do[‘pick_up_B’,3] <= 1 Finally, a few constraints specify the initial state and the final state’s requirements. We can mechanically derive all the necessary constraints of these types from the contents of the problem’s STRIPS representation.
Application of integer programming (continued..)
Why to use integer programming?There are two main reasons for using integer variables when modeling problems as a linear program: The integer variables represent quantities that can
only be integer. For example, it is not possible to build 3.7 aircrafts.
The integer variables represent decisions and so should only take on the value 0 or 1 .
These considerations occur frequently in practice and so integer linear programming can be used in many applications areas.
Planning as Constraint ProgrammingThe CP approach is characterized by more natural (or convenient) formulations than SAT or IP. Problems are described as constraint satisfaction problems (CSPs), which consist of :- Set of variables x = {x1, ..., xn}, where each variable
is associated with a domain d1, ..., dn Set of constraints c ={c1, ..., cm} over these
variables.In CP model constraints can be symbols well as numbers and can be continuous or discrete (such as “block A” ,“13” or “6.5”).
Map Coloring Problem (MCP)
MCP can be viewed as a graph coloring problem:
a
bc
d
a
b
cd
Map Coloring Problem (MCP) using CP model
Given a map and given a set of colors, the problem is
how to color the map so that the regions sharing a boundary line don’t have the same color.
Modeling MCPMCP can be Modeled as a CSP: A set of variables representing the color of each
region The domain of the variables is the set of the colors
used. A set of constraints expressing the fact that countries
that share the same boundary are not colored with the same color.
Modeling (MCP)Example - Australia
Variables = {a,b,c,d,e,f,g} Domain = {red, blue, green} Constraints:
a!=b, a!=c b!=c, b!=d c!=e, c!=f e!=d, e!=f
a
b
c
d
f
e
g
Quick Overview of SAT,IP and CP
For the SAT approach, representing the quantitative aspects
of the task is hardly possible because the propositional SATvariables can represent only qualitative differences.
While IP and CP can also resolve the quantitative aspects of
the task that are to be performed to resolve the problem.CP framework’s become advantageous in settings ,such aswhen incorporating resources and time.
Consider a scenario in which some tasks with specific durations share a resource, and the goal is to prevent overlap. IP’s mathematical framework and SAT’s propositional formulas are highly restricted, so a problem must be translated into a very specific form thus complex than CP's representation.
Quick Overview of SAT,IP and CP (Continued..)
R. Fikes and N. Nilsson (1971). STRIPS: a new approach to the application of theorem proving to problem solving. Artificial Intelligence, 2:189-208
James Hendler, Austin Tate and Mark Drummond(1990). AI Planning:Systems and Techniques. AI Magazine Volume 11 Number 2
References
Alexander Nareyek and Eugene C. Freuder(2005). Constraint and AI Planning IEEE Computer Society
Dana S. Nau (2007). Current Trends in Automated Planning. AI magazine Volume 28 Number 4
http://class.coursera.org/aiplan-001/lecture/index
Artificial Intelligence 2nd Edition Stuart Russell & Peter Norvig
References
Thank You