Merge branch 'master' of https://github.com/dopefishh/ker2014-2
authorMargo van der Stam <margo.stam@gmail.com>
Tue, 3 Feb 2015 21:44:02 +0000 (22:44 +0100)
committerMargo van der Stam <margo.stam@gmail.com>
Tue, 3 Feb 2015 21:44:02 +0000 (22:44 +0100)
1  2 
report/ass2-2.tex

diff --combined report/ass2-2.tex
@@@ -1,5 -1,5 +1,5 @@@
  \chapter{Visual representations and reasoning}
 -We chose pizzas for our domain, as everybody likes pizzas. We chose to have six different pizzas. 
 +We chose pizzas for our domain, as everybody likes pizzas. We chose to have six different pizzas. As all pizzas have tomato sauce and cheese, we didn't take those into account. Below we listed all the pizzas and their ingredients.
  \begin{itemize}
        \item Margherita; basilicum
        \item Hawaii; ham, pineapple and basilicum
@@@ -8,10 -8,29 +8,10 @@@
        \item Pepperoni; salami and jalape\~nos
  \end{itemize}
  
 -\iffalse
 -
 -%% Margarita
 -p_margarita <- basilicum.
 -
 -%% Hawaii
 -prob hawaiibasilicum: 0.1.
 -p_hawaii <- ham & pineapple & basilicum & hawaiibasilicum.
 -
 -%% Salami
 -prob salamibasilicum: 0.1.
 -p_salami <- salami & basilicum & salamibasilicum.
 -
 -%% Funghi
 -prob funghiham: 0.5.
 -p_funghi <- mushrooms & ham & funghiham.
 -
 -%% Salami
 -p_pepperoni <- salami & jalapenos.
 -
 -%% Oliva
 -p_oliva <- basilicum & olives.
 +We are able to observe different kind of shapes; circles, double circles (like tires or olives in our case), squares and blobs. 
  
 +Our style of reasoning that we employed is deductive. 
 +\iffalse
  TODO
  In a more structured way, you are required to describe clearly and fully:
  • The domain and the individual images
@@@ -89,7 -108,39 +89,39 @@@ image
  We do not only want to know what the probability for a specific pizza is but
  also the most likely pizza so that we can give an educated guess about the
  pizza type present on the image processed. This can be done with the following
- queries:
+ queries using the \texttt{whatpizza} predicate. The \texttt{whatpizza}
+ predicate is a predicate that is a disjunction of all pizza types. In the
+ following queries, when the possible explanations, are given we can query for
+ every possible explanations to find out how the most likely world looks like:
+ \begin{minted}[fontsize=\footnotesize]{prolog}
+ ailog: predict whatpizza.
+ Answer: P(whatpizza|Obs)=[0.19251740120000002,0.19278577620000004].
+   [ok,more,explanations,worlds,help]: explanations.
+   0: ass([],[basilicumcircle,circle,doublecircle,doublecircleOlives,noObserveError],9.5e-6)
+   1: ass([],[circle,doublecircle,doublecircleJalapenos,noObserveError,salamicircle],1.9e-5)
+   2: ass([],[blob,blobHam,blobMushrooms,circle,funghiham,noObserveError],3.3249999999999995e-6)
+   3: ass([],[basilicumcircle,circle,noObserveError,salamibasilicum,salamicircle],7.6e-5)
+   4: ass([],[basilicumcircle,circle,noObserveError],0.0019)
+   5: ass([],[blob,blobBasilicum,circle,noObserveError],9.5e-6)
+   [ok,more,how i,help]: how 4.
+    whatpizza <-
+       1: p_margarita
+       How? [Number,up,retry,ok,prompt,help]: up.
+ Answer: P(whatpizza|Obs)=[0.19251740120000002,0.19278577620000004].
+   [ok,more,explanations,worlds,help]: ok.
+ ailog: observe blob.
+ Answer: P(blob|Obs)=0.01.
+   [ok,more,explanations,worlds,help]: ok.
+ ailog: predict whatpizza.
+ Answer: P(whatpizza|Obs)=[0.28994000000000003,0.33126500000000003].
+   [ok,more,explanations,worlds,help]: explanations.
+   0: ass([],[blob,blobHam,blobMushrooms,circle,funghiham,noObserveError],3.3249999999999995e-6)
+   1: ass([],[basilicumcircle,blob,circle,noObserveError],1.9e-5)
+   2: ass([],[blob,blobBasilicum,circle,noObserveError],9.5e-6)
+   [ok,more,how i,help]: how 0.
+    whatpizza <-
+       1: p_funghi
+    How? [Number,up,retry,ok,prompt,help]: ok.
+ \end{minted}
  
  \section{Reflections}