Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:dydaktyka:problog:lab2 [2017/06/04 15:49]
msl [Decision Theory for the Rescue]
en:dydaktyka:problog:lab2 [2018/06/01 13:53]
msl [Zombie Epidemics]
Line 1: Line 1:
-====== Probabilistic Programming — Probabilistic Graphs ======+====== Probabilistic Programming — Probabilistic Graphs ​and Decision Theory ​======
  
 Graph structures are commonly used to represent knowledge across various domains and problems. It shouldn'​t be surprising that they are also present in many probabilistic models. In this class we will introduce probabilistic graphs --- weighted graphs with weights representing probabilities. Next, there will be very short introduction to decision theory in Problog. Finally we will try to escape from zombies which clearly shows usefulness of this class. Graph structures are commonly used to represent knowledge across various domains and problems. It shouldn'​t be surprising that they are also present in many probabilistic models. In this class we will introduce probabilistic graphs --- weighted graphs with weights representing probabilities. Next, there will be very short introduction to decision theory in Problog. Finally we will try to escape from zombies which clearly shows usefulness of this class.
Line 16: Line 16:
 0.2::​edge(2,​3). 0.2::​edge(2,​3).
 0.7::​edge(3,​5). 0.7::​edge(3,​5).
-0.3::edge(4.5).+0.3::edge(4,5).
 </​code>​ </​code>​
  
Line 29: Line 29:
 path(A,C) :- edge(A,B), path(A,C) :- edge(A,B),
              B \= C,              B \= C,
-             edge(B,C).+             path(B,C).
 </​code>​ </​code>​
  
Line 63: Line 63:
  
 <code prolog> <code prolog>
-% X \= Y, because you can meet with yourself+% X \= Y, because you can'​t ​meet yourself
 0.1::​contact(X,​Y) :- human(X), human(Y), X \= Y. 0.1::​contact(X,​Y) :- human(X), human(Y), X \= Y.
 </​code>​ </​code>​
Line 72: Line 72:
     * you can be already infected     * you can be already infected
     * you can get infected because of the bad air     * you can get infected because of the bad air
-    * you can get infected ​because meeting and contacting an infected person+    * you can get infected ​via contacting an infected person
   - check what is the probability that any human gets infected   - check what is the probability that any human gets infected
-    * how would it change if there was only one infected person in beginning?​ +    * how would it change if there was only one infected person in the beginning?​ 
-    * how would it change if couldn'​t get infected via air? +    * how would it change if one couldn'​t get infected via air? 
   - introduce a new element to the model: some people are naturally resistant to the virus   - introduce a new element to the model: some people are naturally resistant to the virus
     * if you are resistant, you can't get infected by air     * if you are resistant, you can't get infected by air
Line 130: Line 130:
 utility(umbrella,​ -2). utility(umbrella,​ -2).
 utility(dry,​ 60).</​code>​ utility(dry,​ 60).</​code>​
 +  - Use decision theory to select the best of the escape routes from zombies
 +    * there are two actions: ''​go(highway)'',​ ''​go(helicopter)''​
 +    * getting to the highway has quite high utility value (i.e. ''​50''​) but getting to the flying military fortress is much better (i.e. ''​100''​)
 +    * you have to say that you go the gas station only if you decide to try the highway; analogically for the helicopter
 +  - the escape plan got a bit more complicated... there are two cars near the mall: one close to the mall (but very old and already destroyed a bit by the zombies, it may not work) and second one, more far away, but in much better condition. There is a new decision to make: to which car will you go first after getting the gas (you can always try to switch car later)?
 +    * now you can make three possible decisions; update the model and repeat calculations  ​
 +    * the graph representing the new problem is presented below
 +
 +{{ :​en:​dydaktyka:​problog:​escape_plan_2.png?​direct&​400 |}}
 +
 + 
en/dydaktyka/problog/lab2.txt · Last modified: 2019/06/27 15:49 (external edit)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0