CS325 Artificial Intelligence Chs. 10, 11 – Planning Cengiz Günay, Emory Univ. Spring 2013 Günay () Chs. 10, 11 – Planning Spring 2013 1 / 24
Planning Günay () Chs. 10, 11 – Planning Spring 2013 2 / 24
Planning Planning is coming up with a solution for an agent: it’s at the heart of AI Günay () Chs. 10, 11 – Planning Spring 2013 2 / 24
Entry/Exit Surveys Exit survey: Knowledge Representation and Inference What knowledge representation do you think our brains have? What knowledge base topic/domain would you wish you had? Entry survey: Planning (0.25 points of final grade) What previous class topic would count as a planning algorithm? Where do you think you used an automated planning system? Günay () Chs. 10, 11 – Planning Spring 2013 3 / 24
Graph Search Is a Form of Planning Oradea 71 Neamt 87 Zerind 151 75 Iasi Arad 140 92 Sibiu Fagaras 99 118 Vaslui 80 Rimnicu Vilcea Timisoara 142 211 111 Pitesti Lugoj 97 70 98 Hirsova 85 146 Mehadia 101 Urziceni 86 75 138 Bucharest Drobeta 120 90 Eforie Craiova Giurgiu Search algorithm like A ∗ is a planning method Günay () Chs. 10, 11 – Planning Spring 2013 4 / 24
Graph Search Is a Form of Planning Oradea 71 Neamt 87 Zerind 151 75 Iasi Arad 140 92 Sibiu Fagaras 99 118 Vaslui 80 Rimnicu Vilcea Timisoara 142 211 111 Pitesti Lugoj 97 70 98 Hirsova 85 146 Mehadia 101 Urziceni 86 75 138 Bucharest Drobeta 120 90 Eforie Craiova Giurgiu Search algorithm like A ∗ is a planning method Only works for observable and deterministic environment What if you cannot plan all the way? Günay () Chs. 10, 11 – Planning Spring 2013 4 / 24
Blind Walking Günay () Chs. 10, 11 – Planning Spring 2013 5 / 24
Blind Walking Need to alternate plan & execution Günay () Chs. 10, 11 – Planning Spring 2013 5 / 24
How Does the Brain Do It? Günay () Chs. 10, 11 – Planning Spring 2013 6 / 24
How Does the Brain Do It? Frontal lobes are biggest in humans, dedicated to planning, reasoning and other high-order skills Günay () Chs. 10, 11 – Planning Spring 2013 6 / 24
So When Do You Need Planning? Stochastic environment Multi-agent situation Partial observable Unknown Hierarchical Günay () Chs. 10, 11 – Planning Spring 2013 7 / 24
So When Do You Need Planning? Stochastic environment Multi-agent situation Partial observable Unknown Hierarchical In these cases, may need to plan in belief states Günay () Chs. 10, 11 – Planning Spring 2013 7 / 24
Sensorless World R L R L S S R R L R L R L L S S S S R L R L S S Günay () Chs. 10, 11 – Planning Spring 2013 8 / 24
Sensorless World L Günay () Chs. 10, 11 – Planning Spring 2013 8 / 24
Sensorless World L Start: clean place Go: left wall, clean Günay () Chs. 10, 11 – Planning Spring 2013 8 / 24
Partially Observable Environment Deterministic, but sense only local dirt & location Günay () Chs. 10, 11 – Planning Spring 2013 9 / 24
Partially Observable Environment Deterministic, but sense only local dirt & location Belief states get smaller with actions Günay () Chs. 10, 11 – Planning Spring 2013 9 / 24
Stochastic (Random) Environment Still local sensing Robot has slippery wheels, may not move Günay () Chs. 10, 11 – Planning Spring 2013 10 / 24
Stochastic (Random) Environment Still local sensing Robot has slippery wheels, may not move Belief states get larger with actions Günay () Chs. 10, 11 – Planning Spring 2013 10 / 24
Stochastic (Random) Environment Can reach clean world? Still local sensing Robot has slippery wheels, may not move Belief states get larger with actions Günay () Chs. 10, 11 – Planning Spring 2013 10 / 24
Stochastic (Random) Environment Can reach clean world? No finite solution! Still local sensing Robot has slippery wheels, may not move Belief states get larger with actions Günay () Chs. 10, 11 – Planning Spring 2013 10 / 24
Infinite Sequences? Finite sequences don’t work: [ R , S , R , S ] Günay () Chs. 10, 11 – Planning Spring 2013 11 / 24
Infinite Sequences? Finite sequences don’t work: [ R , S , R , S ] Make a finite plan with branches Günay () Chs. 10, 11 – Planning Spring 2013 11 / 24
Infinite Sequences? Finite sequences don’t work: [ R , S , R , S ] Make a finite plan with branches Gives an infinite sequence! Günay () Chs. 10, 11 – Planning Spring 2013 11 / 24
Infinite Sequences? Finite sequences don’t work: [ R , S , R , S ] Make a finite plan with branches Gives an infinite sequence! Can write it like: [ S , While A : R , S ] Günay () Chs. 10, 11 – Planning Spring 2013 11 / 24
Searching For a Plan Like searching for paths, find a plan that reaches the goal. Günay () Chs. 10, 11 – Planning Spring 2013 12 / 24
Searching For a Plan Unbounded solution: Some leaf goal Every leaf goal No Bounded solution: No branch No loops No Like searching for paths, find a plan that reaches the goal. Günay () Chs. 10, 11 – Planning Spring 2013 12 / 24
Searching For a Plan Unbounded solution: Some leaf goal Every leaf goal No Bounded solution: No branch No loops No Like searching for paths, find a plan that reaches the goal. Günay () Chs. 10, 11 – Planning Spring 2013 12 / 24
Mathematical Notation [ A , S , F ] Result ( Result ( A , A → S ) , S → F ) ∈ Goals Deterministic: s ′ = Result ( a , s ) where s is state and a is action. Günay () Chs. 10, 11 – Planning Spring 2013 13 / 24
Mathematical Notation [ A , S , F ] Result ( Result ( A , A → S ) , S → F ) ∈ Goals Deterministic: s ′ = Result ( a , s ) where s is state and a is action. Non-deterministic: Predict-update beliefs ( b ) cycle: b ′ = Update ( Predict ( b , a ) , o ) where o is observation. Günay () Chs. 10, 11 – Planning Spring 2013 13 / 24
Predict-Update Cycle Babies randomly dirtying floors Günay () Chs. 10, 11 – Planning Spring 2013 14 / 24
Predict-Update Cycle Babies randomly dirtying floors Problems: Large solution, simpler to list world state as variables Günay () Chs. 10, 11 – Planning Spring 2013 14 / 24
Classical Planning State space: k boolean variables; size: Günay () Chs. 10, 11 – Planning Spring 2013 15 / 24
Classical Planning State space: k boolean variables; size: 2 k Günay () Chs. 10, 11 – Planning Spring 2013 15 / 24
Classical Planning State space: k boolean variables; size: 2 k World state: Complete assignment Belief state: Complete/partial/arbitrary formula Called an action schema Günay () Chs. 10, 11 – Planning Spring 2013 15 / 24
Action Schemas 1 Action 2 Precondition 3 Effect Günay () Chs. 10, 11 – Planning Spring 2013 16 / 24
Action Schemas 1 Action 2 Precondition 3 Effect Example: Action(Fly( p , from , to ), Pre: At ( p , from ) ∧ Plane ( p ) ∧ Airport ( from ) ∧ Airport ( to ) Eff: ¬ At ( p , from ) ∧ At ( p , to )) Günay () Chs. 10, 11 – Planning Spring 2013 16 / 24
Action Schemas 1 Action 2 Precondition 3 Effect Example: Action(Fly( p , from , to ), Pre: At ( p , from ) ∧ Plane ( p ) ∧ Airport ( from ) ∧ Airport ( to ) Eff: ¬ At ( p , from ) ∧ At ( p , to )) Is it FOL? Günay () Chs. 10, 11 – Planning Spring 2013 16 / 24
Air Cargo Example Günay () Chs. 10, 11 – Planning Spring 2013 17 / 24
Progression/Forward Search Like regular search. Günay () Chs. 10, 11 – Planning Spring 2013 18 / 24
Regression/Backward Search Start with goal, have many unknowns. Günay () Chs. 10, 11 – Planning Spring 2013 19 / 24
When to Choose Forward vs. Backward? Remember when to choose breadth-first vs. depth first. Fewer options when starting from the goal. Can think of other examples? Günay () Chs. 10, 11 – Planning Spring 2013 20 / 24
Searching the “Plan Space” Günay () Chs. 10, 11 – Planning Spring 2013 21 / 24
Searching the “Plan Space” How would one use genetic algorithms? Günay () Chs. 10, 11 – Planning Spring 2013 21 / 24
Current Trend: Forward Search with Heuristics Tiles example: Action(Slide( t , a , b ), Pre: On ( t , a ) ∧ Tile ( t ) ∧ Blank ( b ) ∧ Adj ( a , b ) Eff: On ( t , b ) ∧ Blank ( a ) ∧ ¬ On ( t , a ) ∧ ¬ Blank ( b )) Günay () Chs. 10, 11 – Planning Spring 2013 22 / 24
Current Trend: Forward Search with Heuristics Tiles example: Action(Slide( t , a , b ), Pre: On ( t , a ) ∧ Tile ( t ) ∧ Blank ( b ) ∧ Adj ( a , b ) Eff: On ( t , b ) ∧ Blank ( a ) ∧ ¬ On ( t , a ) ∧ ¬ Blank ( b )) How to use heuristics? Remember Romania routes. Günay () Chs. 10, 11 – Planning Spring 2013 22 / 24
Current Trend: Forward Search with Heuristics Tiles example: Action(Slide( t , a , b ), Pre: On ( t , a ) ∧ Tile ( t ) ∧ Blank ( b ) ∧ Adj ( a , b ) Eff: On ( t , b ) ∧ Blank ( a ) ∧ ¬ On ( t , a ) ∧ ¬ Blank ( b )) How to use heuristics? Remember Romania routes. Choose approximate solutions and use during search Delete terms from schema Günay () Chs. 10, 11 – Planning Spring 2013 22 / 24
Recommend
More recommend