update
[ker1415-1.git] / report / ass1.tex
index 19e16ab..7826f14 100644 (file)
                crate(cratea, loc12, s) \wedge
                crate(crateb, loc13, s) \wedge
                crate(cratec, loc11, s)$
-
-
 \end{itemize}
 
 \subsubsection{Task 2: Actions}
 \begin{itemize}
        \item{Q5}\\
-               $Poss(move(x, y), s) \equiv \\
-               (\exists z: connected(x, y, z)) \wedge\\
-               \neg(crate(x, y, s))$
+               $\begin{array}{rl}
+                       Poss(move(x, y), s) & \equiv \\
+                               & (\exists z: connected(x, y, z)) \wedge\\
+                               & \neg(crate(x, y, s))
+               \end{array}$
        \item{Q6}\\
-               $Poss(push(x, y), s) \equiv\\
-                       agent(x, s) \wedge\\
-                       (\exists z:
-                               connected(x, z, y) \wedge
-                               (\exists \gamma: crate(\gamma, z, s))
-                       \wedge\\
-                               (\exists \alpha: 
-                       connected(z, \alpha, y) \wedge
-                               (\nexists \beta: crate(\beta, \alpha, s))))$
+               $\begin{array}{rl}
+                       Poss(push(x, y), s) & \equiv\\
+                               & agent(x, s) \wedge\\
+                               & (\exists z:
+                                       connected(x, z, y) \wedge
+                                       (\exists \gamma: crate(\gamma, z, s))
+                                       \wedge\\
+                               &       (\exists \alpha: 
+                                               connected(z, \alpha, y) \wedge
+                                               (\nexists \beta: crate(\beta, \alpha, s))
+                                       )
+                               )
+               \end{array}$
        \item{Q7}\\
-               $agent(x, result(z, s)) \rightarrow\\
-                       (\exists y: z = move(y, x)) \vee\\
-                       (\exists \alpha:
-                               z = push(\beta, \alpha) \wedge
-                               connected(\beta, x, \alpha)) \vee\\
-                       (\exists \epsilon, \gamma:
-                               z \neq move(x, \epsilon) \wedge
-                               z \neq push(x, \gamma) \wedge
-                               agent(x, s))\\
-               crate(x, y, result(A, s)) \rightarrow\\
-                       (\exists z,\alpha:
-                               A = push(z, \alpha),
-                               (\exists \beta:
-                                       connected(z, \beta, \alpha),
-                                       connected(\beta, y, \alpha),
-                                       crate(x, \beta, s)
+               $\begin{array}{rl}
+                       agent(x, result(z, s)) & \rightarrow\\
+                               & (\exists y: z = move(y, x)) \vee\\
+                               & (\exists \alpha:
+                                       z = push(\beta, \alpha) \wedge
+                                       connected(\beta, x, \alpha)) \vee\\
+                               & (\exists \epsilon, \gamma:
+                                       z \neq move(x, \epsilon) \wedge
+                                       z \neq push(x, \gamma) \wedge
+                                       agent(x, s))\\
+                                       crate(x, y, result(A, s)) & \rightarrow\\
+                               & (\exists z,\alpha:
+                                       A = push(z, \alpha),
+                                       (\exists \beta:
+                                               connected(z, \beta, \alpha),
+                                               connected(\beta, y, \alpha),
+                                               crate(x, \beta, s)
+                                       )
+                               ) \vee\\
+                               & (\exists z,\alpha:
+                                       A \neq push(z, \alpha)\wedge
+                                       connected(z, y, \alpha)\wedge
+                                       crate(x, y, s)
                                )
-                       ) \vee\\
-                       (\exists z,\alpha:
-                               A \neq push(z, \alpha)\wedge
-                               connected(z, y, \alpha)\wedge
-                               crate(x, y, s)
-                       )
-               $
+               \end{array}$
 \end{itemize}
 
 \subsection{Part 2: Implementation}
 \subsubsection{Task 3: Translate Axioms}
 The only optimization added to the file is the reverse move optimization,
 disallowing the agent to reverse a move immediatly.
-\inputminted{prolog}{./src/domaintask1.pl}
+\begin{listing}[H]
+       \caption{Domain description task 1}
+       \prologcode{./src/domaintask1.pl}
+\end{listing}
 
 \subsubsection{Task 4: The Planning Problem in Figure 1}
-\inputminted{prolog}{./src/instancetask4.pl}
+\begin{listing}[H]
+       \caption{Instance description task 4}
+       \prologcode{./src/instancetask4.pl}
+\end{listing}
 
 \subsubsection{Task 5: Crates go to Any Goal Location}
-\inputminted{prolog}{./src/instancetask5.pl}
+\begin{listing}[H]
+       \caption{Instance description task 5}
+       \prologcode{./src/instancetask5.pl}
+\end{listing}
 
 \subsubsection{Task 6: Inverse Problem}
 
 \subsection{Part 3: Extending the domain}
+\subsubsection{Task 7: Unlocking the Crates}
+\begin{listing}[H]
+       \caption{Instance description task 7}
+       \prologcode{./src/instancetask7.pl}
+\end{listing}
+\begin{listing}[H]
+       \caption{Domain description task 7}
+       \prologcode{./src/domaintask7.pl}
+\end{listing}
 
 \subsection{Part 4: General questions}
 \subsubsection{Task 10: Sitcalc expressivity}