Introduction to Artificial Intelligence (8hrs) · Introduction to AI

utility-based

Watch lectures

Types of Agents — Utility-Based Agents — Beginner-Friendly Notes

1. What Changes vs Goal-Based

Utility-based = goal-based plus a measure of how good a state is. Not just "reach goal or not", but "which path is better, safer, cheaper, faster?"

State + Utility Function → Choose action that maximises Expected Utility

Think: GPS with preferences — fastest vs shortest vs most fuel-efficient.

2. Utility — Simple Idea

  • Utility U(s)U(s): a number scoring how desirable a state is (higher = better). Can encode safety, cost, time, happiness.
  • Expected utility: when outcomes are uncertain, agent calculates weighted average: EU(a)=ΣP(result∣a)⋅U(result)EU(a) = \Sigma P(result|a) \cdot U(result).
  • Example: two paths to hospital:
    • Path A: 10 min, risky road → U=5U=5
    • Path B: 15 min, safe road → U=9U=9 → utility-based picks B even though both reach goal.

3. Why Goals Are Not Enough

  • Multiple successful plans: which to pick? Goal agent picks any; utility agent picks best.
  • Conflicting goals: safety vs speed — utility trades them off numerically.
  • Uncertainty: when action may succeed or fail, utility chooses best expected outcome (links to Bayes, Module 4).

4. Economics Link (for viva)

Utility comes from economics — rational agent = maximises utility, not just achieves a goal. That's why AI adopts it as the definition of rationality.

5. Quick Comparison

Agent Type Decision Rule
Simple reflex if percept → action
Model-based if model-state → action
Goal-based if action leads to goal → do it
Utility-based if action leads to highest utility → do it
Learning improves any of the above from experience

6. Example — Self-Driving Taxi

  • Utility combines: U = -time - 10 \cdot risk - fuel_cost + comfort
  • Agent evaluates each manoeuvre's expected utility and picks max.

7. One-Line Summary to Write in Exam

A utility-based agent selects actions by maximising a numeric utility (or expected utility under uncertainty), allowing trade-offs between competing objectives and choosing the best among multiple goal-achieving plans.

8. Quick Self-Check

  1. Give a state where two paths both reach the goal but have different utilities.
  2. Why does utility help under uncertainty?
Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.

← All Introduction to AI modules