updated version very nice appendix jizz
[ker1415-1.git] / report / ass1.tex
index 4e4c132..0e4034e 100644 (file)
 \newpage
 \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.
-\begin{listing}[H]
-       \caption{Domain description task 1}
-       \prologcode{./src/domaintask1.pl}
-\end{listing}
+The domain description can be found in \textit{./src/domaintask1.pl} and in
+Listing~\ref{domaintask1} and is a literal translation from logics to prolog
+code except for the visited predicate. The visited predicate disallows the
+agent to reverse it's previous move immediatly. This makes the planning much
+faster because it can cut of a lot of branches.
 
 \subsubsection{Task 4: The Planning Problem in Figure 1}
-\begin{listing}[H]
-       \caption{Instance description task 4}
-       \prologcode{./src/instancetask4.pl}
-\end{listing}
+The instance description for this task can be found in
+\textit{./src/instancetask4.pl} and in Listing~\ref{instancetask4}. This is a
+literal translation of the description in logics. The goal location for the
+crates are hardcoded to increase the performance.
 
 \subsubsection{Task 5: Crates go to Any Goal Location}
-\begin{listing}[H]
-       \caption{Instance description task 5}
-       \prologcode{./src/instancetask5.pl}
-\end{listing}
+The instance description for this task can be found in
+\textit{./src/instancetask5.pl} and in Listing~\ref{instancetask5}. This is an
+adaptation of Listing~\ref{instancetask4} in the sense that in the goal state
+the same goal locations for the crates apply but the crate instance does not
+matter any more. Any combination of crates on the locations will be a valid
+goal.
 
 \subsubsection{Task 6: Inverse Problem}
-\begin{listing}[H]
-       \caption{Instance description task 6}
-       \prologcode{./src/instancetask6.pl}
-\end{listing}
-\begin{listing}[H]
-       \caption{Domain description task 6}
-       \prologcode{./src/domaintask6.pl}
-\end{listing}
+For tackling the inverse problem we have added a visited predicate that
+describes if the agent has visited that particular location. In the instance
+description found in \textit{./src/instancetask6.pl} or in
+Listing~\ref{instancetask6} we made sure to mark the starting location for the
+agent as visited because the agent does not have to revisit the starting
+location. The goal is a simple forall that will only satisfy if for all
+locations known the visited fluent is true. To generate all locations we used
+the fact that all locations are connected to some other location. This could be
+implemented more efficiently because in the current situation the locations
+sequence contains a lot of duplicate locations. We reused the domain
+description from task 4 with the visited fluent and adapted it slightly so that
+it is never unset and therefore records all locations the agent has been. The
+full ode can be found in \textit{./src/domaintask6.pl} or in
+Listing~\ref{domaintask6}.
 
 \newpage
 \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}
+For adding keys we have added in the instance definition, found in
+\textit{./src/instancetask7.pl} or Listing~\ref{instancetask7}, new key fluents
+that define were the keys are found. We also changed the crate fluent to arity
+$4$ so that it also has a key attached to it. In the domain specification,
+found in \textit{./src/domaintask7.pl} or Listing~\ref{domaintask7}, we added a
+pickup move that allows the agent to pickup a certain key. When the agent picks
+up a key the keyinbag fluent is then set so that the possibility function for
+the push action can incorporate the fact that a key has to be picked up to push
+a certain crate.
 
 \newpage
 \subsection{Part 4: General questions}