gswong.comPreview
Open in TheBrain

Active Inference example: Self-driving car

  1. Scenario
    • The self-driving car is approaching an intersection
    • It needs to decide whether to proceed straight, turn left, or turn right
  2. Active Inference Process
    • The car’s internal model predicts potential outcomes based on its current state (position, speed, surroundings)
    • It generates hypotheses about what might happen if it takes different actions (e.g., go straight, turn left, turn right)
    • The car actively seeks sensory input (visual data, radar, lidar) to reduce uncertainty
    • It compares observed data (e.g., traffic signals, other vehicles) with its predictions
    • Prediction errors (discrepancies) drive updates to its internal model
  3. Decision-Making:
    • The car chooses the action that minimizes free energy (prediction errors)
    • For example:
      • If it predicts that going straight is the safest option (based on traffic flow and signals), it proceeds straight
      • If it observes a red light ahead, it stops
      • If it predicts a left turn is safer, it turns left
  4. Adaptation:
    • As the car receives new sensory data (e.g., pedestrian crossing), it adjusts its model
    • If the environment changes (e.g., sudden obstacle), it reevaluates its predictions and adapts its actions
  5. Safety Implications:
    • Active inference ensures the car makes informed decisions while minimizing surprises
    • It balances exploration (gathering new data) with exploitation (choosing optimal actions)