Download presentation

Presentation is loading. Please wait.

Published byMoses Randall Modified over 2 years ago

1
Planning Methods based on Logic Propositional Calculus Predicate Calculus Situation Calculus Event Calculus

2
Situations,Actions and Fluents On(A,B) A is on B (eternally) On(A,B,S0) A is om B in situation S0 Holds(On(A,B),S0) On(A,B) ”holds” in situation S0 On(A,B) is called a Fluent Holds is s ”meta predicate” A fluent is a situation dependent predication. A situation or state may either be a start state e.g. S= S0, or the result of applying an action A in a state S S2 = do(S1,A)

3
Situation Calculus Metanotation Clear(u,s) Holds(Clear(u),s) On(x,y,s) Holds(On(x,y),s) Holds metapredicate On(x,y) Fluent S State Negative Effect axioms /Frame axioms are default (negation as failure)

4
SitCalc examples Actions : move(A,B,C) move block A from B to C Fluents: On(A,B) A is on B Clear(A) A is clear Predications: Holds(Clear(A),S0) A is clear in start state S0 Holds(On(A,B),S0) A is on B in S0 Holds(On(A,C),do(S0,move(A,B,C))) A is on C after move(A,B,C) is done in S0 Holds(Clear(A),do(S0,move(A,B,C))) A is (still) clear after moving move(A,B,C) in S0

5
Composite actions Holds(On(B,C), do(do(S0,move(A,B,Table),move(B,C)))) B is on C after starting in S0, and doing move(A,B,Table), move(B,C) Alternative representation Holds(PlanResult( [move(A,B),move(B,C)], S0)

6
Using Resolution to find plan We can verify Holds(On(B,C), do(do(S0,move(A,B,Table),move(B,C)))) But we can also find a plan ?- Holds(On(B,C),X). X =do(do(S0,move(A,B,Table),move(B,C))))

7
Effect /Frame axioms Positive Effect axioms Positive Frame axioms On(x,y,s)&Clear(x,s)&Clear(z,s) On(x,y,s)&(x \= u) & (x \= y) &(y \= z) => => On(x,y,do(move(u,v,z)),s) Clear(y,do(move(x,y,z)),s) Negative Effect axioms Negative Frame axioms On(x,y)&Clear(x,s)&Clear(z,s) \+ Clear(u,s) & (u \= y) & (x \= z) &(y\ = Fl) => => \+ Clear(u,do(move(x,y,z)),s) \+ Clear(y,do(move(x,y,z)),s)

8
Main formulation of planner holds(Condition,do(State,Action)) :- holds(Condition,State), % true already invariant(Condition,Action). % no action made it false holds(Condition,do(State,Action)) :- consequence(Condition,Action,Preconditions), % an action made it true holds(Preconditions,State).

9
Situation Calculus in Prolog Positive Effect axioms consequence(Predication,Action,Preconditions) Positive Frame axioms invariant(Predication,Action,Preconditions). Predications true initially given(Fact). Predications always true always(Predication). Predications true in all states fact(Predication). Predications implied within state implied(Predication,Predications)

10
MonkeyBanana in Situation Calculus The Monkey and Banana problem ----------------------------- In a Zoo, there is an apemother with her little son Julius. Julius is hungry, and apemother shall fetch a banana to Julius. Someone has hung up a banana in a rack at point B, so high that apemother cannot reach it. But at point C, there is a box that apemother can climb upon and reach higher. Apemother can push the box between any places if she has her hands free. Apemother can climb the box, climb doen and otherwise move around on the floor with or without anything in her hands. Apemother starts at point A while Julius is all the time in a corner J. Make a plan for apemother so that Julius gets his banana. % % Actions: and Properties: % % walk(FromLoc,ToLoc) at(Item,Location) | % push(box,FromLoc,ToLoc) on(Agent,Surface) | primary % climb_up(box) emptyhands(Agent) | % climb_down(box) has(Agent,Object) | % grab(banana) % drop(banana) reachable(Object,AtLoc) | derived A C B J

11
Tower of Hanoi in Situation Calculus consequence(on(X,Y), move(X,U,Y), moveable(X)&clear(X)&clear(Y)& on(X,U)&less(X,Y)). consequence(clear(U), move(X,U,Y), moveable(X)&clear(X)&clear(Y)& on(X,U)&less(X,Y)). invariant(on(D2,_),move(D1,_,_)):- dif(D2,D1). invariant(clear(X), move(_,_,W)):- dif(X,W) fact(less(disk(_),peg(_))). fact(less(disk(M),disk(N))):-M < N. fact(moveable(disk(_))). given(clear(peg(2))). given(clear(peg(3))). given(clear(disk(1))). H HHH HHHHHH H HHH HHHHHH Peg1 Peg2 Peg3

Similar presentations

OK

Chapter 9 IF Statement Bernard Chen. If Statement The main statement used for selecting from alternative actions based on test results It’s the primary.

Chapter 9 IF Statement Bernard Chen. If Statement The main statement used for selecting from alternative actions based on test results It’s the primary.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on cross docking warehouse Download ppt on algebraic expressions and identities for class 8 Ppt on emotional intelligence download Ppt on youth leadership development Ppt on vehicle to grid Ppt on different forms of agriculture Ppt on nature and human ads Free ppt on swine flu Ppt on data collection methods examples Ppt on fashion industry in india