// ~->[DNET-1]->~
// File created by someone at MonashUniv using Netica 2.17 on Apr 30, 2003 at 12:23:31.
bnet Fever {
autoupdate = TRUE;
comment = "\n\
Car Buyer Neapolitan Copyright 1998 Norsys Software Corp.\n\n\
This decision network is from Neapolitan90 (p.373), which is a simpler version of the car \n\
buyer example of Howard62. Eliminating the rationale given there of how the numbers are \n\
arrived at, we have the following story:\n\n\
Joe is going to buy a used car, which could be good with probability 0.8 or a lemon with \n\
probability 0.2. After accounting for repairs, Joe's profit will be $60 if the car is \n\
good, and $-100 if it is bad. Before buying the car he has the option of having one test \n\
or two tests done on it. The first test costs $9, and both together cost $13. The first \n\
test has a 90% chance of returning positive if the car is good, and a 40% chance if it's \n\
a lemon. If the first test returns positive, then the second test has a 88.89% chance of \n\
returning positive if the car is good, and a 33.33% chance if it's a lemon. If the first \n\
test returns negative, then the second test has a 100% chance of returning positive if \n\
the car is good, and a 44.44% chance if it's a lemon.\n\n\
Joe has 2 decisions to make: whether to do the tests, and whether to buy the car. These \n\
are represented by the \"Do Tests?\" and \"Buy It?\" decision nodes. The outcome of the tests \n\
are given by nodes \"First Test\" and \"Second Test\". The costs of the tests are represented \n\
by utility node U, and the profits after repairs (not including test costs) by utility \n\
node V.\n\n\
When Joe decides whether to do the tests, he doesn't know the value of any of these \n\
variables, so there are no links entering the \"Do Tests?\" node. When he decides whether \n\
to buy, he will know the outcome of both tests (the outcomes may be \"not done\"), and so \n\
there are links from those two nodes to \"Buy It?\". He will also know the value of \n\
\"Do Tests?\" since he has already made that decision, so you could put a link from that \n\
node to \"Buy It?\", but it is not necessary since it is a no-forgetting link and there is \n\
already a directed path from \"Do Tests?\" to \"Buy It?\".\n\n\n\
TUTORIAL: Sequential Decision Making\n\
--------\n\n\
\"Car Buyer\" is an example decision network illustrating sequential decisions and multiple \n\
utility nodes. For a more simple example, see the \"Umbrella\" example.\n\n\
You can examine the link structure, and check out the relation tables, to make \n\
sure they make sense to you.\n\n\
Then compile the network. Since auto-updating is turned on, it will be solved immediately.\n\
Netica adds a no-forgetting link from \"Do Tests?\" to \"Buy It?\", indicating that \"Do Tests?\"\
\|\n\
\| may be relevant to the second decision, based only on the rest of the link structure \n\
(as it turns out, it isn't). The expected utility of each decision choice for \"Do Tests?\" \n\
is printed in the node; not doing any of the tests has the highest expected utility of 28, \n\
so it is the best choice. No expected utilities are printed in the \"Buy It?\" node, since \n\
the first decision has not yet been made.\n\n\
If you click on the \"None\" decision of \"Do Tests?\" to indicate that Joe decides not to do \n\
any tests, expected utilities appear in the \"Buy It?\" node. The best choice is to buy it, \n\
resulting in the highest expected utility - an overall profit of $28. Try clicking on \n\
\"First\" of the \"Do Tests?\" nodes, indicating that Joe decides to just get the first test \n\
done. His overall expected utility is 26.2. Then click indicating that the first test \n\
outcome was \"Positive\". The best decision is to buy and the expected utility is 35. \n\
If the first test comes out negative, then the best decision is to not buy, and its \n\
expected utility is -9 (which is the cost of the test). You can experiment with other \n\
combinations of findings and decision choices.\n\
";
whenchanged = 1051669408;
visual V1 {
defdispform = BELIEFBARS;
nodelabeling = TITLE;
NodeMaxNumEntries = 50;
nodefont = font {shape= "Arial"; size= 10;};
linkfont = font {shape= "Arial"; size= 9;};
windowposn = (1, -4, 595, 423);
CommentShowing = TRUE;
CommentWindowPosn = (20, 436, 795, 627);
resolution = 72;
drawingbounds = (1152, 752);
showpagebreaks = FALSE;
usegrid = TRUE;
gridspace = (6, 6);
PrinterSetting A {
margins = (1270, 1270, 1270, 1270);
landscape = FALSE;
magnify = 1;
};
};
node Flu {
kind = NATURE;
discrete = TRUE;
states = (true, false);
parents = ();
probs =
// true false
(0.05, 0.95);
whenchanged = 1050978276;
belief = (0.05, 0.95);
visual V1 {
center = (132, 84);
height = 4;
};
};
node Fever {
kind = NATURE;
discrete = TRUE;
states = (true, false);
parents = (Flu);
probs =
// true false // Flu
((0.95, 0.05), // true
(0.02, 0.98)); // false ;
whenchanged = 1050978047;
belief = (0.0665, 0.9335);
visual V1 {
center = (132, 168);
height = 5;
};
};
node Therm {
kind = NATURE;
discrete = TRUE;
states = (true, false);
parents = (Fever);
probs =
// true false // Fever
((0.9, 0.1), // true
(0.05, 0.95)); // false ;
whenchanged = 1051669408;
belief = (0.106525, 0.893475);
visual V1 {
center = (126, 258);
height = 6;
link 1 {
path = ((131, 196), (128, 231));
};
};
};
node TA {
kind = DECISION;
discrete = TRUE;
chance = DETERMIN;
states = (yes, no);
parents = (Therm);
functable =
// Therm
(yes, // true
no); // false ;
title = "Take Aspirin";
whenchanged = 1051668876;
belief = (1, 0);
visual V1 {
center = (384, 96);
height = 2;
};
};
node Reaction {
kind = NATURE;
discrete = TRUE;
states = (true, false);
parents = (TA);
probs =
// true false // TA
((0.05, 0.95), // yes
(0, 1)); // no ;
whenchanged = 1051669408;
belief = (0.025, 0.975);
visual V1 {
center = (492, 180);
height = 8;
link 1 {
path = ((418, 124), (457, 153));
};
};
};
node FeverLater {
kind = NATURE;
discrete = TRUE;
states = (true, false);
parents = (TA, Fever);
probs =
// true false // TA Fever
(((0.05, 0.95), // yes true
(0.01, 0.99)), // yes false
((0.9, 0.1), // no true
(0.02, 0.98))); // no false ;
whenchanged = 1050978114;
belief = (0.04559, 0.95441);
visual V1 {
center = (312, 174);
height = 7;
link 1 {
path = ((360, 124), (337, 147));
};
};
};
node U {
kind = UTILITY;
discrete = FALSE;
measure = RATIO;
parents = (FeverLater, Reaction);
functable =
// FeverLater Reaction
((-40, // true true
-10), // true false
(-30, // false true
50)); // false false ;
whenchanged = 1050978243;
visual V1 {
center = (372, 270);
height = 3;
link 1 {
path = ((329, 202), (367, 261));
};
};
};
node TITLE1 {
kind = ASSUME;
discrete = TRUE;
numstates = 1;
parents = ();
title = "Fever";
whenchanged = 1050977809;
visual V1 {
center = (276, 42);
font = font {shape= "Arial"; size= 16;};
height = 1;
};
};
ElimOrder = (Flu, Reaction, FeverLater, Fever, TA, Therm);
};