[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proj 3 - number of steps



We talked about this at length in the beginning of class yesterday.

You should stop when the current regressed state is a subset of the initial 
state.

(There is no reason for you to try and wait until regressed state becomes 
exactly equal to the
initial state. Initial state may have a whole bunch of stuff irrelevant to 
the toplevel goals and there is no
reason why all of it should be used as preconditions of the plan. Consider 
the scenario where you have a
pen, a pencil, a vaccum cleaner, a tv, a remote control, a sledge hammer 
and so on in the initial state.
Your top level goal is to write your name. So, by regressing that goal over 
"write with pen" action, you get
a "Have a pen" regressed state--which is a subset of the initial state so 
you stop. By insisting on the regressed state
being exactly equal to init state for termination, you will have a silly 
plan that winds up using all the rest of the tools
as part of the plan to write your name)

rao


At 12:17 AM 11/14/2001 -0700, you wrote:

>Prof Rao,
>For 'class-problem, when the planning graph is computed and can be done in two
>steps, my understanding is that it is because the goal function basically
>returns true when the current state is a subset (which can be a lesser number
>of literals) of the initial state. But I
>set my goal function so it checks to see that the positve literals of the
>current state match the intial state *exactly* so that for this same problem
>it takes 4 steps (that is it searches all the way to the exact initial
>state). Otherwise, have you really reached the inital state if you only check
>for a subset? When I use yours it does come out to 2 steps.
>
>
>My reg-goal-p
>;;
>; reg-goal-p
>;
>; Check whether the STATE of the node is a goal
>; Returns T or F
>;;
>
>(defun reg-goal-p (node)
>   (let* ((pos-literals (op-adds node))
>          )
>
>           (cond ((and (is-subset pos-literals *init-state*)
>                       (equal (length pos-literals) (length *init-state*)))
>                  (write-line "Search Succeeded!")))
>     ))
>
>
> > (plan 'class-problem)
>
>Levels: 1[A:12 P:12 M:35 Mm:0] 2[A:16 P:16 M:149 Mm:0]
>------------------The Plan---------------
>Step 1:<(PICK-UP A)>
>Step 2:<(STACK A B)>
>  The plan is verified to be correct
>((<(PICK-UP A)>) (<(STACK A B)>))
>
>
>Thanks!
>Rachna