I have some problem with planner (not the new version):
When trying to run the copy of the farmer/goat... from the book, I get this error message:
Undefined procedure: c_PICAT_TABLE_MAP_DEL_cc/2
(for best_plan, plan works).
Please check if the new version has this problem as well.
Thank you,
JF
-----
import planner.
main =>
S0 = [s,s,s,s],
best_plan(S0,Plan),
writeln(Plan).
final([n,n,n,n]) => true.
action([F,F,G,C],S1,Action,ActionCost) ?=>
Action = farmer_wolf,
ActionCost = 1,
opposite(F,F1),
S1 = [F1,F1,G,C],
not unsafe(S1).
action([F,W,F,C],S1,Action,ActionCost) ?=>
Action = farmer_goat,
ActionCost = 1,
opposite(F,F1),
S1 = [F1,W,F1,C],
not unsafe(S1).
action([F,W,G,F],S1,Action,ActionCost) ?=>
Action = farmer_cabbage,
ActionCost = 1,
opposite(F,F1),
S1 = [F1,W,G,F1],
not unsafe(S1).
action([F,W,G,C],S1,Action,ActionCost) =>
Action = farmer_alone,
ActionCost = 1,
opposite(F,F1),
S1 = [F1,W,G,C],
not unsafe(S1).
index (+,-) (-,+)
opposite(n,s).
opposite(s,n).
unsafe([F,W,G,_C]), W == G, F !== W => true.
unsafe([F,_W,G,C]), G == C, F !== G => true.
Dne středa 29. října 2025 v 22:00:29 UTC+1 uživatel Oisín Mac Fhearaí napsal: