Game developer designing AI systems in a 3D engine, building character behaviors and decision-making logic for a video game

By

-

October 2, 2025

Share With Friends

Game AI Planning: GOAP, Utility, and Behavior Trees

Table of Contents

When we talk about Game AI, most developers start with behavior trees, A*, or perception systems. These tools are great for controlling moment-to-moment decision making, but what about bigger-picture choices?

That’s where AI planning comes in.

Planning systems give NPCs the ability to evaluate options, weigh trade-offs, and pursue goals in a way that feels intentional. Instead of reacting blindly, they start “thinking” about the future.

In this article, we’ll look at the four major planning approaches used in game AI:

  • Classical Planning

  • GOAP (Goal-Oriented Action Planning)

  • Utility-Based Planning

  • Behavior Tree (BT) Planning

Each has strengths, weaknesses, and real-world use cases. By the end, you’ll have a clear map of the landscape and know which areas to explore more deeply.

Why AI Planning Matters

Without planning, NPCs often feel scripted or repetitive. With planning, they feel like they’re adapting to circumstances and making deliberate choices.

Think of it like hunger:

  • You’re hungry → the need.

  • Options: cook from the fridge, order delivery, or buy something outside.

  • Factors: money, speed, nutrition.

  • Decision: you balance those inputs and choose the best fit.

That’s planning, weighing inputs (needs, constraints, perception) against outcomes (satisfaction, time saved, cost).

NPCs do the same thing:

  • A companion in an RPG might decide whether to heal, attack, or retreat based on health and resources.

  • A squad in a shooter might choose to flank or suppress depending on positioning and cover.

Planning is the layer that connects perception with movement, turning information into purposeful action.

Classical Planning

Classical planning is the oldest approach, borrowed from AI research in the 1960s. It frames decision making as a problem-solving exercise:

  • Initial state → where the NPC is now.

  • Goal state → what the NPC wants to achieve.

  • Operators → actions that transform the state (e.g., “pick up key,” “open door”).

The planner searches for a sequence of actions that connects the initial state to the goal state.

Example: NPC is hungry.

  • Initial state: “I have no food.”

  • Goal: “I am fed.”

  • Plan: “Go to fridge → cook meal → eat.”

Strengths:

  • Clear, logical problem solving.

  • Great for puzzles, quests, or linear challenges.

Weaknesses:

  • Computationally expensive.

  • Doesn’t scale well to open, dynamic worlds.

Classical planning feels like a “brainy” AI, but it struggles with the messiness of modern games.

GOAP (Goal-Oriented Action Planning)

GOAP (popularized by F.E.A.R. in 2005) builds on classical planning but makes it more flexible and game-friendly.

Instead of scripting fixed plans, GOAP lets NPCs dynamically choose sequences of actions that satisfy high-level goals.

Example: Enemy Soldier in F.E.A.R.

  • Goal: “Eliminate the player.”

  • Possible actions: “Flank,” “Suppress,” “Find cover,” “Reload.”

  • The planner evaluates preconditions and effects to chain together a plan that fits the situation.

Strengths:

  • Dynamic: NPCs adapt to changing conditions.

  • Emergent: Creates believable, varied behavior without hand-scripted rules.

Weaknesses:

  • Requires careful setup of actions, preconditions, and costs.

  • Debugging can be difficult.

GOAP remains one of the most talked-about planning methods in game AI because it balances complexity with believability.

Utility-Based Planning

Utility systems shift the focus from “what actions are possible” to “which action has the highest value right now.”

Every possible action is given a score based on conditions. NPCs simply choose the highest-scoring action at any moment.

Example: NPC is hungry and low on money.

  • Cook from fridge = 0.8 (cheap, healthy, slower).

  • Order delivery = 0.6 (fast, but expensive).

  • Buy outside food = 0.4 (time-consuming, mid-cost).

The system selects “cook from fridge.”

Strengths:

  • Continuous evaluation of priorities.

  • Great for resource management, survival, and strategy games.

  • Easy to tweak: adjust curves, weights, and thresholds.

Weaknesses:

  • Can look “twitchy” if scores change rapidly.

  • Requires balancing math (tuning utility curves).

Utility-based planning shines in dynamic worlds where priorities constantly shift.

Behavior Tree Planning

Behavior Trees (BTs) aren’t always described as planners, but they often fill that role in practice.

BTs are hierarchical decision trees where conditions and actions are structured into sequences, selectors, and decorators.

Example: Squad AI in a shooter.

  • Selector: “Do I see the player?”

    • If yes → Attack subtree.

    • If no → Search subtree.

BTs provide structure and modularity, making them easy to implement in engines like Unreal or Unity.

Strengths:

  • Clear visual logic.

  • Easy to debug.

  • Works well with perception and movement systems.

Weaknesses:

  • Can grow unwieldy (“spaghetti trees”).

  • Less emergent than GOAP or utility systems.

BT planning works best for tactical AI and NPCs that need predictable, testable behavior.

Choosing the Right Planner

So, which system should you use?

  • Classical Planning → small, structured problems.

  • GOAP → adaptive combat or dynamic NPCs.

  • Utility Planning → resource-heavy or survival gameplay.

  • BT Planning → structured, tactical NPCs in engines like UE or Unity.

In practice, many studios combine methods. For example:

  • A utility system sets priorities.

  • A behavior tree executes the chosen plan.

  • Perception feeds both systems with world data.

Planning isn’t about finding the “one true system.” It’s about choosing the right tool for your design goals.

Closing Thoughts

Game AI planning transforms NPCs from reactive scripts into agents that feel like they’re thinking ahead.

Whether it’s classical planning, GOAP, utility systems, or behavior trees, the core idea is the same: weigh inputs against outcomes and choose the most effective path.

The hunger analogy still applies: different tools lead to different decisions, but the result is an NPC that feels purposeful, believable, and fun to interact with.

If you want to explore how planning, perception, and movement systems can make your game stand out, check out our Technical Expertise services. We help studios design AI that’s not just smart on paper, but smart in play.

FAQ: Game AI Planning

What is AI planning in game development?
AI planning is the process of giving NPCs the ability to evaluate different actions and choose the best path toward a goal. Instead of reacting blindly, NPCs use systems like GOAP, utility planning, or behavior trees to make purposeful decisions.

Why use planning instead of just scripting behavior?
Scripting works for simple NPCs, but it quickly becomes repetitive or brittle. Planning systems allow NPCs to adapt to changing situations, which makes them feel smarter and more lifelike.

What’s the difference between GOAP and utility-based planning?

  • GOAP: NPCs dynamically chain actions together to satisfy a high-level goal (e.g., “flank the player”).

  • Utility Planning: NPCs score possible actions and always pick the one with the highest value at that moment (e.g., “heal because health < 30%”).

Are behavior trees considered planning?
Not always, but they can serve as a planner. Behavior trees are structured decision flows. They don’t “plan” multiple steps ahead like GOAP, but they’re widely used in engines like Unreal and Unity because they’re modular and easy to debug.

How does perception connect to planning?
Perception provides the inputs (what the NPC sees, hears, or senses), and planning decides the outputs (what action to take). For example, an NPC might “hear footsteps” (perception) and then decide whether to “investigate” or “hide” (planning).

Can I mix planning systems in one game?
Absolutely. Many studios do. For example, a utility system might set the overall priority (“defend” vs. “attack”), while a behavior tree handles the detailed execution. Mixing systems lets you balance adaptability with control.

What’s an example of planning in a real game?

  • F.E.A.R. used GOAP for its enemy soldiers, creating dynamic and believable combat.

  • Strategy and survival games often rely on utility planning for resource management.

  • Many RPGs mix behavior trees and utility scoring for companions.

Does planning make AI slower or more expensive to run?
It depends on the system. Classical planning can be heavy, but GOAP and utility systems are designed to be efficient. Modern planning methods focus on balancing performance cost with the payoff in believability.

How do I decide which planning system to use?
Ask yourself:

  • Do I need emergent, dynamic solutions? → GOAP.

  • Do I need constant reprioritization? → Utility.

  • Do I need structured, predictable logic? → Behavior Trees.

  • Do I need a simple puzzle-like solution? → Classical planning.

Is AI planning necessary for all games?
No. For small projects or simple NPCs, scripted behavior may be enough. But for strategy, RPG, or squad-based games where NPCs need to “think,” planning systems are the difference between shallow AI and AI that impresses players.

stay tuned

Subscribe to our newsletter to hear the latest news

videogame development

We specialize in empowering game developers to turn their creative visions into reality. With a deep understanding of the gaming industry, our expert team offers tailored project management and production solutions that streamline workflows, enhance collaboration, and optimize resources. We’re dedicated to helping developers of all sizes navigate the complexities of game development, ensuring they stay on track and achieve their goals. Together, we bring innovative ideas to life, one game at a time.