## Lab 9 materials

In this session we will look at some basic Bayesian networks. We will do a few on the whiteboard and projector, using the Bayesian Network simulator available here:

Afterwards you will solve two problems in groups of 2-3, using the applet above. The problems are the following:

#### Problem 1: Smelly doors

You are writing a program to control a non-player character (NPC) in a game. The NPC is in a building full of doors. Behind each door, there is either a reward (e.g. health-points) or a monster which the NPC must fight (losing health-points). Once the NPC opens the door, he must fight the monster behind it if there is one. However, before opening the door the NPC can stick its nose in the keyhole (it cannot look through it) and smell the air from the room. The air will either smell bad or not. In summary:

- The NPC should seek reward but avoid monsters.
- The NPC doesn't know what's behind a door in advance, but..
- it can check if the room smells bad or not and use that as an indicator.

- Design a very simple Bayesian network that the NPC uses to decide when in front of a door, if he should open it or not. Start by inventing reasonable probabilities for the relation between the contents of the room and its smell.
- Argue how, instead of using made-up probabilities, the NPC can learn as he opens doors and dynamically update the Bayesian network to become smarter.

#### Problem 2: Treasure hunt

The details of the second problem will be given after you finish the first one, as it gives out hints about the solution of problem 1 :)