Lecture 10.1: Decision Theory and Utility
How agents make rational decisions under uncertainty using Utility Theory, Preference Ordering, Expected Utility, and Decision Networks.
Up until now, we've looked at logical agents that pursue absolute goals (like winning a game or proving a theorem). But in the real world, agents face uncertainty and conflicting goals. A goal-based agent only knows the binary difference between a "good" state and a "bad" state.
A Decision-Theoretic Agent, however, has a continuous measure of outcome quality. It combines probability theory with utility theory to make rational decisions based on what it believes (probabilities) and what it wants (utilities).
Utility Theory
An agent's preferences are captured by a Utility Function, which maps states of the world to a real number: The larger the utility value, the more the agent prefers that state.
Perceived States vs. Complex Reality
States in are defined as those states of the world that the agent can perceive:
- Simple Sensor Example: Imagine a simple robot equipped with a single binary light sensor (where and ). Regardless of how complex the physical world is, the robot's utility function is defined over only two perceived states:
- Practical Application: Real-world agents receive high-dimensional inputs (cameras, LIDAR, sensors). It is impractical to assign a distinct utility output to every raw input, so agents map raw perceptual inputs into a smaller, manageable set of world states.
Utility Trade-Offs & Opportunity Cost
Utility functions allow agents to balance complex trade-offs:
- Package Delivery Agent: Must balance positive monetary payment against negative costs like electricity consumption and Opportunity Cost—defined as the value of foregone alternatives (an indirect cost incurred when choosing one task over another).
Preference Ordering Axioms
Given an agent's utility function, we can establish a preference ordering over states of the world. For an agent to be rational, its preferences over states must satisfy three core mathematical properties:
- Reflexivity: Any state is at least as preferred as itself. Example: A number is always greater than or equal to itself (), or "I am at least as old as myself."
- Transitivity: If state is preferred to state , and is preferred to , then is preferred to .
- Completeness (Comparability): An agent can compare any pair of states and ; it either prefers to , to , or is indifferent between them.
[!TIP] Completeness vs. Incompleteness Example
- Complete Preference: Dave states he strictly prefers larger chocolate bars to smaller ones. For any two chocolate bars, Dave can instantly compare them by size.
- Incomplete Preference: Susie states she always prefers chocolate bars that are both bigger and darker. If offered a large milk chocolate bar vs. a small dark chocolate bar, her rule fails to yield a decision, making her preference ordering incomplete.
Marginal Utility
Marginal Utility refers to the additional utility an agent gains from acquiring one more unit of a good or outcome. Depending on the scenario, marginal utility can take several distinct forms:
- Zero Marginal Utility: An additional copy of the exact same newspaper edition provides no extra value once you already own one.
- Positive Marginal Utility: A coupon for an additional haircut provides extra utility.
- Negative Marginal Utility: Taking additional doses of antibiotics beyond the prescribed limit causes toxicity and harm.
- Increasing Marginal Utility: Finding the second shoe of a pair. A single shoe has low utility, but pairing it with the second shoe dramatically increases utility.
- Diminishing Marginal Utility: Holding your breath under water—the first breath of air after surfacing has immense utility, whereas a second breath shortly after yields progressively less marginal gain.
Marginal Utility of Money
Consider two individuals: Bill (who has $100 million in the bank) and Tim (who has $0). Both contemplate winning an extra $1 million:
- The extra million dollars dramatically alters Tim's lifestyle, whereas Bill's lifestyle remains largely unchanged.
- Assuming both have the same utility for their first million dollars, Tim's marginal utility for the next million dollars is vastly larger than Bill's. Utility of wealth is logarithmic rather than linear.
The Framing Effect
The Framing Effect is a psychological phenomenon where individuals make different decisions depending on how identical information is presented—specifically whether choices are framed as gains or losses.
Consider an experiment where participants are given $1,000 initially:
| Scenario 1: Gain Frame | Scenario 2: Loss Frame |
|---|---|
| Option A: Keep $500 for sure. | Option A: Lose $500 for sure. |
| Option B: 50% chance to keep $1,000, 50% chance to keep nothing. | Option B: 50% chance to lose $1,000, 50% chance to lose nothing. |
| Result: Most people choose Option A (Risk-Averse). | Result: Most people choose Option B (Risk-Seeking). |
Key Insight: In both scenarios, the net expected financial outcome is identical ($500 gain). However, framing choices as gains encourages risk aversion, while framing them as losses encourages risk seeking. This has vital implications for behavioral economics, AI planning, and decision theory.
Expected Utility
Since environments are uncertain and actuators/sensors are noisy (e.g., a robot attempting to step forward one foot may slip), actions lead to outcomes probabilistically.
The Transition Function represents the probability of reaching state given current state and action :
The Expected Utility () of taking action in state is the weighted sum of utilities across all possible resulting states:
The Maximum Expected Utility (MEU) Principle
A rational agent chooses an optimal action that maximizes its expected utility: This principle serves as the foundation for rational decision-theoretic agents.
The Value of Information (VPI)
In many scenarios, an agent can gather new information (e.g., run a diagnostic test) before taking an action. Suppose new information reveals that the agent is actually in state rather than state .
The Value of Information is calculated as the expected utility of acting correctly in state minus the expected utility of mistakenly assuming state and acting under policy :
[!NOTE] VPI Application: The Doctor's Medical Test A doctor has a preliminary decision on which drug to prescribe but is uncertain about the patient's exact disease state:
- If a diagnostic test—regardless of whether it comes back positive or negative—would still lead the doctor to prescribe the exact same drug, the VPI of that test is 0.
- If the test outcome is likely to alter the doctor's decision (e.g., prescribing Drug A on positive and Drug B on negative), the test has a high VPI.
Decision Networks (Influence Diagrams)
Decision networks (influence diagrams) extend Bayesian networks by incorporating actions (decisions) and utilities. They consist of three node types:
- Chance / Uncertainty Nodes (Ovals): Represent random variables in the environment.
- Decision / Action Nodes (Rectangles): Represent choices under the agent's direct control.
- Value / Utility Nodes (Diamonds or Octagons): Represent utility functions mapping outcomes to payoffs.
Arc Classifications
Arcs in a decision network specify structural dependencies:
- Conditional Arcs (Chance Chance): Indicate probabilistic dependence (e.g.,
Weather ConditionaffectsWeather Forecast). - Informational Arcs (Chance Decision): Indicate that the outcome of the chance node is observed before making the decision (e.g.,
Weather Forecastis known before selectingVacation Activity). - Functional Arcs (Nodes Utility): Indicate that utility directly depends on those variables (e.g.,
Satisfactionis a function ofWeather ConditionandVacation Activity).
Numerical Example: The Oil Wild-Catter Problem
An oil drilling company must decide whether to drill at a potential site.
Problem Parameters
- States of Nature (): (dry), (some oil), (soaking with oil).
- Prior Beliefs: .
- Actions (): (don't drill), (drill).
- Utility Matrix :
- If : Payoff is across all states ().
- If : Payoff is if dry, if wet, and if soaking ().
Step 1: Evaluating Expected Utility Without Testing
Step 2: Decision Diagram with Seismic Sound Test & Cost
The agent can pay for a seismic test to observe a sound signal prior to drilling:
Given test observation sound , the updated conditional probabilities are : Since , the optimal action upon observing sound switches to (don't drill).
Factored Decision Networks: The Airport-Siting Problem
In large decision problems, chance nodes can be factored to simplify computation:
By factoring out intermediate outcome states (Deaths, Noise, Cost), the utility node directly receives functional arcs from the core decision (Airport Site) and environmental variables (Air Traffic, Litigation, Construction).
Algorithm for Evaluating Decision Networks
To choose the optimal action using a decision network, execute the following procedure:
- Set Evidence: Fix all evidence variables corresponding to the current observed state of the world.
- Iterate Over Decisions: For each possible value of the decision node:
- Set the decision node to value .
- Calculate posterior probabilities for parent nodes of the utility node using standard probabilistic inference (e.g., variable elimination or belief propagation).
- Calculate the resulting expected utility for action .
- Select Maximum Utility: Return the action that achieves the highest expected utility.
Lecture 09.2: CNF Conversion and Resolution
How to convert First-Order Logic into Conjunctive Normal Form (CNF) and use Resolution graphs to prove theorems.
Lecture 10.2: MDPs and Reinforcement Learning
Understanding Markov Decision Processes, Bellman Equations, Value Iteration, Multiagent MDPs, and Reinforcement Learning.