CHAPTER 11 PLANNING 1 Inha University Intelligent ECommerce

  • Slides: 13
Download presentation
CHAPTER 11 PLANNING 석사 1차 Inha University Intelligent E-Commerce Systems Lab 지 애 띠

CHAPTER 11 PLANNING 석사 1차 Inha University Intelligent E-Commerce Systems Lab 지 애 띠

CONTENTS THE PLANNING PROBLEM n PLANNING WITH STATE-SPACE SEARCH n PARTIAL-ORDER PLANNING n PLANNING

CONTENTS THE PLANNING PROBLEM n PLANNING WITH STATE-SPACE SEARCH n PARTIAL-ORDER PLANNING n PLANNING GRAPH n Intelligent E-Commerce Systems Lab

THE PLANNING PROBLEM n Problems of a search-based problem solving agent (against large, real-world

THE PLANNING PROBLEM n Problems of a search-based problem solving agent (against large, real-world problems) ü ü ü The problem-solving agent can be overwhelmed by irrelevant actions Finding a good heuristic function is difficult It cannot take advantage of problem decomposition Intelligent E-Commerce Systems Lab

THE PLANNING PROBLEM n The language of planning problems (using first-order logic) ü ü

THE PLANNING PROBLEM n The language of planning problems (using first-order logic) ü ü ü Representation of states – ground, function-free, closed-world assumption Representation of goals Representation of actions Action(Fly(p, from, to), PRECOND : At(p, from)ΛPlane(p)ΛAirport(from)ΛAirport(to) EFFECT : ¬At(p, from)ΛAt(p, to)) Intelligent E-Commerce Systems Lab

THE PLANNING PROBLEM n Current state At(P 1, JFK)∧At(P 2, SFO)∧Plane(P 1)∧Plane(p 2)∧Airpo rt(JFK)∧Airport(SFO)

THE PLANNING PROBLEM n Current state At(P 1, JFK)∧At(P 2, SFO)∧Plane(P 1)∧Plane(p 2)∧Airpo rt(JFK)∧Airport(SFO) n Precondition At(p, from)∧Plane(p)∧Airport(from)∧Airport(to) n With substitution n Fly(P 1, JKF, SFO) is applicable Intelligent E-Commerce Systems Lab {p/P 1, from/JKF, to/SFO}

THE PLANNING PROBLEM n EXAMPLE : The blocks world Init(On(A, Table) ∧ On(B, Table)

THE PLANNING PROBLEM n EXAMPLE : The blocks world Init(On(A, Table) ∧ On(B, Table) ∧ On(C, Table) ∧ Block(A) ∧ Block(B) ∧ Block(C) ∧ Clear(A) ∧ Clear(B) ∧ Clear(C)) Goal(On(A, B) ∧ On(B, C)) Action(Move(b, x, y), PRECOND: On(b, x) ∧ Clear(b) ∧ Clear(y) ∧ Block(b) ∧ (b ≠ x) ∧ (b ≠ y) ∧ (x ≠ y), EFFECT: On(b, y) ∧ Clear(x) ∧ ¬On(b, x) ∧ ¬Clear(y)) Action(Move. To. Table(b, x), PRECOND: On(b, x) ∧ Clear(b) ∧ Block(b) ∧ (b ≠ x), EFFECT: On(b, Table) ∧ Clear(x) ∧ ¬On(b, x)) One solution [Move(B, Table, C), Move(A, Table, B)] Intelligent E-Commerce Systems Lab

PLANNING WITH STATE-SPACE SEARCH n Forward state-space graph At(P 1, A) At(P 2, A)

PLANNING WITH STATE-SPACE SEARCH n Forward state-space graph At(P 1, A) At(P 2, A) n Fly(P 1, A, B) At(P 1, B) At(P 2, A) Fly(P 2, A, B) At(P 1, A) At(P 2, B) Backward state-space graph At(P 1, A) At(P 2, B) At(P 1, B) At(P 2, A) Intelligent E-Commerce Systems Lab Fly(P 1, A, B) At(P 1, B) At(P 2, B) Fly(P 2, A, B)

PLANNING WITH STATE-SPACE SEARCH n n Forward state-space search ü Similar to Problem-solving agent

PLANNING WITH STATE-SPACE SEARCH n n Forward state-space search ü Similar to Problem-solving agent approach Backward state-space search ü Briefly bidirectional search ü Only consider relevant actions (but irrelevant actions can lead to the goal) ü At(C 1, B) ∧ At(C 2, B) ∧…∧ At(C 20, B) ü Consider the conjunction At(C 1, B), we can seek actions that have this effect : Unload(C 1, p, B) ü Therefore, any predecessor state must include these precondition : In(C 1, p) ∧ At(p, B) Intelligent E-Commerce Systems Lab

PARTIAL-ORDER PLANNING Actions: {Right. Sock, Right. Shoe, Left. Sock, Left. Shoe, Start, Finish} Orderings:

PARTIAL-ORDER PLANNING Actions: {Right. Sock, Right. Shoe, Left. Sock, Left. Shoe, Start, Finish} Orderings: {Right. Sock < Right. Shoe, Left. Sock < Left. Shoe} Links: Right. Sock. On Left. Sock. On {Right. Sock Right. Shoe, Left. Sock Left. Shoe, Right. Shoe. On Right. Shoe Finish, Left. Shoe Open Precondition: { } Intelligent E-Commerce Systems Lab Left. Shoe. On Finish}

PARTIAL-ORDER PLANNING Can be any order between two set Start (not ordered) Left Sock

PARTIAL-ORDER PLANNING Can be any order between two set Start (not ordered) Left Sock Right Sock You should wear left(right) sock before left(right) shoe. Left Shoe Right Shoe Finish Intelligent E-Commerce Systems Lab (ordered)

PARTIAL-ORDER PLANNING n Example : the simple flat tire problem Init(At(Flat, Axle) ∧ At(Spare,

PARTIAL-ORDER PLANNING n Example : the simple flat tire problem Init(At(Flat, Axle) ∧ At(Spare, Truck)) Goal(At(Spare, Axle)) Action(Remove(Spare, Truck), PRECOND: At(Spare, Truck) EFFECT: ¬At(Spare, Truck) ∧ At(Spare, Ground)) Action(Remove(Flat, Axel), PRECOND: At(Flat, Axel) EFFECT: ¬At(Flat, Axel) ∧ At(Flat, Ground)) Action(Put. On(Spare, Axel), PRECOND: At(Spare, Ground) ∧ ¬At(Flat, Axel) EFFECT: ¬At(Spare, Ground) ∧ At(Spare, Axel)) Action(Leave. Overnight, PRECOND: EFFECT: ¬At(Spare, Ground) ∧ ¬At(Spare, Axel) ∧ ¬At(Spare, Truck) ∧ ¬At(Flat, Ground) ∧ ¬At(Flat, Axel)) Intelligent E-Commerce Systems Lab

PARTIAL-ORDER PLANNING At(Spare, Truck) Remove(Spare, Truck) At(Spare, Truck) SATRT At(Flat, Axel) At(Spare, Ground) Put.

PARTIAL-ORDER PLANNING At(Spare, Truck) Remove(Spare, Truck) At(Spare, Truck) SATRT At(Flat, Axel) At(Spare, Ground) Put. On(Spare, Axel) ¬At(Flat, Axel) Remove(Flat, Axel) ¬At(Flat, Ground) Leave. Overnight ¬At(Spare, Axel) ¬At(Spare, Ground) ¬At(Spare, Truck) Intelligent E-Commerce Systems Lab FINISH At(Spare, Axel)

PLANNING GRAPH Init(Have(Cake)) Goal(Have(Cake)ΛEaten(Cake)) Action(Eat(Cake) PRECOND: Have(Cake) EFFECT: ¬Have(Cake)ΛEaten(Cake)) Action(Bake(Cake) PRECOND: ¬Have(Cake) EFFECT: Have(Cake))

PLANNING GRAPH Init(Have(Cake)) Goal(Have(Cake)ΛEaten(Cake)) Action(Eat(Cake) PRECOND: Have(Cake) EFFECT: ¬Have(Cake)ΛEaten(Cake)) Action(Bake(Cake) PRECOND: ¬Have(Cake) EFFECT: Have(Cake)) S 0 A 0 S 1 A 1 S 2 Bake(Cake) Have(Cake) ¬Have(Cake) Eat(Cake) ¬Eaten(Cake) Intelligent E-Commerce Systems Lab Eaten(Cake) ¬Eaten(Cake)