margo, please 80 chars breed
authorMart Lubbers <mart@martlubbers.net>
Tue, 3 Feb 2015 10:14:59 +0000 (11:14 +0100)
committerMart Lubbers <mart@martlubbers.net>
Tue, 3 Feb 2015 10:14:59 +0000 (11:14 +0100)
10000 huizen toegevoegd, source geinclude

report/ass2-1.tex
report/report.tex
report/src/burglary.ail
report/src/pizza.ail

index 4f0fac2..1e15055 100644 (file)
@@ -208,28 +208,38 @@ P(i_1|burglar)+P(i_2|earthquake)(1-P(i_1|burglar)) =
 0.2*0.0027+0.95*0.0027*(1-0.2*0.0027)=0.00314699654673673$ \\
 TODOOOOOOOOOOO %Ik weet niet of we i_1 en i_2 nog door iets anders vervangen
 % moeten worden.
-When you compare the output of ailog and of the variable elimination, you see
+When you compare the output of AILog and of the variable elimination, you see
 that they are similar.
 
 \newpage
 \section{Burglary problem with extended information}
-$P(burglary)\cdot\left(
-       P(\text{first house is holmes'})+
-       P(\text{second house is holmes'})+
-       P(\text{third house is holmes'})\right)=\\
-0.5102041\cdot\left(
+Extending the problem with multiple houses, dependencies and cold night we get
+the following AILog representation:
+\inputminted[linenos,fontsize=\footnotesize]{prolog}{./src/burglary.ail}
+When thinking about the dependencies and successful burglaries we found out that
+there are only four possible successful burglaries. In the model we abstracted
+from the dependency layer and implemented the model in three layers. The first
+layer is the initial probability of every burglar. The second layer is the
+possible groups that lead to a successful burglary. The chances that Holmes'
+house is hit is the third layer. This results in the following probability for
+a burglary in Holmes' house.
+
+$P(burglary)\cdot(
+       P(\text{first house Holmes'})+
+       P(\text{second house Holmes'})+
+       P(\text{third house Holmes'}))=\\
+0.655976676\cdot\left(
        \frac{1}{10000}+
        \frac{9999}{10000}\cdot\frac{1}{9999}+
-       \frac{9999}{10000}\cdot\frac{9998}{9999}\cdot\frac{1}{9998}\right)=
-\frac{3}{19600}\approx0.000153$
+       \frac{9999}{10000}\cdot\frac{9998}{9999}\cdot\frac{1}{9998}\right)
+       \approx 0.000196773$
 
 \section{Bayesian networks}
-A bayesian network representation of the burglary problem with a multitude of
+A Bayesian network representation of the burglary problem with a multitude of
 houses and burglars is possible but would be very big and tedious because all
 the constraints about the burglars must be incorporated in the network.
 The network would look something like in figure~\ref{bnnetworkhouses}
 
-
 \begin{tabular}{|l|l|}
        \hline
        Joe &\\
index e678ba9..2505c96 100644 (file)
@@ -8,10 +8,10 @@
 \usepackage{amsmath}
 \usepackage{amssymb}
 \usepackage[hidelinks]{hyperref}
-\usepackage{epstopdf}
-\usepackage{cleveref}
+%\usepackage{epstopdf}
+%\usepackage{cleveref}
 
-\renewcommand{\arraystretch}{1.3}
+%\renewcommand{\arraystretch}{1.3}
 
 \author{
        Lubbers, M.\\
index d9df5ac..3ae26a9 100644 (file)
@@ -1,9 +1,19 @@
+% Initial working probabilities
 prob joe: 5/7.
 prob william: 5/7.
 prob jack: 5/7.
 prob averall: 5/7.
 
+% Dependencies between burglars
 burglary <- joe & jack.
 burglary <- joe & william.
 burglary <- joe & william & jack.
 burglary <- joe & william & jack & averall.
+
+% Probabilities that holmes will be hit
+prob holmes1: 1/10000.
+prob holmes2: (9999/10000)*1/9999.
+prob holmes3: (9999/10000)*(9998/9999)*(1/9998).
+holmes <- burglary & holmes1.
+holmes <- burglary & holmes2.
+holmes <- burglary & holmes3.
index 39188c4..55370f4 100644 (file)
@@ -66,3 +66,10 @@ p_pepperoni <- salami & jalapenos.
 
 %% Oliva
 p_oliva <- basilicum & olives.
+
+whatpizza <- p_oliva.
+whatpizza <- p_pepperoni.
+whatpizza <- p_funghi.
+whatpizza <- p_salami.
+whatpizza <- p_hawaii.
+whatpizza <- p_margarita.