Summary of "Better AI in Unity - GOAP (Goal Oriented Action Planning)"

Overview

This video explains GOAP (Goal Oriented Action Planning) and walks through a full Unity implementation from scratch.

Architecture / Core Components

Key Implementation Details

Planner Algorithm (Backward DFS)

  1. Start from the desired goal effects as the initial requirement set.
  2. For each candidate action whose effects satisfy some required beliefs:
    • Compute new requirements = (current requirements − action.effects) ∪ action.preconditions.
    • Recurse with the new requirement set, excluding the used action to avoid reuse in that plan (optional).
  3. If any path reduces requirements to empty, that path is a valid plan; compose actions from goal → start into a stack.
  4. Order candidate actions by cost when exploring to prefer cheaper plans.
  5. Return null if no plan is found for any goal.

Implementation notes:

Agent Runtime Loop

Strategies Implemented in the Demo

Tests and Demonstrated Behaviors

Coding Patterns and Helpers Recommended

Performance, Design Decisions, and Trade-offs

Practical Tips & Suggested Improvements

Demo Outcomes

After following the video you should be able to:

Code / Tools / Resources Mentioned

End of summary.

Category ?

Gaming


Share this summary


Is the summary off?

If you think the summary is inaccurate, you can reprocess it with the latest model.

Video