From 67221f6cd065547796a15312b6a4876edf8a9cc1 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Thu, 30 Oct 2014 08:57:03 +0100 Subject: [PATCH] this works way better --- report/src/domaintask1.pl | 2 +- report/src/instancetask1.pl | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/report/src/domaintask1.pl b/report/src/domaintask1.pl index dadf72c..1f41f38 100644 --- a/report/src/domaintask1.pl +++ b/report/src/domaintask1.pl @@ -16,7 +16,7 @@ poss(push(From, Direction), S) :- connected(From, CrateLocation, Direction), crate(_, CrateLocation, S), connected(CrateLocation, CrateTarget, Direction), - not(crate(_, CrateTarget, Direction)). + not(crate(_, CrateTarget, S)). % --- Successor state axioms ------------------------------------------ agent(AgentPlek, result(A, S)) :- diff --git a/report/src/instancetask1.pl b/report/src/instancetask1.pl index 20e1f1e..ad091b2 100644 --- a/report/src/instancetask1.pl +++ b/report/src/instancetask1.pl @@ -3,6 +3,7 @@ :- [domaintask1]. % --- Definition of the initial state --------------------------------- +% north and east connected(loc1-1, loc2-1, north). connected(loc1-1, loc1-2, east). connected(loc1-2, loc2-2, north). @@ -21,8 +22,27 @@ connected(loc2-3, loc2-4, east). connected(loc3-1, loc3-2, north). connected(loc3-2, loc3-3, north). -connected(X, Y, east) :- connected(Y, X, west). -connected(X, Y, north) :- connected(Y, X, south). +% The other way around, west and south +connected(loc2-1, loc1-1, south). +connected(loc1-2, loc1-1, west). +connected(loc2-2, loc1-2, south). +connected(loc1-3, loc1-2, west). +connected(loc2-3, loc1-3, south). +connected(loc1-4, loc1-3, west). +connected(loc2-4, loc1-4, south). + +connected(loc3-1, loc2-1, south). +connected(loc2-2, loc2-1, west). +connected(loc3-2, loc2-2, south). +connected(loc2-3, loc2-2, west). +connected(loc3-3, loc2-3, south). +connected(loc2-4, loc2-3, west). + +connected(loc3-2, loc3-1, south). +connected(loc3-3, loc3-2, south). + +%connected(X, Y, east) :- connected(Y, X, west). +%connected(X, Y, north) :- connected(Y, X, south). crate(crate-c, loc2-1, s0). crate(crate-b, loc2-2, s0). -- 2.20.1