From 733660f33b81a08fe83455ca421dd6c37109a5ba Mon Sep 17 00:00:00 2001 From: Caspar Safarlou Date: Mon, 17 Nov 2014 15:07:32 +0100 Subject: [PATCH] added hittingset code and edited report --- report/ass2.tex | 23 +++++++++----------- report/report.out | 38 ++++++++++++++++----------------- report/report.tex | 2 +- report/src/hittingsettrees.png | Bin 0 -> 11379 bytes report/src/task14.pl | 23 ++++++++++++++++++++ 5 files changed, 53 insertions(+), 33 deletions(-) create mode 100644 report/src/hittingsettrees.png create mode 100644 report/src/task14.pl diff --git a/report/ass2.tex b/report/ass2.tex index abdce8c..32f6adf 100644 --- a/report/ass2.tex +++ b/report/ass2.tex @@ -11,17 +11,14 @@ \caption{Hitting set datastructure} \prologcode{./src/hs.pl} \end{listing} -% Het doel van deze opdracht was om je datastructure te laten zien, je hebt -% alleen gezegd wat voor bomen geen hitting set kunnen zijn... - -%Our datastructure uses the predicate node to signify nodes and leaf for leaves. A node contains a list of edge labels and another list (with the same length as the amound of edge labels) that contains nodes or leaves. The edge label corresponds with its order in the list it is in. -%Good examples: -%isHittingSetTree(node([a,b],[leaf,leaf])). -%isHittingSetTree(node([a,b], [node([c,d], [leaf,leaf]), node([e,f], [leaf,leaf])])). -%isHittingSetTree(node([a,b], [node([c,d], [node([g,h,i], [leaf,leaf,leaf]),leaf]), node([a,f], [leaf,leaf])])). -% -%Wrong examples: -% -%isHittingSetTree(node([a,b], [node([c,d], [node([g,h], [leaf,leaf,leaf]),leaf]), node([a,f], [leaf,leaf])])). - +Our datastructure uses the predicate node to signify nodes and leaf for leaves. A node contains a list of edge labels and another list (with the same length as the amound of edge labels) that contains nodes or leaves. The edge label corresponds with its order in the list it is in. +Examples: +node([a,b],[leaf,leaf]) +node([a,b], [node([c,d], [leaf,leaf]), node([e,f], [leaf,leaf])]) +node([a,b], [node([c,d], [node([g,h,i], [leaf,leaf,leaf]),leaf]), node([a,f], [leaf,leaf])]) +%insert hittingsettrees.png \subsubsection{Task 14: Implementation} +\begin{listing}[H] + \caption{Code for generating a hitting set tree} + \prologcode{./src/task14.pl} +\end{listing} \ No newline at end of file diff --git a/report/report.out b/report/report.out index 37cc07e..7a7ad16 100644 --- a/report/report.out +++ b/report/report.out @@ -1,19 +1,19 @@ -\BOOKMARK [1][-]{section.1}{Assignment 1-1}{}% 1 -\BOOKMARK [2][-]{subsection.1.1}{Part 1: Modelling Sokoban}{section.1}% 2 -\BOOKMARK [3][-]{subsubsection.1.1.1}{Task 1: Knowledge base}{subsection.1.1}% 3 -\BOOKMARK [3][-]{subsubsection.1.1.2}{Task 2: Actions}{subsection.1.1}% 4 -\BOOKMARK [2][-]{subsection.1.2}{Part 2: Implementation}{section.1}% 5 -\BOOKMARK [3][-]{subsubsection.1.2.1}{Task 3: Translate Axioms}{subsection.1.2}% 6 -\BOOKMARK [3][-]{subsubsection.1.2.2}{Task 4: The Planning Problem in Figure 1}{subsection.1.2}% 7 -\BOOKMARK [3][-]{subsubsection.1.2.3}{Task 5: Crates go to Any Goal Location}{subsection.1.2}% 8 -\BOOKMARK [3][-]{subsubsection.1.2.4}{Task 6: Inverse Problem}{subsection.1.2}% 9 -\BOOKMARK [2][-]{subsection.1.3}{Part 3: Extending the domain}{section.1}% 10 -\BOOKMARK [3][-]{subsubsection.1.3.1}{Task 7: Unlocking the Crates}{subsection.1.3}% 11 -\BOOKMARK [2][-]{subsection.1.4}{Part 4: General questions}{section.1}% 12 -\BOOKMARK [3][-]{subsubsection.1.4.1}{Task 10: Sitcalc expressivity}{subsection.1.4}% 13 -\BOOKMARK [3][-]{subsubsection.1.4.2}{Task 11: Related work}{subsection.1.4}% 14 -\BOOKMARK [1][-]{section.2}{Assignment 1-2}{}% 15 -\BOOKMARK [2][-]{subsection.2.1}{Implementation of the hitting-set algorithm}{section.2}% 16 -\BOOKMARK [3][-]{subsubsection.2.1.1}{Task 12: Generate conflict}{subsection.2.1}% 17 -\BOOKMARK [3][-]{subsubsection.2.1.2}{Task 13: Define your data structure}{subsection.2.1}% 18 -\BOOKMARK [3][-]{subsubsection.2.1.3}{Task 14: Implementation}{subsection.2.1}% 19 +\BOOKMARK [1][-]{section.1}{Assignment 1-1}{} +\BOOKMARK [2][-]{subsection.1.1}{Part 1: Modelling Sokoban}{section.1} +\BOOKMARK [3][-]{subsubsection.1.1.1}{Task 1: Knowledge base}{subsection.1.1} +\BOOKMARK [3][-]{subsubsection.1.1.2}{Task 2: Actions}{subsection.1.1} +\BOOKMARK [2][-]{subsection.1.2}{Part 2: Implementation}{section.1} +\BOOKMARK [3][-]{subsubsection.1.2.1}{Task 3: Translate Axioms}{subsection.1.2} +\BOOKMARK [3][-]{subsubsection.1.2.2}{Task 4: The Planning Problem in Figure 1}{subsection.1.2} +\BOOKMARK [3][-]{subsubsection.1.2.3}{Task 5: Crates go to Any Goal Location}{subsection.1.2} +\BOOKMARK [3][-]{subsubsection.1.2.4}{Task 6: Inverse Problem}{subsection.1.2} +\BOOKMARK [2][-]{subsection.1.3}{Part 3: Extending the domain}{section.1} +\BOOKMARK [3][-]{subsubsection.1.3.1}{Task 7: Unlocking the Crates}{subsection.1.3} +\BOOKMARK [2][-]{subsection.1.4}{Part 4: General questions}{section.1} +\BOOKMARK [3][-]{subsubsection.1.4.1}{Task 10: Sitcalc expressivity}{subsection.1.4} +\BOOKMARK [3][-]{subsubsection.1.4.2}{Task 11: Related work}{subsection.1.4} +\BOOKMARK [1][-]{section.2}{Assignment 1-2}{} +\BOOKMARK [2][-]{subsection.2.1}{Implementation of the hitting-set algorithm}{section.2} +\BOOKMARK [3][-]{subsubsection.2.1.1}{Task 12: Generate conflict}{subsection.2.1} +\BOOKMARK [3][-]{subsubsection.2.1.2}{Task 13: Define your data structure}{subsection.2.1} +\BOOKMARK [3][-]{subsubsection.2.1.3}{Task 14: Implementation}{subsection.2.1} diff --git a/report/report.tex b/report/report.tex index eb2b224..42bf2c6 100644 --- a/report/report.tex +++ b/report/report.tex @@ -9,7 +9,7 @@ \usepackage{minted} \usepackage{hyperref} -\author{Mart Lubbers\and \small Caspar Safarlou} +\author{\small Mart Lubbers\and Caspar Safarlou} \title{Knowledge Representation and Reasoning.\\Assignment 1} \date{\today} diff --git a/report/src/hittingsettrees.png b/report/src/hittingsettrees.png new file mode 100644 index 0000000000000000000000000000000000000000..12c76b604925a69aebf6211e7a8a75f064d21b8b GIT binary patch literal 11379 zcmdUVXIPV2yY7pqCFGxsU@Jm6@ny>A+KIG4|7}|TYfsC%5|j2%8C_*C=}@=KIW0NJ3IXOZbP)+ z$L&*#n_6F^yX(55()RaQpdKv@1a0fVpi2T&CTLy=0YOnj7U)UB8U(H3;83&%g&FG6 z{hLNu?cE*vVtuaD?LD`d^7?wL)~)@{kYya5sUZ#tV-v5vwY7F#){Z3_mI&tx{=ii0 zx0k;r8@5ym(Zngucil%KpEb69KXX3_Q?QYxf?b0eZ1rGlycJs_s+k?G(P_2u@AJRB zfI%-~*T|VSQUjW=UTKooNM1AH$o!t?der?c3lw>Gjr@>aqSUpvxnL!5TMuU8A}4p8 z6QW(FG|Rc~M1;REsZN0}FpJ8Z0q^wjD#qHt_IqV>>QdrQvh2q%g!jq9d2&ue8u}P( zqn!`V{q&?`#rfDTcT$yaD1xQQn$-q?v$UjkCF6WCng!g2bUA|VJ*!J74 z`i1b}Y%ayZwe8uy<~so_H5qHb% zu*^syIoXry(N=hP^q^|}l?>{axsl$1HIq{!LV}85;-H$3zPDupPI(Vfw4x?w++xCY9^<3Qbt;*TV){R}9AGAL_mrJvt5+iDOBWo9x0C^6+3^^Jas7=G%0&=u}`_ zNx5u`vff?zxKFWVfBYbY&CJfe&gHD)QV#)*haIPdMARYjrF9XK45(Xn9RnE za;QyIcs#qe2Ca&KlI!7v*DrGOh1LqG2WS3loenx{Q#UFwyR|a#6@&oo5T%)oJ)u0; zm$^aO)3*daY2sRnzw67?@X^yj24`=AeA?=XGlhl@Mfrpy4;S@6cxZ`+q6hj)Q&N>d zCH{&;neI&ey>9}=Othnv=B9fh<9aTFvzFdtU|EdoVyr1Wjc3H{aap#7>tM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CiI$6K14^9=l>W7!U zXY}_5{pTxorN8!6V_mSIxPrnc_G1*6#&F@e9Jalx7Gb;V=5XY)*dhoTH6LNj06bz| zV6Nu+*Tq4vpt^bv(yRXLvIR!ZAkg#es8M>0@Fl*g1)@g|`}DO!Dd%PCl=IsqYj5a! z4u42|>EK3=mnsj&O(-_B%>tk>tKu>6-B!pk-r00K~(LA#s$B#^gf8D>;g3dbhm#+ zx5V8VLM@+^ixJEfAQUndw@SpyN$T$h2^#0+woTJeV3j-`@=MZ#`I0ukBN(RL7YuXB zCx>5f45X9fyD0*6fA*v|*lGm+a_m~IrME=l@l!kw*p5Ol3a1kejx6XUJ+5%sk z$rbMtLqI@9L9R$J*9V`*I0v#wSotaxD|iAO4{|ynrvOcFRi{$STB)V?i)1k_ z9tV)h(s~|p^2Jim#g=`LjC)vY_gP#Ok{za#q{usij~mHiEt*b-+__NvOW} zc{#vlpGMT$p|uzpY#d{YV|YO54mE_#I|?LDo>hg&hP!VlK9SNON0^?jB;AuXwd)a`WkrpeSr)_L+CJ(^+U2#4{}W?}StqjI3}U zyHszShdpsZr--!YRmK2fAA2AEt15wn&FeeS^~eq6l-Rln{L6wyGJGW4+_w85twhWX zq?J75Ds9&u2&umWZAYC)5UU?%?NC5wiH*;H=#&Ic=Q2~dnNcZH_EF>C&E*jt8%dN{ zceU %finds a conflict set + generateParts(SD, COMP, OBS, HS, [], T) ; generateParts(SD, COMP, OBS, HS, CS, T) %first part of the OR is needed to translate an empty conflict set into a leaf. + ). + +generateParts(SD, COMP, OBS, HS, [],leaf).%generates leaf if at the end of all possible conflict sets in a branch +generateParts(SD, COMP, OBS, HS, CS, node(CS, TS)) :- %generates node if the conflict set isn't empty and goes on. + repairBranch(SD, COMP, OBS, HS, CS, TS). %repairs the branch by branching out for each item in the conflict set + + +repairBranch(SD, COMP, OBS, HS, [CS], [X]) :- %single item left in conflict set + append(HS, [CS], HSNEW), %add the used conflict set item for this branch to the new hitting set + generateHittingSetTree(SD, COMP, OBS, HSNEW, X). %find the next new conflict set with the new hitted item + +repairBranch(SD, COMP, OBS, HS, [CSHEAD|CSTAIL], [X|Xs]) :- %multiple items left in conflict set + append(HS, [CSHEAD], HSNEW), %add the used conflict set item for this branch to the new hitting set + generateHittingSetTree(SD, COMP, OBS, HSNEW, X), %find the next new conflict set with the new hitted item + repairBranch(SD, COMP, OBS, HS, CSTAIL, Xs). %goes on in recursion for each item in the conflict set of the current node + \ No newline at end of file -- 2.20.1