From: Caspar Safarlou Date: Tue, 21 Oct 2014 09:30:12 +0000 (+0200) Subject: veel werk gedaan X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=92dbcb3a7961b52f423d8882c175ef702812c2f4;p=ker1415-1.git veel werk gedaan --- diff --git a/report/ass1.tex b/report/ass1.tex index 5343cea..a495533 100644 --- a/report/ass1.tex +++ b/report/ass1.tex @@ -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} diff --git a/report/report.tex b/report/report.tex index f7c8c0d..93cdcd2 100644 --- a/report/report.tex +++ b/report/report.tex @@ -1,5 +1,6 @@ \documentclass[titlepage,a4paper]{article} +\usepackage{fullpage} \usepackage{lipsum} \usepackage{enumerate} \usepackage{amsmath} @@ -13,6 +14,10 @@ \title{Knowledge Representation and Reasoning.\\Assignment 1} \date{\today} +\lstset{ + basicstyle=\ttfamily\footnotesize, +} + \everymath{\displaystyle} \begin{document} diff --git a/report/src/domaintask1.pl b/report/src/domaintask1.pl index 51161bf..17ab88f 100644 --- a/report/src/domaintask1.pl +++ b/report/src/domaintask1.pl @@ -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).