# Homework 4

#### Due: March 31, 2003 (midnight)

For this assignment you will use the Netica decision network software to perform decision-making in a simple intelligent environment. We want to decide in which room to turn on the light, or to turn off all the lights, based on the current time and Bob's predicted next location. We will use an intermediate node to represent what we think Bob is doing (Bob's Task) based on his next location and the current time. Then, the utility is based on which room is lit (if any), Bob's next location and Bob's task. The associated decision network is shown below. The Netica version of the network is available as BobScenario2.dne.

1. Familiarize yourself with the Netica system. Everything you need (manuals, APIs, etc.) is available from www.norsys.com, but it is also already available on gamma2 in directory /public/cse/holder/6362/Netica. The License file contains the Netica license key for UTA. I would recommend using the Windows application to fill in the tables as described below and then load your updated network file into your program (described below).

2. Fill in the conditional probability table (CPT) for the Task node. The Task node has three possible values: Eat, Sleep and WatchTV (Bob is a pretty boring guy). As the network indicates, Bob's task is dependent on his NextLocation and the CurrentTime. You need to develop a rationale for when and where Bob likes to do these tasks. This rationale will be expressed using the entries of the CPT and also as an English description of the rationale. For example, your rationale might include that "If Bob is going to the Bedroom in the afternoon, then there is a 70% chance he'll WatchTV, a 30% chance he'll Sleep, and a 0% chance he'll Eat." The corresponding entry in the CPT would be

NextLocation CurrentTime Eat WatchTV Sleep
Bedroom Afternoon 0.00 70.00 30.00

3. Fill in the utilities table of the utility node. Again, you need to develop a rationale for which situations have higher utilities and which have lower utilities. For example, you might decide that if Bob is going to the Bedroom to Sleep, then we would want the lights out in all three rooms. This situation should have a relatively high utility, while the same situation with the Bedroom lit has a relatively low utility. The same situation with the Bedroom light off, but one or more of the other lights on might have a utility somewhere between the previous two situations.

4. Develop a standalone program that reads in your network file and provides a GUI in which the user can select a specific NextLocation, or a specific CurrentTime, or both, and then displays the action with the maximum expected utility for this situation. There is some sample code in the Netica distribution that demonstrates some of this functionality. Be sure to follow the Coding Standard and use a Makefile to support easy compilation.

5. Prepare a document describing your rationale for the Task CPT and the utility table, including the actual tables in the document, and a brief description of your program. Package up your network, code and documentation according to the Assignment Turn-In Information and email to holder@cse.uta.edu by the above deadline.