GOAP (Goal-Oriented Action Planning) Artificial intelligence determining its own strategy GOAP architecture
Research

GOAP (Goal-Oriented Action Planning) Artificial intelligence determining its own strategy GOAP architecture

AuthorGameDev Base
DateOctober 27, 2026
37 min read

GOAP Strategies: AI Design with Control in Unity, with Flexibility in Unreal Engine

GOAP Architecture Fundamentals and Its Strategic Role in Game Design

Goal-Oriented Action Planning (GOAP) is a powerful planning algorithm adapted from artificial intelligence research and tailored to the field of game development, granting game characters (NPCs) the ability to form their own strategies. Departing from traditional artificial intelligence approaches such as Finite State Machines (FSM) or Behavior Trees (BT) that rely on fixed flowcharts, this architecture provides the opportunity to create game worlds where NPCs make dynamic decisions based on environmental changes and personal goals, exhibiting intuitive and complex behavior. The core philosophy of GOAP is specifying what an agent (NPC) wants to do, rather than how it moves. When an agent sets a usually simple goal (such as "eat food", "own wood"), the GOAP system automatically finds the sequence of steps required to reach this goal. This process starts from a "world state" information that defines the agent's current world and generates a "plan" containing actions that will ultimately lead to the goal state. In this section, the core components, working principles, and strategic impacts of the GOAP architecture on game design will be examined in depth.

At the core of the GOAP system lie three main concepts: Goals, Actions, and World State. "World State" is a data structure representing the instantaneous state of the game world; it can generally be thought of as a dictionary consisting of key/value pairs. For example, a structure like {"hasFood": false, "isHungry": true, "hasAxe": true} describes the NPC's current state. "Goal" is the ideal state that the agent desires to reach. This goal is similarly defined by a world state structure; for instance, the goal {"hasFood": true, "isHungry": false} aims for the NPC to reach a state where it is satiated and has food. "Actions" are operations that can cause changes in the world state. Every action has two important characteristics: "Preconditions" and "Effects". Preconditions list the conditions that must be met in the world state for an action to be executed. For example, the precondition of the collectWood action could be {"hasAxe": true, "inForest": true}.

Effects, on the other hand, define the changes that will occur in the world state when the action is successfully completed; the effect of the collectWood action could be {"hasWood": true}. The GOAP algorithm combines these three components to construct a graph model. The root of the graph represents the goal state. The algorithm analyzes the actions required to reach the goal backward. If an action's effects meet some constraints of the goal and the action's preconditions are compatible with the current state, that action is included in the graph. This process continues until reaching the goal state from the current state. The path found, when reversed, reveals the exact plan of actions that the NPC needs to perform in order. This plan is typically found using an extended BFS (Breadth-First Search) or A* algorithm.

The strategic impacts of GOAP on game design are quite comprehensive and can profoundly affect the player experience. The most prominent impact is the dynamism and intuitiveness in NPC behaviors. In traditional systems, an NPC's "eating food" task is merely equivalent to a specific function call or a static flowchart. However, when GOAP is used, there can be multiple valid paths toward the same goal. For example, a raspberry gathering action (gatherRaspberry) and a market shopping action (buyFood) are two different actions that simultaneously meet preconditions ({...}) and provide the effect ({hasFood: true}). The GOAP system evaluates these actions and selects the most appropriate one based on the agent's current state (for instance, whether money is available or if the path to the market is open). This allows the player to see an NPC reaching its goal by following different strategies at each level, adding a more lively and convincing feel to the world. Rather than passively obeying commands, NPCs can prioritize their own needs and formulate solutions based on changes in their environment. For example, if an NPC's goal is to "go to a safe location", the GOAP system decides whether to suggest the nearest safe house or a cave behind the forest by considering the current world state (location of enemies, travel duration, etc.).

Another important strategic impact is the flexibility and iteration speed in the design process. GOAP encourages using a data-driven structure rather than hardcoding actions and goals in code. Tools like GOAP plugins in Unreal Engine allow designers to visually define actions, preconditions, and effects through the Blueprint editor. Similarly, structures like data objects or scriptable objects in Unity enable storing this information as external data files or transfer objects. This data-driven approach makes the development process layered and collaborative. Designers can test, experiment with, and edit NPC behaviors without waiting for programmers to modify code. For example, a complex precondition like an action requiring "an NPC carrying a weapon to be effective in combat" can be defined as an expression that the designer enters into a data input box, rather than having a programmer write a line of code. This not only increases prototyping speed, but also enables dynamic updating of NPC behaviors during live operations (LiveOps). After a game is released, an NPC can gain a new action or the failure rate of an action can be reduced simply by changing a single value in a configuration file. This flexibility is a major advantage for maintaining and expanding the game throughout its lifecycle.

However, these advantages offered by GOAP must be balanced with performance cost. The planning process can be computationally expensive, especially in cases involving a large number of actions, complex preconditions, and a vast world state space. If a GOAP agent's planning is refreshed with every small movement or at every frame, this resource consumption can severely impact game performance. Therefore, the proper usage practice for GOAP is to trigger the system only when necessary. Generally, it is sufficient for the agent to re-evaluate planning when its goal changes, when it completes its current plan, or at the end of a specific time interval (for example, every 5 seconds). This keeps the agent's decisions up to date while avoiding unnecessary computations. Furthermore, optimized versions of GOAP algorithms and proper use of data structures (for example, CPU cache-friendly memory distribution) play a critical role in improving performance. DOTS-based frameworks like Utility Intelligence (ECS) in Unity are examples aimed at directly providing a solution to these performance issues.

In conclusion, GOAP is a strategic tool that enriches NPC behaviors and provides design flexibility. However, for it to be successfully integrated, one must be aware of the performance cost, and planning frequency and complexity must be managed carefully. GOAP has provided significant progress in game design by offering players a smarter, more adaptable, and believable experience in the game world.

GOAP in Unity Environment: Technical Implementation and Developer Ecosystem

Unity offers a versatile and flexible platform for implementing the GOAP (Goal-Oriented Action Planning) architecture. The platform's approach gives developers the flexibility to build a custom system while also allowing them to benefit from a rich ecosystem of third-party packages. This requires following different strategies depending on the project scale, the development team's capabilities, and performance requirements. GOAP implementations in Unity range across a wide spectrum, from solutions built from scratch to standardized, user-friendly packages. In this section, the technical details of implementing GOAP in the Unity environment, developer toolsets, and the existing ecosystem will be examined.

Implementing GOAP from scratch in a Unity project is an ideal option for advanced developers aiming to maintain full control over the core logic of the architecture. This approach is typically carried out in C# and consists of several key components. First, the "World State" is usually defined as a dictionary or a custom data structure storing key/value pairs. Second, base classes for "Goal" and "Action" are created. While a Goal class defines the target state, an Action class has a more complex structure. The Action class includes a list of world state patterns referred to as Preconditions and a list of world state patterns referred to as Effects. Preconditions must be satisfied in the current world state for the action to be executed, while effects specify how the action will modify the world state upon successful completion. The GOAP planner uses this information to build a graph. The algorithm, typically using a breadth-first search (BFS) or a more optimized A* algorithm, finds the shortest path (that is, the plan consisting of the fewest actions) from the current state to the goal state. This process produces a list of steps the agent must take to achieve the goal. Then, this plan is used for the agent to carry out its actions sequentially. This custom implementation approach allows the developer to tailor the GOAP system entirely to the project's needs, but it can also extend development time and require managing a complex architecture that might lead to potential errors.

Unity's greatest strength is the rich and diverse ecosystem of GOAP solutions provided to developers via the Unity Asset Store. These packages offer ready-to-use, tested, and often high-performance solutions that facilitate structuring GOAP logic into objects. Thanks to these packages, developers can quickly integrate GOAP into their projects and focus on higher-level game mechanics. One of the most popular and frequently mentioned solutions in this ecosystem is the Behavior Package developed by CrashKonijn. This package offers multiple AI techniques, such as GOAP, Utility AI, and State Machines, within a single framework. The Goap package module of the suite allows developers to visually configure GOAP logic within the Unity Editor. Designers can define goals, actions, and their preconditions and effects as objects and organize them within a hierarchy. Other notable solutions include XGOAP, CAP'N, and Ultimate AI System. Each of these packages addresses different needs by offering unique features. For example, XGOAP offers a flexible and permissively licensed alternative compatible with C#7,

while CAP'N focuses on integrating GOAP logic with pathfinding systems. Points developers should pay attention to when choosing these packages include ensuring the package is compatible with the latest version, that its developer's support is active, and that its performance impact is known. For instance, in some forum discussions, opinions on package performance are raised due to certain nodes causing unnecessary memory allocations when running cyclically. Therefore, when selecting packages, it is important to carefully test beta versions (for example, versions released on future dates such as "Dec 12, 2025").

The integration of GOAP with data-oriented architecture (DOTS) for performance-oriented and large-scale projects is an important topic that needs to be addressed in parallel with Unity's future direction, the Data-Oriented Technology Stack (DOTS). DOTS is an architectural suite aimed at storing and processing data more efficiently in memory, typically comprising components such as Entity Component System (ECS) and Job System. However, traditional implementations of GOAP often use a key/value dictionary-based world state model. This approach can prevent data from being stored in contiguous memory blocks, which is the goal of ECS, leading to CPU cache misses and performance degradation. This challenge demonstrates the difficulty of seamlessly running GOAP alongside ECS. In this context, managing the performance cost of GOAP logic becomes critical. The framework called Utility Intelligence (ECS), developed independently by Unity, can be seen as a direct response to this issue. This framework is a high-performance artificial intelligence framework based on GOAP principles, but fully reliant on DOTS components such as ECS, Job System, and Burst Compiler. This shows that GOAP is not merely an AI technique, but can also be made compatible with modern, data-oriented game development practices. Discussions on Unity forums regarding developers' experiences with GOAP implementations in ECS also evidence this difficulty. Therefore, if the project's performance requirements are high (for example, a strategy game where hundreds of NPCs move simultaneously), utilizing ECS-optimized solutions like Utility Intelligence or designing a natively efficient ECS-based GOAP architecture might be a better strategy.

The toolsets developers use to integrate and develop a GOAP system in a Unity project vary depending on the type of GOAP solution. If a custom GOAP system is to be developed, developers will write, debug, and optimize C# code using professional development environments such as Visual Studio or JetBrains Rider. During this process, care must be taken regarding code readability, maintainability, and performance. When standardized packages are used, however, the development process focuses more on the visual interface of the Unity Editor. Packages like CrashKonijn Behavior Package facilitate configuring GOAP logic by creating custom windows and objects in the Unity Editor. Through this interface, developers define goals, actions, and preconditions, linking them to an agent's behavior tree. This provides the opportunity to test and edit AI behaviors with little to no code written. Furthermore, Unity's built-in debugging tools (Debug.Log, Profiler) can be used to monitor the execution of the GOAP system and identify potential performance bottlenecks. For instance, information such as how often GOAP planning is executed or how much time is spent constructing a plan is critical to understanding system efficiency. In conclusion, Unity provides a flexible and multi-layered approach to implementing GOAP. Developers can decide across a broad spectrum, from building a custom system to leveraging a rich package ecosystem, depending on their project requirements and capabilities. However, especially in large-scale projects, carefully managing the performance cost of GOAP and its integration with modern architectures like DOTS will be key to achieving a successful outcome.

GOAP in Unreal Engine 5 Environment: Technical Implementation and Developer Ecosystem

Unreal Engine 5 offers a platform that implicitly supports the GOAP (Goal-Oriented Action Planning) architecture, deeply integrating it with a powerful data-oriented architecture and the Blueprint visual programming system. UE5's approach presents GOAP as if it were an "out-of-the-box" solution, enabling designers in particular to rapidly prototype and experiment with artificial intelligence behaviors. This philosophy is a reflection of Unreal Engine's "game design first" approach and makes it easier to focus on game mechanics independently of GOAP's technical details. In this section, technical implementation details of GOAP in the Unreal Engine 5 environment, Blueprint and C++ integration, data-oriented configuration, and the existing ecosystem will be examined.

The common method for implementing GOAP in Unreal Engine 5 relies on heavily used third-party plugins that lack official Epic Games support. The best-known of these is the Goal Oriented Action Planning Plugin for Unreal Engine. This plugin allows the core components of the GOAP system (Goals, Actions, World State) to be defined as data structures in Blueprint. After adding the plugin to their projects, developers can construct GOAP logic by creating new Blueprint classes in the Unreal Editor. This approach makes it possible to initialize and configure the GOAP system without writing code. However, the core logic of the GOAP system is written in C++, and the plugin provides an interface to make this core logic accessible to Blueprint developers.

Deconstruction of the User's Need:

What is GOAP Architecture?

  • What is the core logic of GOAP?

  • What are its core components (Goal, Agent, World State, Action) and how do they function?

  • How is GOAP planning performed (e.g., expanded BFS or A* algorithm)?

Technical Implementation of GOAP in Unity

  • What options does a developer have for implementing GOAP in Unity (do-it-yourself vs. ready-made libraries)?

  • What are the available GOAP libraries (Asset Store) and what are their features (e.g., CrashKonijn's Behavior Package)?

  • How does GOAP integration with Unity's DOTS/ECS architecture work, and is it a challenge?

  • What are the typical C# coding structures and architectural approaches for GOAP in Unity?

Technical Implementation of GOAP in Unreal Engine 5

  • What is the presence or absence of built-in GOAP support in Unreal Engine 5?

  • What are the most commonly used plugins for implementing GOAP in Unreal Engine?

  • How are GOAP implementations in Unreal Engine integrated with Blueprint and C++?

  • How important is a data-oriented structure (Data Tables, USTRUCTs) for GOAP in Unreal Engine, and how is it used?

Strategic Impacts on Game Design (For Both Platforms)

  • How does GOAP impact the dynamism and intuitiveness of NPC behaviors?

  • What role does GOAP play in increasing designers' iteration speed and flexibility during the game design process?

  • What is the performance cost of GOAP systems, and is this cost manageable?

  • How can GOAP relate to other AI techniques (Behavior Trees, FSMs, Utility AI)?

Comparative Analysis and Conclusions

  • What are the fundamental philosophical and practical differences in the GOAP approach between Unity and Unreal Engine?

  • Which platform is better suited based on specific project types or development team characteristics?

  • What does the future potential of the GOAP architecture (e.g., on-device AI trends) point toward?

GOAP Architecture: The Journey Between Control in Unity and Data-Driven Design in Unreal Engine 5

GOAP Architecture: Basic Concepts and Logical Structure

Goal-Oriented Action Planning (GOAP) is a powerful AI planning model that enables artificial intelligence to evaluate its current situation and determine its own strategy, rather than simply following predefined rules . This approach offers the opportunity to create characters that give smarter, more intuitive, and dynamic reactions against players, especially in complex and dynamic game worlds. GOAP focuses on determining "how" an agent (NPC) will act, not "why" it acts. Its basic logic is built on a system that automatically calculates the steps required to reach a goal. For example, if a game character's goal is "to eat food", the GOAP system creates a plan by analyzing the sequence of actions required to reach this goal ("being at home", "finding food", "cooking the food") . If food cannot be found in the market, the system needs to know the results (effects) of each action and the preconditions required for them to be executed in order to find an alternative path.

To understand the operation of the GOAP architecture, its basic components must be examined in depth. These components are the atoms that form the soul of a GOAP system. These are: Goal, Agent, World State, and Action. Each of them is an integral part of GOAP's problem-solving capability.- 1 1108

An Agent is an in-game entity that uses GOAP logic and performs actions. This can be anything from a character controlled by the player to an enemy unit or a companion character that affects environmental elements. The agent's task is to wait for a goal to be given to the system and then evaluate whether this goal can be reached .

World State is a data structure that defines the state of the game world at a specific moment. It can generally be thought of as a dictionary consisting of key/value pairs . For example, a simple state like {"hasWood": false, "isHungry": true, "health": 80} can represent the current state of a character in a forested area. This state is constantly updated; when the character gathers wood, the hasWood value changes to true. When the GOAP planner detects a difference between the current world state and the state required to reach the goal, it starts searching for actions to close this gap.

Actions are the movements through which the agent can create changes in the world state. Each action has two main properties: Preconditions and Effects. Preconditions define what states the world currently needs to be in for an action to be executed. For example, the precondition of a CookFood action might be {"hasFood": true, "hasFire": true}. Effects show what will change in the world state when the action is successfully completed. The effect of the same CookFood action could be {"cookedFood": true, "hasFood": false}. These two properties ensure that actions have logical integrity and guarantee that the planner selects only valid and meaningful actions. Each action can carry a specific cost (usually time or energy), allowing the planner to prefer the path with the lowest cost or the one that reaches the result in the shortest time.

Goals are the ideal state that the agent aims to achieve. A goal is also defined like a world state, but it only contains the states that are important. For example, for the goal of "eating food", the goal {"isHungry": false} can be defined. The planner orders the most suitable actions to reach this goal ({"isHungry": false}) from the current world state ({... "isHungry": true, ...}). Goals can often be complex and require multiple actions. The power of GOAP lies in its ability to create a plan by chaining together the actions needed to achieve a single goal.

At the core of the GOAP planning algorithm lies a graph search algorithm. Typically, either breadth-first search (BFS) or A* algorithms are used . The process begins as follows: The planner works backward from the target world state to find actions that satisfy the goal. Then, looking at the preconditions of these actions, it finds earlier actions that satisfy them. This process continues until reaching the initial state

73 24 8285

(the agent's current world state). As a result, a graph of actions is created. The root of this graph is the action that satisfies the target state, and its branches follow the actions that satisfy that action. The shortest or cheapest path is the best plan to reach the goal. This plan is stored by the agent as a list for executing actions sequentially. As actions are fulfilled, the world state is updated, and the planner can replan when a new goal is set or the environment changes. This dynamic nature makes GOAP much more flexible than a static Finite State Machine (FSM) or a simple Behavior Tree (BT). While BTs generally act according to a predefined decision tree, GOAP's goal is to find the most suitable path every time . By constantly monitoring the agent's environment and needs, GOAP can update its plan and find an alternative path when the goal changes or an action is blocked (for example, when a door is locked). This creates a "superhuman" feel that makes the player's experience more tangible and consistent. However, the price of this flexibility is the computational cost of the planning process. Running GOAP continuously for every frame can lead to performance issues, especially in games with a large number of agents. Therefore, GOAP is usually triggered when the goal changes, after a certain time interval, or after an action is completed. This strategy allows maximizing the benefits of GOAP while minimizing performance loss. This structural flexibility of GOAP makes it an indispensable tool for game genres requiring strategy simulations, open-world RPGs, and complex NPC interactions .

GOAP in the Unity Environment: Flexibility, Ecosystem, and Performance-Oriented Approaches

Unity offers developers unique flexibility for GOAP (Goal-Oriented Action Planning) implementations, both because it provides a foundational framework for developing a custom solution and because it possesses a rich third-party package ecosystem. This approach reflects the principle of "something for everyone": while some developers seek full customization by keeping all details of GOAP under their control, others can increase development speed with ready-made and tested solutions from the Asset Store. This section examines GOAP implementations in the Unity environment in depth under two main categories: "do-it-yourself" and ready-made library-based approaches.

Custom Implementation: Building GOAP from Scratch

3186 1866

Implementing GOAP from scratch with C# is the most valuable path for developers who want to understand exactly how each part of the architecture works. This approach requires converting GOAP's core components (Agent, World State, Action, Goal) into objects. The examples in the resources address this process step by step . First, the WorldState class represents the state of the game world using key/value pairs (usually Dictionary<string, bool> or Dictionary<string, float>). Next, the Action class defines the actions. This class contains properties such as preconditions, effects, and cost. Finally, the Goal class defines the target state that the agent is trying to reach.

The planning logic is usually contained within a Planner class. This class is called with a function like Plan(Goal targetGoal). This function runs a graph search algorithm (usually breadth-first search or A*) that searches for actions to reach the target state . The algorithm starts with an action that satisfies the target state, moves to another action that satisfies the preconditions of that action, and continues this loop until it closes the gap between the initial state (the agent's current world state) and the target state. If a path is found, the sequence of these actions is transferred to a Plan object. This Plan can be used by the agent to execute its actions sequentially. A custom implementation provides complete mastery over the architecture and allows fitting it to specific requirements (for example, a complex cost function or a custom search strategy). However, this flexibility comes at the cost of extended development time and increased effort required to resolve potential bugs (bugs in the planning algorithm, state synchronization issues, etc.).

Ready-Made Libraries and Packages: Increasing Development Speed

The Unity Asset Store offers various ready-made solutions for GOAP implementations. These packages significantly speed up the development process by offering visual editors and standardized APIs that make it easier to structure GOAP logic into objects. One of the most popular and frequently mentioned among these packages is the Behavior Package developed by CrashKonijn . This package is also known as Unity's official Behavior package and supports GOAP as a Goap module . The Behavior Package allows developers to visually configure GOAP actions, goals, and even agents directly in the Unity Editor. In this way, they can set the preconditions and effects of actions via a WorldState defined inside a ScriptableObject. This approach offers the opportunity to quickly experiment with and edit NPC behaviors without writing code or avoiding compiling code. According to user reviews, the user interface, editing features, and editor integration of this package are quite good . Current versions of the package are compatible with Unity 2022.3 and higher

753 82 14112 6843 113

versions and include quality-of-life updates to increase sustainability . The Asset Store also features other GOAP solutions with more specific or different features, such as XGOAP, CAP'N - 3D Pathfinding using GOAP, and Rabbit. While XGOAP is marketed as a GOAP library beyond the standard, CAP'N is a solution that combines GOAP with 3D pathfinding. This diversity addresses different game genres and development needs. However, a disadvantage of using these packages is the need to check whether the package itself and its developer are actively supported. For example, it is seen that some packages include critical updates to solve serialization issues in older versions . Similarly, it is an important factor that some packages are optimized for performance; for example, packages like Ultimate AI System have made updates to fix issues that could cause unnecessary memory allocations in cyclic nodes .

DOTS/ECS Integration: The Peak of Performance

Unity's Data-Oriented Technology Stack (DOTS) and Entity Component System (ECS) architecture are designed for large-scale and high-performance games. However, the key/value dictionary-based world state model of classic GOAP implementations does not naturally merge with ECS's principles of manipulating data chunks (data blocks optimized with Burst) . This indicates that integrating GOAP into ECS-based projects creates serious challenges. Aware of this difficulty, Unity developed its own GOAP-like framework to offer a solution to this problem: Utility Intelligence. Utilizing the data-oriented technology stack (DOTS), this framework provides a high-performance utility-based AI system . Utility Intelligence is based on GOAP logic but is written with ECS-compatible data structures and workflows. This is of vital importance for scenarios such as planning the AI of thousands of NPCs simultaneously. This situation reveals how critical it is to address GOAP from a performance perspective and how high the demand is in the Unity ecosystem to restructure GOAP for optimization, especially for projects using DOTS. The Utility Intelligence (ECS) package is compatible with Unity Version Control version 6000.0 and above and accepts the standard Unity Asset Store license agreement .

Overall Assessment

Implementing GOAP in Unity is a multifaceted decision-making process depending on the developer's project needs, technical competencies, and performance expectations. "Do It Yourself" 44 61 134745 111 62 24 1152 4952

approach offers maximum flexibility and control while increasing development time and maintenance overhead. Ready-made libraries, especially robust and well-documented solutions like CrashKonijn's Behavior Package, dramatically increase development speed and provide a standardized infrastructure. However, the sustainability and compatibility of these packages must always be kept in mind. In cases where projects target the DOTS/ECS architecture, turning to alternative frameworks designed in accordance with ECS principles, such as Utility Intelligence, rather than using GOAP directly, will be a better choice in terms of performance. As a result, while Unity offers multiple right ways to use GOAP, each path has its own unique advantages and disadvantages.

GOAP in Unreal Engine 5 Environment: From Data-Drivenness to Hybrid Integration

Since Unreal Engine lacks built-in support for implementing GOAP (Goal-Oriented Action Planning) systems, it adopts a more "out-of-the-box" and more data-driven approach compared to Unity, offering developers deep integration through a robust data-driven structure and the Blueprint visual programming system. UE's philosophy emphasizes the ability of designers and developers to prototype and configure game mechanics with no code or minimal code, and GOAP is a tool at the heart of this philosophy. This section examines GOAP implementations in the Unreal Engine 5 environment across three main axes: a plugin-based approach, data-driven configuration, and C++/Blueprint hybrid usage.

A Plugin-Based Approach: Incorporating GOAP into the Project

Unreal Engine does not offer GOAP as its primary artificial intelligence system; instead, it provides powerful and extensible plugins through which developers can easily integrate GOAP logic. In resources such as the Epic Games Developer Forums and Unreal Marketplace, there are many discussions and articles regarding GOAP plugins. These plugins allow the core components of GOAP (Goals, Actions, World State) to be defined as data structures in Blueprint. When a developer adds a GOAP plugin to the project, they can visually build GOAP logic by creating Blueprint classes and using the properties of these classes. For example, they can create a CollectWoodAction Blueprint class and specify how the action will work using its properties defined with structures called Preconditions and Effects. This simplifies the process of initializing and configuring a GOAP system without writing code 40105

process. These plugins transform GOAP into an accessible and manageable part of the project's structure.

Data-Driven Configuration: The Power of Designers

One of the strongest aspects of GOAP implementations in Unreal Engine is how deeply integrated data-driven configuration is as part of the platform. Sources state that configuring GOAP actions and goals using data structures such as data tables or custom data transfer objects, rather than hardcoding them, is recommended as the best practice. This enables designers to adjust NPC behaviors from an in-game interface (for example, an .ini file or directly through an in-game configuration window). Complex conditions for an action, such as "an NPC carrying a weapon to be active in combat," can be defined by the designer in a data file without modifying code. This approach offers the benefit provided by similar packages in Unity more deeply and as a part of the platform's core architecture. By quickly experimenting with and tweaking AI behaviors without coding, designers can make the development process iterative and layered. GOAP plugins allow this process to be more automated and fully integrated with Blueprint.

Hybrid Use of C++ and Blueprint: Synergy of Power and Flexibility

Unreal Engine's GOAP support functions best with a seamless transition between C++ and Blueprint. While designers can quickly prototype GOAP behaviors with Blueprint, programmers can write complex actions or custom planning logic in C++ and call them from Blueprint. This hybrid approach combines both speed and power. For example, while a simple "patrol" action can be made visually with Blueprint, a complex "craft weapon" action can contain a manufacturing algorithm optimized with C++. This action can be executed via a function call from Blueprint. Similarly, the GOAP planner itself can be written in C++ and expose an execution function that can be called from Blueprint. This allows GOAP to leverage the power of C++ where performance is critical, and the speed and efficiency of Blueprint in less critical areas. This flexibility makes GOAP suitable for use in both small indie projects and professional, large-scale AAA game projects.

Alternative and Advanced Systems: Understanding GOAP's Place

In Unreal Engine, GOAP is not the sole and absolute artificial intelligence solution. Epic Games offers powerful systems as alternatives to or support for GOAP. Among these are 106 40 3590

the most important ones are Behavior Trees (BT) and the Environment Query System (EQS). In fact, the most powerful usage of GOAP emerges when combined with these systems. GOAP usually functions in a sub-node of a BT as a "planner" that finds the best path to reach a specific goal. While the root of a BT determines the NPC's overall purpose ("Survive"), GOAP running in a sub-node of the BT can find the most strategic actions to achieve this purpose (find water, cook food, flee without attacking the enemy). This demonstrates that GOAP is not a "dominant" system, but a "tool" that creates synergy with other systems. GOAP expands the decision-making capability of BTs and makes NPC behaviors more dynamic and intuitive. Additionally, UE has advanced next-generation AI frameworks available, such as Mass AI and Reflection Tree (RTree). RTree is an on-device AI reasoning system developed for Unreal Engine 5 that is grounded in GOAP logic. This indicates that GOAP can play an important role not only in PC/console games, but also on expanding mobile and VR/AR platforms.

General Evaluation

Unreal Engine 5 offers developers a versatile and powerful platform for GOAP implementations. While a plugin-based approach provides the ability to easily incorporate GOAP into a project, Blueprint integration and data-driven configuration make managing and adapting GOAP logic accessible for designers. The perfect harmony between C++ and Blueprint carries the potential to endlessly expand GOAP's performance and capabilities. The fact that GOAP can be used as part of a larger artificial intelligence architecture like Behavior Trees demonstrates its flexibility and adaptability to modern game development practices. Ultimately, Unreal Engine offers one of the most efficient and data-driven ways to use GOAP while granting developers great freedom in using this powerful planning system to bring NPCs to life in their games.

Strategic Effects and Impact on Design: From Dynamism to Performance

The GOAP (Goal-Oriented Action Planning) architecture is more than just an artificial intelligence technique; it is a strategic tool that profoundly affects the game design process and the player's experience. This approach redefines the dynamism of NPC behaviors, flexibility in the design process, performance management, and relationship with other artificial intelligence systems. 41101 31 3398

This section examines the strategic advantages and potential challenges that GOAP offers for game developers from a general perspective applicable to both platforms.

Dynamism and Intuitiveness of NPC Behaviors

The most distinct and valuable strategic effect of GOAP is that it increases the dynamism and intuitiveness of NPC behaviors. In traditional artificial intelligence systems such as Finite State Machines (FSM) or simple Rule-Based systems, characters usually have to comply with a predefined set of actions. These systems may not be flexible against small changes in the game world and can make behaviors predictable to the player. GOAP does the exact opposite. A GOAP-based NPC determines its own strategy based on environmental changes and its own needs. For example, when an NPC is given the goal to "be healthy," the GOAP system will find the most suitable way to reach this goal. If there is a health pack near the NPC, it can take it. If the store/pack is empty, it can create an alternative strategy (for example, gathering herbs or going to its home). This causes the player to make new assumptions about the world after every interaction because the NPCs' behavior is not predictable. This dynamism creates an experience that feels smarter, motivated, and lifelike to the player. GOAP transforms an NPC from a passive quest-completer into an active entity that sets its own goals and interacts with the environment to achieve them. This contributes to making the game world feel more alive and believable.

Flexibility in the Design Process and Iteration Speed

GOAP, especially when configured in a data-driven manner, offers revolutionary flexibility in the game design process. Defining actions, goals, and their preconditions and effects through structures such as data tables or ScriptableObjects allows testing, tweaking, and refining NPC behaviors without requiring code changes. This enables designers and QA specialists to rapidly iterate AI behaviors based on player feedback. Designers can reflect requests such as "This enemy should be found near the water edge more frequently" or "There should be more of an advantage when fighting with gathered weapons" directly in the AI data. This renders the development process more collaborative and layered. Unreal Engine's Blueprint support accelerates this process even further, as it allows designers to visually build AI logic without writing code. In Unity, packages like CrashKonijn provide a way to achieve this flexibility by offering a similar data-driven approach. GOAP makes AI not just a tool for developers, but also an integral part of the game design process.

1 1866 106 105

Performance Cost and Management

The biggest strategic concern of GOAP is computational cost. The planning process can heavily utilize the CPU, especially when the number of actions is large and the world state is complex. This can create a critical performance bottleneck, particularly in large-scale games where hundreds of NPCs would run GOAP simultaneously. Therefore, effectively managing the performance cost of GOAP is vital for a successful implementation. Triggering GOAP only on specific events (for example, when an NPC's goal changes, an action is completed, or once within a certain time interval) rather than running it continuously every frame is the most fundamental optimization strategy. Fast and efficient GOAP libraries can reduce this cost by using more efficient search algorithms and state management techniques. Unity's DOTS/ECS architecture provides a more powerful way to solve this performance issue by offering frameworks like Utility Intelligence, which combine GOAP with ECS-compatible data structures and Burst optimization. In Unreal Engine, C++-based actions and UE's CPU usage profiling tools help better manage GOAP's resource consumption. Ultimately, GOAP is a trade-off where a careful balance must be established between performance cost and dynamic behavior.

Ease of Integration and Relationship with Other Systems

GOAP is frequently used in conjunction with other artificial intelligence systems, and this integration forms the foundation of the most powerful AI architectures. GOAP is commonly used alongside Behavior Trees (BT). While BT acts as a high-level decision-making mechanism that determines the overall objective, GOAP can function within a node of the BT as a low-level planner that finds the best path to reach a specific goal. For example, while the root of a BT seeks an answer to the question "What should I do?", GOAP as a sub-node can plan the safest and fastest route for the goal of "Find water". This hybrid approach combines the structure of BT with the flexibility of GOAP. GOAP can also be combined with Utility AI. While Utility AI selects the most "useful" action among currently planned actions, GOAP provides a roadmap on how to execute those actions. If GOAP is a planning engine, Utility AI can be viewed as a decision-making system that evaluates the output (actions) of that planning engine and picks the best one. The ease of integrating GOAP depends on the platform and the tools used. Unreal Engine makes creating such hybrid systems quite easy thanks to Blueprint support, whereas in Unity, this may require writing more custom code and put in more effort to ensure compatibility between packages.

6 11 31 96

In conclusion, GOAP presents a powerful strategic opportunity for game developers. It can be used to bring NPC behaviors to life, add flexibility to the design process, and deliver deeper, more memorable experiences to the player. However, securing these benefits requires conscious management of computational cost, synergistic integration with other artificial intelligence systems, and selecting an implementation strategy tailored to project needs.

Comparative Synthesis: Philosophy, Data-Drivenness, and Alternative Systems

Although the GOAP (Goal-Oriented Action Planning) architecture has the potential to create powerful artificial intelligence behaviors in both Unity and Unreal Engine 5, it is combined with different philosophies, development approaches, and ecosystem dynamics across both platforms. This comparative synthesis analyzes these differences to demonstrate how GOAP is implemented in both platforms and the strategic impacts of this implementation on game design. Key differences are examined under main topics such as integration philosophy, data-drivenness, and relationships with alternative systems.

Integration Philosophy and Development Toolsets

The most fundamental difference between Unity and Unreal Engine lies in their philosophy of integrating GOAP into the platform. Unity presents GOAP as a "toolset." The platform provides the basic building blocks (classes, data structures, etc.) necessary to implement the core logic of GOAP, but does not promote this system as the primary artificial intelligence solution. Instead, it leaves developers free to create a custom solution or choose to use ready-made packages from a rich ecosystem like the Unity Asset Store. This approach gives Unity great flexibility and control. Developers who want more customization and full control can completely redesign GOAP according to their own needs . However, this flexibility comes with costs such as extended development time and increased effort required to resolve potential bugs. Ready-made libraries, especially robust solutions like CrashKonijn's Behavior Package, significantly increase development speed, but the sustainability and compatibility of these packages are always the developer's responsibility .

In contrast, Unreal Engine treats GOAP as a central part of the platform. Although GOAP is not presented as one of Unreal Engine's built-in artificial intelligence systems

53 662

it offers an "out of the box" and data-driven experience with powerful plugin and Blueprint visual programming support. GOAP plugins allow GOAP's core components to be defined as data structures in Blueprint . This makes GOAP accessible to designers with less technical expertise and increases iteration speed. Unreal Engine's "designer-first" philosophy places GOAP in a Blueprint-based interface that makes it possible to configure it without writing code or with minimal code. This makes GOAP not just a developer tool, but also an integral part of the game design process.

Feature

Unity

Unreal Engine 5

Core Approach

Generally "Do It Yourself" (offers a basic structure) or an ecosystem based on numerous third-party packages.

"Plug and Play" (usually a single, well-woven plugin).

Development Tools

Visual Studio / Rider (C#), packages from the Asset Store. UI and integration vary by package.

Blueprint Visual Scripting (key advantage), C++ (professional development).

Data-Drivenness

Possible (data tables, scriptable objects), but varies by package.

Highly supported. Goals and actions can be configured directly with data tables/USTRUCTs.

ECS/DOTS Integration

Challenges exist. Optimized ECS GOAP frameworks are available (Utility Intelligence).

Not directly supported. However, GOAP works well as part of UE's overall architecture.

The Role of Data-Drivenness and Its Impact on the Design Process

In both platforms, GOAP yields the best results with data-driven configuration. Moving the preconditions and effects of actions and goals outside of code increases iteration speed and design flexibility. However, the role and implementation of this data-drivenness differ between platforms. In Unity, data-driven GOAP is usually possible with features offered by a package. For example, CrashKonijn's package allows defining actions as ScriptableObjects and referencing them by an agent . The developer can configure the AI's behaviors by creating these data structures. However, this depends on the package supporting this feature.

Unreal Engine, on the other hand, offers data-drivenness as part of the platform's core architecture. GOAP actions and goals can be configured directly using Blueprint-compatible data structures such as UBlueprintAssignable or UDataAsset . Designers can edit these data structures in an in-game content editor. This requires seeing GOAP as a natural extension of the platform in Unreal Engine, rather than just an "add-on" in Unity. This difference greatly affects the iteration speed of designers and the integration of the GOAP system into the design process. In Unreal Engine, compiling code is not required to change an AI behavior; simply changing a setting in an in-game interface is enough. This makes a significant difference on the strategic value of GOAP.

40105 112 106

Alternative Systems and Hybrid Approaches

GOAP is not an absolute solution that forces you to use any single AI system alone. In both platforms, the most powerful implementations of GOAP are hybrid approaches that combine it with other AI systems. In Unreal Engine, this is primary. Epic Games offers powerful systems as alternatives to or supporting GOAP. These are frequently used together with GOAP . GOAP generally functions as a "planner" within a sub-node of a BT, finding the best path to achieve a specific goal . This shows that GOAP is not a "dominant" system, but a "tool" that creates synergy with other systems. GOAP expands the decision-making capability of the BT and makes NPC behaviors more dynamic and intuitive. Similar hybrid approaches are possible in Unity. For example, while a BT manages the NPC's general state (sleep, combat, investigate), in the "investigate" state, GOAP can find the best path to reach the investigation goal. Such integration in Unity may require manually setting up the connection points between the BT and GOAP libraries. In Unity, GOAP can also be combined with Utility AI. While Utility AI selects the most "useful" action among currently planned actions, GOAP provides a roadmap on how these actions should be performed . This shows that GOAP is not only an independent system, but can also be used as part of a larger AI architecture such as Behavior Trees. As a result, Unity and Unreal Engine combine GOAP with different philosophies and different toolsets. Unity is a platform focused on control and customization, offering GOAP as a flexible toolset that the developer can keep under their own control. Unreal Engine, on the other hand, is a platform that maximizes designer iteration speed with data-drivenness and Blueprint, presenting GOAP as a natural part of the platform. The choice will depend on project requirements, the technical competencies of the development team, and the complexity of the AI behavior required by the game.

Conclusion and Practical Evaluation: Which Platform and Approach Should Be Chosen?

The GOAP (Goal-Oriented Action Planning) architecture is a powerful strategic tool for game developers to bring NPC behaviors to life, make the game world dynamic, and offer players smarter and more intuitive experiences. This report has examined the technical implementation details and strategic impacts on game design of GOAP in both Unity and Unreal Engine 5 environments separately and comparatively . The final evaluation aims to help developers choose the most appropriate platform and approach depending on project needs, team competencies, and the targeted game experience.

Strategic Implications of Platform Selection

Unity and Unreal Engine adopt different philosophical approaches to implementing GOAP. Unity presents GOAP as a "toolset." This gives developers the flexibility to keep all aspects of GOAP under their own control and achieve full customization. This approach is particularly attractive for developers aiming for maximum performance using a data-driven technology stack (DOTS) or wanting to deeply modify GOAP logic according to their own specific requirements . However, this flexibility brings more custom code writing, the risk of solving potential integration issues, and longer development times. Although ready-made libraries speed up this process, sustainability and compatibility issues may arise . In contrast, Unreal Engine treats GOAP as a central part of the platform. GOAP offers an "out-of-the-box" and data-driven experience through a powerful plugin and Blueprint visual programming system . This approach highlights the ability of designers and developers to rapidly prototype and configure AI behaviors without writing code or with minimal code. Unreal Engine's "designer-first" philosophy makes GOAP not just a developer tool, but an integral part of the game design process. This greatly increases iteration speed, collaboration, and the integration of the GOAP system into the design process. Positioned as a natural extension of the platform in Unreal Engine, GOAP works synergistically with other built-in systems (Behavior Trees, EQS) as a powerful "tool" .

Practical Evaluation and Recommendations

Based on the project type and target audience, the following evaluations can be made:

  • Selection by Game Type:

    • Complex Strategy Simulations, Open-World RPGs, and Dynamic NPC Interactions: These types of games showcase GOAP's greatest potential. Here, NPCs are expected to determine their own goals and strategies based on the world around the player. In this case, Unreal Engine 5 can offer a faster and more flexible development process thanks to its Blueprint-based data-driven approach. Allowing designers to experiment with AI behaviors without coding increases iteration speed.

    • Rapid Prototypes, Mobile Games, or High-Performance Projects (DOTS): If the project uses the DOTS architecture or aims for the highest performance with the lowest cost, Unity may be a more attractive option. However, in this case, it is necessary to consider using ECS-compatible GOAP frameworks such as Utility Intelligence (ECS) or developing a custom DOTS-compatible GOAP solution . Rather than using GOAP directly, designing it integrated with the DOTS architecture is more advantageous in terms of performance.

  • Selection by Team Competencies:

    • High Code Knowledge, Designer-Centricity Valued: If your team has developers specialized in C# and C++ coding and you want deep control over GOAP logic, Unity provides you with more control and flexibility.

    • Designers at the Center, Coding Minimized: If your team values designers being able to configure AI behaviors directly from an in-game interface, Unreal Engine 5 is definitely the superior option. The Blueprint system facilitates this workflow and accelerates the development process.

  • The Power of the Hybrid Approach: Instead of thinking of GOAP as a standalone system, considering it as part of a larger AI architecture is the most strategic approach. In both platforms, using GOAP for rarely triggered, long-term, and complex problem-solving tasks, while allowing faster-running Behavior Trees or simple Finite State Machines to manage daily actions, will be an optimal solution. While GOAP answers the question "what to do?", the BT or FSM answers the question "what should I do now?". Making this distinction is critical to optimizing both performance and behavioral richness.

A Look into the Future

The future of GOAP will be shaped by the evolution of the roles AI should play in games. Unreal Engine's investment in on-device AI reasoning systems, such as Reflection Tree (RTree), shows that GOAP logic can play an important role not only for large game consoles and PCs, but also on mobile and VR/AR platforms. These trends suggest that GOAP's core planning principles can form the foundation of future, more advanced and distributed AI systems.

Ultimately, the GOAP architecture is an indispensable tool in the modern game developer's repertory. Unity and Unreal Engine offer different but equally powerful ways to use this tool. The choice will be a reflection of your project vision, team skills, and targeted experience.

*Note : The visuals were generated by Google Gemini.

GOAPGameAIUnityUE5BehaviorTreeAIArchitecture
Deep Research Tool
Qwen (Alibaba Cloud)
Qwen (Alibaba Cloud)
Translation Tool
Google Gemini
Google Gemini

Share