UPI Study › Courses › Introduction to Artificial Intelligence › Free lessons › Lesson 7.5 Free with a free account
Making Choices with Decision Networks
Introduction to Artificial Intelligence · Chapter 7: Machine Learning, NLP, and PerceptionSection 7.5 · lesson 53 of 6911 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Introduction to Artificial Intelligence.
Lesson complete
Earn the 3 college credits for Introduction to Artificial Intelligence
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Classifying Data with Support Vector Machines →← Information Gain and Entropy in Learning ModelsNext lesson: Classifying Data with Support Vector Machines →
In this lesson
Choosing actions under uncertainty with expected utility and the value of information.
- Identify chance, decision and utility nodes and what their arrows mean
- Calculate expected utility and choose the best action under uncertainty
- Build a policy by updating beliefs with Bayes' rule after an observation
- Compute the value of information and decide whether it is worth buying
Free study notes
Get this lesson's notes by email
The key points and 4 practice questions with answers, in your inbox. One email, free.
One email. Unsubscribe in one click.
Transcript
Everything said in the video, section by section (1,351 words). Read along, or search it.
Opening Question
Should the Fair Buy a Forecast
If you could learn one more fact before a big choice, how would you decide whether it's worth the price? A community group must hold its fair outdoors, or indoors. The weather is uncertain, and a forecast is available beforehand, for a fee. Should they buy it? By the end of this lesson, you'll be able to put a number on it.
Decision Networks
Chance, Decision and Utility Nodes
A Bayesian network says how uncertain facts depend on each other, but it can't say what to do. A decision network, also called an influence diagram, adds choices and preferences, so it can recommend an action. It has three kinds of node. A chance node, drawn as an oval, is an uncertain variable with a probability table, like the weather, or the forecast. A decision node, a rectangle, is a choice the agent controls: the venue. And a utility node, a diamond, scores how good an outcome is: the fair's success. Arrows join them: weather to forecast, forecast to venue, and both weather and venue to success.
Arrows
What Each Arrow Means
What an arrow means depends on where it points. Into a chance node, it's probabilistic dependence, exactly as in a Bayesian network: the forecast depends on the weather. Into a decision node, it's information: the agent knows this value at the moment it chooses. The group sees the forecast before picking the venue. Into a utility node, it means the payoff depends on that variable. And nothing comes out of a utility node: it's the end point.
The Setup
Rain Chances and Venue Payoffs
The numbers. The chance of rain is 0.3, so sun is 0.7. The forecast says rainy 80 percent of the time when it will rain, and 20 percent of the time when it will be sunny. Payoffs are points out of a hundred. Outdoors scores 100 in sun, but only 20 in rain. Indoors scores 60 in sun, and 55 in rain. As with any utility, only the comparisons between these numbers matter.
Expected Utility
Deciding Without the Forecast
A rational agent picks the option with the highest expected utility: each outcome's payoff, weighted by its probability, all added up. The recipe: fix the evidence the agent has. Find the probabilities of what the payoff depends on, using the same inference as a Bayesian network. Multiply each probability by its payoff, add them up, and choose the largest. With no forecast, outdoors is 0.7 times 100, plus 0.3 times 20: 76. Indoors is 0.7 times 60, plus 0.3 times 55: 58.5. So outdoors.
Policies
Updating on a Rainy or Dry Forecast
Now suppose the group sees the forecast first. Bayes' rule updates the chance of rain. A rainy forecast comes 0.3 times 0.8, plus 0.7 times 0.2: 0.38 of the time. So a dry one comes 0.62 of the time. After a rainy forecast, rain has probability 0.24 over 0.38: about 0.63. After a dry one, only about 0.10. Rainy forecast: outdoors drops to 49.5, and indoors scores 56.8. So indoors. Dry forecast: outdoors 92.3, against 59.5 indoors. So outdoors. The answer is a policy: a rule giving the best choice for every possible observation. Indoors if rainy, outdoors if dry.
Value of Information
The Forecast Is Worth 2.8 Points
So what's the forecast worth? The value of information is how much observing something, before deciding, is expected to raise the expected utility. It's the expected utility of deciding after observing, minus that of deciding now. Weight each forecast's best choice by how often it comes: 0.38 times 56.8, plus 0.62 times 92.3. That's 78.8. Deciding now gave 76, so the forecast is worth 2.8 points. A stronger benchmark is perfect information. Knowing the weather for certain, the group picks outdoors in sun, and indoors in rain. That's 0.7 times 100, plus 0.3 times 55: 86.5. So perfect information is worth 10.5, and no real forecast can be worth more.
Key Properties
Buy Information Only When It Pays
Five properties help. The value of information is never negative, before costs: an agent can always ignore what it learns. It's zero when the observation can't change the choice, like a reading unrelated to the weather. It's capped by perfect information, and grows with a more reliable source, or bigger stakes. It isn't additive: two facts together can be worth more, or less, than the sum. The practical rule is simple: buy information only if its value beats its cost. At 2 points, the forecast nets 76.8, which beats 76, so buy it. At 3 points, it nets 75.8. Skip it.
Quick Check
Umbrella or No Umbrella
Quick check. Carrying an umbrella pays 80 points if it rains, and 60 if it stays dry. Leaving it at home pays 0 if it rains, and 100 if it's dry. The chance of rain is 0.3. Which option has the higher expected utility? Pause, and decide. Leave it at home. Taking it: 0.3 times 80, plus 0.7 times 60, is 66. Leaving it: 0.3 times 0, plus 0.7 times 100, is 70. The umbrella wins only on rainy days, and rain is the less likely outcome, so its safety costs more than it earns here.
Second Example
Testing a Possibly Faulty Machine
A second example has higher stakes. A machine is either good or faulty. The operator can run it, or service it first. Before choosing, the operator may pay for a test that sets off an alarm. So there's a decision about whether to test at all, and the alarm is seen only if the test is done. The machine is faulty 10 percent of the time. The alarm sounds 90 percent of the time on a faulty machine, and 10 percent on a good one. Running a good machine pays 100. Running a faulty one causes a breakdown: minus 200. Servicing pays 70 if it was good, and 60 if it was faulty.
Worked Example
Working Backward Through the Test Decision
Work backward, last decision first. Step one, no test: running is 0.9 times 100, plus 0.1 times minus 200: 70. Servicing is 69. Run wins, just. Step two, the best action after each test result. The alarm sounds 0.18 of the time. After an alarm, the machine is faulty with probability one half. Then running is worth minus 50, and servicing 65. So service it. With no alarm, it's faulty only about 1 percent of the time. Running is worth 96.3, servicing 69.9. So run it. Step three: the value of testing. 0.18 times 65, plus 0.82 times 96.3, is 90.7. Against 70 with no test, the test is worth 20.7 points. Step four: after paying a cost c, testing is worth 90.7 minus c, against 70 for skipping it.
Quick Check
A Test Costing 25 Points
Quick check. The test costs 25 points. Should the operator buy it? Pause, and decide. Skip it. Testing gives 90.7 minus 25: 65.7, below the 70 from not testing. The test is worth 20.7 points, so that's the break-even cost. At 15, it would win, 75.7 to 70. At 25, it costs more than it's worth.
Comparison
How Much of Perfect Information Each Captures
Perfect knowledge of the machine would give 0.9 times 100, plus 0.1 times 60: 96. So perfect information is worth 26, and the test captures about 80 percent of it. The fair's forecast captured only about 27 percent: 2.8 of 10.5. Same recipe, same steps. What differed was how reliable the information was, and how much rode on getting the decision right: a modest gap between venues, against a costly breakdown.
Application
The Fair's Final Decision
Back to the fair, and the price of the forecast. It's worth 2.8 points to them. If it costs less, buy it, then hold the fair indoors after a rainy forecast, and outdoors after a dry one. If it costs more, decide now: outdoors.
Key Takeaways
Expected Utility, Policies and Information Value
To sum up. A decision network adds decision nodes and utility nodes to the chance nodes of a Bayesian network. An arrow into a decision node means information: what the agent knows when it chooses. Pick the option with the highest expected utility, given the evidence. The result is a policy. The value of information is never negative, is zero when nothing could change the choice, and is capped by perfect information. Buy it only when it's worth more than it costs.
Think About It
The One Fact Worth Buying
Here's something to think about. Pick a real decision: a route, a trip, or a purchase. Which single fact would you most like to know in advance? How would you estimate what it's worth? And how would that change if your source were often wrong?
About Introduction to Artificial Intelligence at UPI Study
Introduction to Artificial Intelligence (Computer Science 373) is a self-paced online course of 69 video lessons in 9 chapters, from intelligent agents and search to game strategy, neural networks, logic and reasoning, machine learning, language, robotics and AI ethics. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Compare: AI vs Current Trends in CS and IT
Why take it here
Why students take Introduction to Artificial Intelligence with UPI Study
Where the credit goes
Universities that work with NCCRS
Introduction to Artificial Intelligence carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Making Choices with Decision Networks
What is a decision network?
What is a policy in a decision network?
What is the value of information in decision theory?
Can the value of information be negative?
About the Introduction to Artificial Intelligence course
How many college credits is Introduction to Artificial Intelligence?
How much does Introduction to Artificial Intelligence cost and what is included?
Which universities accept UPI Study credits?
How long does Introduction to Artificial Intelligence take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Introduction to Artificial Intelligence.
69 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
3 credits · NCCRSEnroll →