|context> => |context: prolog monkey bananas problem> url |context> => |url: http://www.inf.ed.ac.uk/teaching/courses/aipp/lecture_slides/15_Planning.pdf> set-up-initial-state |*> #=> on |monkey> => |floor> on |box> => |floor> at |monkey> => |a> at |box> => |b> at |bananas> => |c> status |bananas> => |hanging> |state initiated> test-for-goal-state |*> #=> goal-state |count> => |null> goal-state |count> +=> is-equal(on |monkey>, |box>) goal-state |count> +=> is-equal(on |box>, |floor>) goal-state |count> +=> is-equal(at |monkey>, |c>) goal-state |count> +=> is-equal(at |box>, |c>) goal-state |count> +=> is-equal(at |bananas>, |c>) goal-state |count> +=> is-equal(status |bananas>, |grabbed>) if(drop-below[0.95] is-equal(goal-state |count>, |null> + 6|yes>), |reached goal state!>, |not reached goal state>) print-current-state |*> #=> print (|monkey is on> __ on |monkey>) print (|monkey is at> __ at |monkey>) print (|box is on> __ on |box>) print (|box is at> __ at |box>) print (|bananas are at> __ at |bananas>) print (|banana status is> __ status |bananas>) |> go (*,*) #=> precondition |count> => |null> precondition |count> +=> is-equal(at |monkey>, |__self1>) precondition |count> +=> is-equal(on |monkey>, |floor>) next |location> => |__self2> process if(drop-below[0.95] is-equal(precondition |count>, |null> + 2|yes>), |go action A>, |go action B>) process |go action A> #=> at |monkey> => next |location> |monkey moved to> __ next |location> process |go action B> #=> |monkey failed to move to> __ next |location> push (*,*,*) #=> precondition |count> => |null> precondition |count> +=> is-equal(at |monkey>, |__self2>) precondition |count> +=> is-equal(at |__self1>, |__self2>) precondition |count> +=> is-equal(on |monkey>, |floor>) precondition |count> +=> is-equal(on |__self1>, |floor>) next |location> => |__self3> the |object> => |__self1> process if(drop-below[0.95] is-equal(precondition |count>, |null> + 4|yes>), |push action A>, |push action B>) process |push action A> #=> at |monkey> => next |location> at the |object> => next |location> |monkey pushed> __ the |object> __ |to> __ next |location> process |push action B> #=> |monkey failed to push> __ the |object> __ |to> __ next |location> climb-on (*) #=> precondition |count> => |null> precondition |count> +=> is-equal(at |monkey>, at |__self1>) precondition |count> +=> is-equal(on |monkey>, |floor>) precondition |count> +=> is-equal(on |__self1>, |floor>) the |object> => |__self1> process if(drop-below[0.95] is-equal(precondition |count>, |null> + 3|yes>), |climb-on action A>, |climb-on action B>) process |climb-on action A> #=> on |monkey> => the |object> |monkey climbed on> __ the |object> process |climb-on action B> #=> |monkey failed to climb on> __ the |object> grab (*) #=> precondition |count> => |null> precondition |count> +=> is-equal(on |monkey>, |box>) precondition |count> +=> is-equal(at |__self1>, at |box>) precondition |count> +=> is-equal(status |__self1>, |hanging>) the |object> => |__self1> process if(drop-below[0.95] is-equal(precondition |count>, |null> + 3|yes>), |grab action A>, |grab action B>) process |grab action A> #=> status the |object> => |grabbed> |monkey grabbed> __ the |object> process |grab action B> #=> |monkey failed to grab> __ the |object>