% ------------------------- Problem Instance --------------------------
% --- Load domain definitions from an external file -------------------
:- [domaintask6].

% --- Definition of the initial state ---------------------------------
connected(loc11, loc21, east).
connected(loc11, loc12, north).
connected(loc12, loc22, east).
connected(loc12, loc13, north).
connected(loc13, loc23, east).
connected(loc13, loc14, north).
connected(loc14, loc24, east).

connected(loc21, loc31, east).
connected(loc21, loc22, north).
connected(loc22, loc32, east).
connected(loc22, loc23, north).
connected(loc23, loc33, east).
connected(loc23, loc24, north).

connected(loc31, loc32, north).
connected(loc32, loc33, north).

connected(loc21, loc11, west).
connected(loc12, loc11, south).
connected(loc22, loc12, west).
connected(loc13, loc12, south).
connected(loc23, loc13, west).
connected(loc14, loc13, south).
connected(loc24, loc14, west).

connected(loc31, loc21, west).
connected(loc22, loc21, south).
connected(loc32, loc22, west).
connected(loc23, loc22, south).
connected(loc33, loc23, west).
connected(loc24, loc23, south).

connected(loc32, loc31, south).
connected(loc33, loc32, south).

crate(cratec, loc21, s0).
crate(crateb, loc22, s0).
crate(cratea, loc23, s0).

target(cratea, loc12).
target(crateb, loc13).
target(cratec, loc11).

agent(loc32, s0).
visited(loc32, s0).

% --- Goal condition that the planner will try to reach ---------------
goal(S) :- forall(connected(Start, _, _), visited(Start, S)).
