Download presentation
Presentation is loading. Please wait.
Published byJonathan Carter Modified over 8 years ago
1
Ch. 11 – Planning Supplemental slides for CSE 327 Prof. Jeff Heflin
2
Goal-Based Agent sensors actuators Agent Environment What the world is like now What action I should do now Goals State How the world evolves What my actions do What it will be like if I do action A From Fig. 2.13, p. 50
3
Blocks World Example actions Action(Move(b,x,y), Precond: On(b,x) Clear(b) Clear(y) Block(y), Effect: On(b,y) Clear(x) On(b,x) Clear(y)) Action(MoveToTable(b,x), Precond: On(b,x) Clear(b), Effect: On(b,Table) Clear(x) On(b,x)) initial state –On(A,Table) On(B,Table) Clear(A) Clear(B) Clear(Table) Block(A) Block(B) goal –On(A,B)
4
Applicable Actions Action(Move(b,x,y), Precond: On(b,x) Clear(b) Clear(y) Block(y), Effect: On(b,y) Clear(x) On(b,x) Clear(y)) Action(MoveToTable(b,x), Precond: On(b,x) Clear(b), Effect: On(b,Table) Clear(x) On(b,x)) an action a is applicable in any state that satisfies the precondition e.g., Move(A,Table,B) is applicable in initial state –unify with action description –apply substitution = {b/A, x/Table, y/B} to the action’s Precondition –initial state satisfies On(A,Table) Clear(A) Clear(B) Block(B) Initial State: On(A,Table) On(B,Table) Clear(A) Clear(B) Clear(Table) Block(A) Block(B)
5
A Blocks World Problem initial state –On(A,Table) On(B,Table) On(C,Table) Clear(A) Clear(B) Clear(C) Clear(Table) Block(A) Block(B) Block(C) goal state –On(C,Table) On(B,C) On(A,B) actions –Action(Move(b,x,y), Precond: On(b,x) Clear(b) Clear(y) Block(y), Effect: On(b,y) Clear(x) On(b,x) Clear(y)) –Action(MoveToTable(b,x), Precond: On(b,x) Clear(b), Effect: On(b,Table) Clear(x) On(b,x))
6
Backward State-Space Search On(C,T) ^ On(B,C) ^ On(A,B) On(C,T) ^ On(A,B) ^ On(B,x) ^ Clear(B) ^ Clear(C) On(C,T) ^ On(B,C) ^ On(A,x) ^ Clear(A) ^ Clear(B) On(C,T) ^ On(A,x) ^ Clear(A) ^ Clear(B) ^ On(B,y) ^ Clear(C) Move(B,x,C) x C Move(A,x,B) x B Move(B,y,C) y C GOAL: INITIAL STATE: (if x=T and y= T) Move(A,y,B)? Inconsistent: has effect delete Clear(B) ?? Move(C,x,T) MoveToTable(C,x) bold – literal that was added to the predecessor underline – goal is not satisfied by initial state
7
POP Example Problem Actions –Action(ActionA, PRECOND: Z, EFFECT: Y Z) –Action(ActionB, PRECOND: Z, EFFECT: X) –Action(ActionC, PRECOND: X, EFFECT: V) –Action(ActionD, PRECOND: Y, EFFECT: W Y) Initial State: Z Goal State: V W
8
POP Solution X Z ActionB V X ActionC ZYZY Z ActionA WYWY Y ActionD Finish VWVW Start Z X V W Y Z Z
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.