You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been trying to use GraphPlan for some custom planning problems and have run into an issue. Linearizing the solution plan from GraphPlan doesn't always produce a valid plan. This is true even for the examples already in the code base. I've tried this so far with air_cargo and three_block_tower using the following:
from planning import *
prob = three_block_tower()
plan = linearize(GraphPlan(prob).execute())
print(plan)
try:
for action in plan:
prob.act(expr(action))
if prob.goal_test():
print("success")
else:
print("fail to obtain goal from actions")
except:
print("fail on violated precondition")
Executing this code multiple times, one should see some successes and some failures which violate the preconditions. I tried creating problem objects and running GraphPlan on them in a loop, but that results in identical plans dropping out of the loop that either always succeed or always fail, again apparently randomly. Therefore it seems somewhat more "globally" stochastic, as in per Python process, rather than per-solve-attempt stochastic, if that makes sense.
Would be happy to find out this is user error! Thanks for any ideas and to those who take a deeper look.
This is resolved by the GraphPlan rework in PR #1324 (correct proposition/action mutexes, interference, and level-off). Verified on current master: linearize(GraphPlan(three_block_tower()).execute()) yields a valid 3-action plan that reaches the goal, and air_cargo a valid 6-action plan. Closing as resolved.
Activity
dmeoli commentedon Jun 26, 2026
This is resolved by the GraphPlan rework in PR #1324 (correct proposition/action mutexes, interference, and level-off). Verified on current master: linearize(GraphPlan(three_block_tower()).execute()) yields a valid 3-action plan that reaches the goal, and air_cargo a valid 6-action plan. Closing as resolved.