I'm afraid I don't have the time to do this myself, but it would be a relatively simple extension for an interested party to make. Here's the short answer:
Find the call to plan-found-hook. You need to add a plan tree to the arguments passed to it.
Plan trees are not normally computed, so you need to do this. Fortunately, it should be pretty simple. The additional argument you would want to pass would be:
Thanks for the prompt response Robert - I had already tried that but it wasn't working (all I was getting back was the operators without the methods) - but it seems if I run (find-plans) with :plan-tree t as arguments then it does work. Cheers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That makes sense: we may not be collecting enough information to create the plan trees if you don't pass :plan-tree t into find-plans. Haven't actually checked.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm afraid I don't have the time to do this myself, but it would be a relatively simple extension for an interested party to make. Here's the short answer:
Find the call to plan-found-hook. You need to add a plan tree to the arguments passed to it.
Plan trees are not normally computed, so you need to do this. Fortunately, it should be pretty simple. The additional argument you would want to pass would be:
(apply-substitution (extract-tree plan) unifier)
So you could modify the call to:
(when (fboundp 'plan-found-hook)
(funcall (fdefinition 'plan-found-hook)
state which-plans final-plan partial-plan-cost depth
(apply-substitution (extract-tree final-plan) unifier)))
[As an aside, I'm pretty sure that FDEFINITION there is unnecessary -- could be just (FUNCALL 'PLAN-FOUND-HOOK ...)]
Then write whatever function you want to be the definition of SHOP2:PLAN-FOUND-HOOK
(defun shop2:plan-found-hook (state which-plans final-plan cost depth tree)
...)
Cheers,
r
Thanks for the prompt response Robert - I had already tried that but it wasn't working (all I was getting back was the operators without the methods) - but it seems if I run (find-plans) with :plan-tree t as arguments then it does work. Cheers.
That makes sense: we may not be collecting enough information to create the plan trees if you don't pass :plan-tree t into find-plans. Haven't actually checked.