// ~->[DNET-1]->~
// File created by someone at MonashUniv using Netica 2.17 on Apr 30, 2003 at 12:37:14.
bnet RealEstateInvestment {
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 = 1051670232;
visual V1 {
defdispform = BELIEFBARS;
nodelabeling = TITLE;
NodeMaxNumEntries = 50;
nodefont = font {shape= "Arial"; size= 10;};
linkfont = font {shape= "Arial"; size= 9;};
windowposn = (20, 11, 614, 438);
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 C {
kind = NATURE;
discrete = TRUE;
states = (Good, Bad);
parents = ();
probs =
// Good Bad
(0.7, 0.3);
title = "Condition";
whenchanged = 1050976855;
belief = (0.7, 0.3);
visual V1 {
center = (306, 198);
height = 7;
};
};
node I {
kind = DECISION;
discrete = TRUE;
states = (yes, no);
parents = ();
functable =
yes;
title = "Inspect";
whenchanged = 1051670232;
belief = (1, 0);
visual V1 {
center = (150, 138);
height = 5;
};
};
node R {
kind = NATURE;
discrete = TRUE;
states = (Good, Bad, Unknown);
parents = (C, I);
probs =
// Good Bad Unknown // C I
(((0.95, 0.05, 0), // Good yes
(0, 0, 1)), // Good no
((0.1, 0.9, 0), // Bad yes
(0, 0, 1))); // Bad no ;
title = "Report\n";
whenchanged = 1051670232;
belief = (0.3475, 0.1525, 0.5);
visual V1 {
center = (312, 324);
height = 4;
};
};
node BH {
kind = DECISION;
discrete = TRUE;
states = (yes, no);
parents = (I, R);
functable =
// I R
((yes, // yes Good
no, // yes Bad
yes), // yes Unknown
(yes, // no Good
yes, // no Bad
yes)); // no Unknown ;
title = "Buy House";
whenchanged = 1051670041;
belief = (1, 0);
visual V1 {
center = (462, 108);
height = 2;
};
};
node V {
kind = UTILITY;
discrete = FALSE;
chance = DETERMIN;
inputs = (C, );
parents = (C, BH);
functable =
// C BH
((5000, // Good yes
0), // Good no
(-3000, // Bad yes
0)); // Bad no ;
whenchanged = 1050977103;
visual V1 {
center = (528, 210);
height = 3;
link 1 {
path = ((383, 198), (432, 198), (507, 208));
};
};
};
node U {
kind = UTILITY;
discrete = FALSE;
measure = RATIO;
chance = DETERMIN;
parents = (I);
functable =
// I
(-600, // yes
0); // no ;
whenchanged = 1050976924;
visual V1 {
center = (150, 252);
height = 6;
};
};
node TITLE1 {
kind = ASSUME;
discrete = TRUE;
numstates = 1;
parents = ();
title = "Real Estate Investment";
whenchanged = 1050976543;
visual V1 {
center = (276, 42);
font = font {shape= "Arial"; size= 16;};
height = 1;
};
};
ElimOrder = (C, BH, R, I);
};