From: Mart Lubbers Date: Tue, 7 Oct 2014 10:30:44 +0000 (+0200) Subject: part1 done X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=120783d22ac2c49ce71a775b756356aaae8cfa9b;p=ker1415-1.git part1 done --- diff --git a/report/ass1.tex b/report/ass1.tex new file mode 100644 index 0000000..2a7f53a --- /dev/null +++ b/report/ass1.tex @@ -0,0 +1,75 @@ +\subsection{Part 1: Modelling Sokoban} +\subsubsection{Task 1: Knowledge base} +\begin{itemize} + \item{Q1}\\ + We describe the connections using the four main directional words, + namely: $north,south,east,west$. We only define the connection for the + $north$ and $east$ directions because we can infer the $south$ and + $west$ directions from it. + \item{Q2}\\ + We use the functions $agent(X, S_i), crate(cratename, X, S_i)$ and + $target(cratename, X)$ to easily represent the information. + \item{Q3}\\ + \begin{lstlisting}[language=prolog] +connected(loc1-1, loc2-1, north), +connected(loc1-1, loc1-2, east), +connected(loc1-2, loc2-2, north), +connected(loc1-2, loc1-3, east), +connected(loc1-3, loc2-3, north), +connected(loc1-3, loc1-4, east), +connected(loc1-4, loc2-4, north), + +connected(loc2-1, loc3-1, north), +connected(loc2-1, loc2-2, east), +connected(loc2-2, loc3-2, north), +connected(loc2-2, loc2-3, east), +connected(loc2-3, loc3-3, north), +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)), + +crate(crate-c, loc2-1, s), +crate(crate-b, loc2-2, s), +crate(crate-a, loc2-3, s), + +target(crate-a, loc1-1), +target(crate-b, loc1-3), +target(crate-c, loc1-2), +agent(loc3-2, s).$ + \end{lstlisting} + \item{Q4}\\ + \begin{lstlisting}[language=prolog] +target(X, Y), crate(X, Y, s). + \end{lstlisting} +\end{itemize} + +\subsubsection{Task 2: Actions} +\begin{itemize} + \item{Q5}\\ +$Poss(move(x, y), s) \equiv \neg(crate(x, y, s)) \wedge connected(x, y, _)$ + \item{Q6}\\ +$Poss(push(x, d), s) \equiv agent(x, s) \wedge (\exists c,z: crate(c, z, s) +\wedge connected(x, z, d) \wedge (\exists y: connected(z, y, d) \wedge \neg +(\exists a: crate(a, z, s))))$ + \item{Q7}\\ +$connected(x, y, d) \rightarrow agent(y, do(move(x, y), s))\\ +connected(x, y, d) \rightarrow agent(y, do(push(x, d), s))\\ +connected(x, y, d) \wedge connected(y, z, d) \rightarrow + crate(c, z, do(push(x, d), s))$ +\end{itemize} + +\subsection{Part 2: Implementation} + +\subsection{Evaluation} +\begin{itemize} + \item{How much time did it take?}\\ + p1t1: 45m + \item{What would you like to see changed?}\\ + p1t1: There is an ambiguity in p1t1Q3, it's not clear if the starred + locations should be included in the initial state(therefore not only in + the goal state).\\ +\end{itemize} diff --git a/report/ass2.tex b/report/ass2.tex new file mode 100644 index 0000000..e69de29 diff --git a/report/report.tex b/report/report.tex index d917b65..f7c8c0d 100644 --- a/report/report.tex +++ b/report/report.tex @@ -1,6 +1,10 @@ \documentclass[titlepage,a4paper]{article} \usepackage{lipsum} +\usepackage{enumerate} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{listings} \author{ Caspar Safarlou (s4205456)\\ @@ -9,15 +13,19 @@ \title{Knowledge Representation and Reasoning.\\Assignment 1} \date{\today} +\everymath{\displaystyle} + \begin{document} \maketitle \tableofcontents \newpage -\section{Introductie} -\lipsum +\section{Assignment 1-1} +\input{ass1.tex} + +\section{Assignment 1-2} +\input{ass2.tex} -\section{Assignment 1} -\lipsum +\section{Appendix} \end{document}