veel werk gedaan
authorCaspar Safarlou <csafarlou@lilo3.science.ru.nl>
Tue, 21 Oct 2014 09:30:12 +0000 (11:30 +0200)
committerCaspar Safarlou <csafarlou@lilo3.science.ru.nl>
Tue, 21 Oct 2014 09:30:12 +0000 (11:30 +0200)
report/ass1.tex
report/report.tex
report/src/domaintask1.pl

index 5343cea..a495533 100644 (file)
@@ -64,10 +64,10 @@ connected(x, y, d) \wedge connected(y, z, d) \rightarrow
 
 \subsection{Part 2: Implementation}
 \subsubsection{Task 3: Translate Axioms}
-\lstinputlisting[title={domain-task1.pl},language=prolog]{./src/domain-task1.pl}
+\lstinputlisting[title={domaintask1.pl},language=prolog]{./src/domaintask1.pl}
 
 \subsubsection{Task 4: The Planning Problem in Figure 1}
-\lstinputlisting[title={instance-task1.pl},language=prolog]{./src/instance-task1.pl}
+\lstinputlisting[title={instancetask1.pl},language=prolog]{./src/instancetask1.pl}
 
 \subsubsection{Task 5: Crates go to Any Goal Location}
 \subsubsection{Task 6: Inverse Problem}
index f7c8c0d..93cdcd2 100644 (file)
@@ -1,5 +1,6 @@
 \documentclass[titlepage,a4paper]{article}
 
+\usepackage{fullpage}
 \usepackage{lipsum}
 \usepackage{enumerate}
 \usepackage{amsmath}
 \title{Knowledge Representation and Reasoning.\\Assignment 1}
 \date{\today}
 
+\lstset{
+       basicstyle=\ttfamily\footnotesize,
+}
+
 \everymath{\displaystyle}
 
 \begin{document}
index 51161bf..17ab88f 100644 (file)
@@ -21,12 +21,16 @@ poss(push(From, Direction), S) :-
 % --- Successor state axioms ------------------------------------------
 agent(AgentPlek, do(A, S)) :-
        A = move(_, AgentPlek);
-       A = push(OudeAgentPlek1, Richting), connected(OudeAgentPlek1, AgentPlek, Richting);
-       not(A = move(AgentPlek, _)), not(A = push(AgentPlek, _)), agent(AgentPlek, S).
+       A = push(OudeAgentPlek1, Richting),
+       connected(OudeAgentPlek1, AgentPlek, Richting);
+       not(A = move(AgentPlek, _)), not(A = push(AgentPlek, _)),
+       agent(AgentPlek, S).
        
 crate(Krat, Kratplek, do(A, S)) :-
        A = push(AgentPlek, Richting), 
                connected(AgentPlek, OudeKratPlek, Richting),
                connected(OudeKratPlek, Kratplek, Richting),
                crate(Krat, OudeKratPlek, S);
-       not(A = push(AgentPlek2, Richting)), connected(AgentPlek2, Kratplek, Richting), crate(Krat, Kratplek, S).
+       not(A = push(AgentPlek2, Richting)),
+       connected(AgentPlek2, Kratplek, Richting),
+       crate(Krat, Kratplek, S).