$$\frac{1}{365 + 0.25 - 0.01 - 0.0025}=\frac{1}{365.2425}$$
The resultant probability distributions can be found in Table~\ref{probdist},
-in order to avoid a unclear graph.
+in order to avoid an unclear graph.
\begin{table}[H]
\label{probdist}
\section{Queries}
Now that we have modelled the story with the corresponding probabilities, we
-can have ailog calculate some other probabilities given a some observations.
-Down below we wrote down some probabilties and the associated ailog output.\\
+can have AILog calculate some other probabilities given by some observations.
+Down below we wrote down some probabilties and the associated AILog output.\\
The chance that a burglary happens given that Watson calls is greater than the
chance that a burglary happens without this observations, as is observerd by
the difference between a and b. This makes sense as Watson calls rightly in
\begin{listing}[H]
\begin{minted}[fontsize=\footnotesize]{prolog}
-ailog: predict burglar.
+AILog: predict burglar.
Answer: P(burglar|Obs)=0.002737757092501968.
[ok,more,explanations,worlds,help]: ok.
-ailog: observe watson.
+AILog: observe watson.
Answer: P(watson|Obs)=0.4012587986186947.
[ok,more,explanations,worlds,help]: ok.
-ailog: predict burglar.
+AILog: predict burglar.
Answer: P(burglar|Obs)=[0.005321803679438259,0.005321953115441623].
[ok,more,explanations,worlds,help]: ok.
-ailog: observe gibbons.
+AILog: observe gibbons.
Answer: P(gibbons|Obs)=[0.04596053565368094,0.045962328885721306].
[ok,more,explanations,worlds,help]: ok.
-ailog: predict burglar.
+AILog: predict burglar.
Answer: P(burglar|Obs)=[0.11180941544755249,0.1118516494624678].
[ok,more,explanations,worlds,help]: ok.
-ailog: observe radio.
+AILog: observe radio.
Answer: P(radio|Obs)=[0.02582105837443645,0.025915745316785182].
[ok,more,explanations,worlds,help]: ok.
-ailog: predict burglar.
+AILog: predict burglar.
Answer: P(burglar|Obs)=[0.01179672476662423,0.015584580594335082].
[ok,more,explanations,worlds,help]: ok.
\end{minted}
\end{listing}
-ToDO write down the most probable explanation for the observed evidence
-
\section{Comparison with manual calculation}
-ToDO: english.
-When we let ailog calculate the probability of alarm. %Wat is Obs hier??
Querying the \textit{Alarm} variable gives the following answer:
\begin{minted}{prolog}
- ailog: predict alarm.
+ AILog: predict alarm.
Answer: P(alarm|Obs)=0.0031469965467367292.
[ok,more,explanations,worlds,help]: ok.
$P(Alarm|burglar, earthquake) =
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
-that they are exactly the same.
+that they are exactly the same. The method with which AILog calculates the
+probability is almost the same but that is mainly because we did not use any
+techniques that are not available in AILog. When we would have done the same
+task with a Bayesian network and the use of Bayes' rule we would have had a
+different method.
\newpage
\section{Burglary problem with extended information}
\textit{Each day a burglar decides whether he wants to work or not, and on
average this happens only 5 days a week}
Meaning that every burglar has the same initial working probability: 5/7 (see the first 5 lines of code).\\
-Then we implemented the constraints on the colleagues by telling ailog that a burglary can happen when at least one of our combinations is working (see line 8 to 11).\\
+Then we implemented the constraints on the colleagues by telling AILog that a burglary can happen when at least one of our combinations is working (see line 8 to 11).\\
\textit{Finally, if they decide to burgle, then they will burgle 3 houses a night.} The third layer consists of implementing the change that out of the 10,000 houses in which Joe, William, Jack and Averall are the only burglars, Holmes' house is burgled as one of the three (see line 14 to 19). This results in the following probability for a burglary at a Holmes' house.
$P(burglary)\cdot(