1 \subsection{Part
1: Modelling Sokoban
}
2 \subsubsection{Task
1: Knowledge base
}
5 We describe the connections using the four main directional words,
6 namely: $north,south,east,west$. We only define the connection for the
7 $north$ and $east$ directions because we can infer the $south$ and
8 $west$ directions from it.
10 We use the functions $agent(X, S_i), crate(cratename, X, S_i)$ and
11 $target(cratename, X)$ to easily represent the information.
17 \subsubsection{Task
2: Actions
}
22 Poss(move(x, y), s)
\equiv &\\
23 & (
\exists z: connected(x, y, z))
\wedge\\
24 &
\neg(crate(x, y, s))
\wedge
29 $Poss(push(x, y), s)
\equiv\\
32 connected(x, z, y)
\wedge
33 (
\exists \gamma: crate(
\gamma, z, s))
36 connected(z,
\alpha, y)
\wedge
37 \neg (
\exists \beta: crate(
\beta,
\alpha, s))))$
39 $agent(x, result(z, s))
\rightarrow\\
40 (
\exists y: z = move(y, x))
\vee\\
42 z = push(
\beta,
\alpha)
\wedge
43 connected(
\beta, x,
\alpha))
\vee\\
44 (
\exists \epsilon,
\gamma:
45 not(z = move(x,
\epsilon))
\wedge
46 not(z = push(x,
\gamma))
\wedge
48 crate(x, y, result(A, s))
\rightarrow\\
52 connected(z,
\beta,
\alpha),
53 connected(
\beta, y,
\alpha),
58 not(A = push(z,
\alpha)),
59 connected(z, y,
\alpha),
65 \subsection{Part
2: Implementation
}
66 \subsubsection{Task
3: Translate Axioms
}
67 The only optimization added to the file is the reverse move optimization,
68 disallowing the agent to reverse a move immediatly.
69 \inputminted{prolog
}{./src/domaintask1.pl
}
71 \subsubsection{Task
4: The Planning Problem in Figure
1}
72 \inputminted{prolog
}{./src/instancetask4.pl
}
74 \subsubsection{Task
5: Crates go to Any Goal Location
}
75 \inputminted{prolog
}{./src/instancetask5.pl
}
77 \subsubsection{Task
6: Inverse Problem
}
79 \subsection{Part
3: Extending the domain
}
81 \subsection{Evaluation
}
83 \item{How much time did it take?
}\\
85 \item{What would you like to see changed?
}\\
86 p1t1: There is an ambiguity in p1t1Q3, it's not clear if the starred
87 locations should be included in the initial state(therefore not only in