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

re: project 3 extra credit portion




At 04:01 PM 11/15/2001 -0700, Rachna Mathur wrote:

>Prof Rao,
>
>For the extra credit on this assignment, can we turn that in tomorrow
>as we
>had done for the first project (you had allowed for submission of the
>extra
>credit until the final late deadline time)?
>
>Thank you!
>Rachna

Sure--I will take the extra credit portion until Tuesday without
penalty (since that is the last deadline for project 3). 

If you doing extra credit portion--you should read the following:
 
Recall that to do plangraph based heuristics for progression search,
we need to *RECOMPUTE* the plangraph 
for each new state (making that the initial state).

Since the only accessor function you have for computing planninggraphs 
is (compute-pg p)
which just computes the planning graph for problem p, you need a way
to use that to compute planning graphs 
corresponding to a new initial state.

Here is a piece of magic code that you can use for this purpose:


(defun change-init-state (problem state &aux np new-name )
  (unless (problem-p problem)
    (setq problem (get-problem problem)))
   (setq np (copy-problem problem))
   (setf (problem-minit np) (cons :and state))
   (setf new-name  (intern (gensym (symbol-name (problem-name problem)))))
   (setf (problem-name np) new-name)
   (pushnew  new-name  *problems*)
   (setf (get new-name 'problem) np)
   new-name
  )


just cut this piece of code, put it in your file. You can use this
code to take a problem p, and a new initial state s and generate a new 
problem p' whose goals are the same as that of p, but whose init state 
is s

Here is an example:

=======================
USER(100): (change-init-state 'huge-fct '((OBJECT A) (OBJECT B) (ON-TABLE A) (ON-TABLE B) (CLEAR A) (CLEAR B) (ARM-EMPTY)))
HUGE-FCT336577
USER(101): (setq jj *)
HUGE-FCT336577
USER(102): (compute-pg jj)

 Read in the problem and domain ...
Levels: 1[A:12 P:12 M:35 2[A:16 P:16 M:149 3[A:18 P:18 M:235 4[A:18 P:18 M:233 5[A:18 P:18 M:202 6[A:18 P:18 M:188 7[A:18 P:18 M:183 8[A:18 P:18 M:182 9[A:18 P:18 M:182
The graph has leveled off now
 Compute the hsp heuristic values ...
T
USER(103): 
=======================

Good luck... 

Rao
[Nov 15, 2001]