means-ends planner with priorities/costs

From: Martin Kant (please_dont_at_mail-me.com)
Date: 10/06/04


Date: Wed, 06 Oct 2004 14:15:16 +0200


Hello,
I'm trying to extend the means-ends planner with goal regression (a
slightly modified copy of the one in Bratko's book is attached).
The extension would be costs or priorities in the can/3
(Priority(integer), Action, Condition) term. I though the planner
should fail if a can/X clause is found which satifsfies the same
condition but with a higher priority than the actual choosen one. I
tried to add some lines at the end of the achieves clause then in
the regress clause but even if I trace the whole thing I cannot
find a good place for this. I get all Actions in can/3 with the
same condition:
findall(X, can(_, X, Condition), Actions),
Then I take the Actions and compare the costs. If a cost higher than
the actual selected can/3 is found the comparison will fail. So
backtracking should happen and another action with the same
condition should be found (at last the highest), shouldn't it? Even
if the can/3 clause with the highest action is found in the first
place, the whole thing won't fail but the planner runs into an
'endless' recursion (stack overflow) because somehow the goals
don't get regressed anymore. Maybe someone has already modified the
planner in such a way and can give me some tips (or a copy).

Thanks in advance,
Martin