Comment on page
In the GOAP system,
Goalsrepresent the desired outcomes or objectives that an agent aims to achieve. They serve as the starting points for the
Planner, guiding it in determining the most suitable
Actionto take in order to fulfill a particular
GoalConfigprovides the necessary settings to define and shape a
Goal. It encompasses several properties:
Description: This property specifies the exact type or category of the
Goal. It helps in identifying and categorizing different goals within the system.
Description: Conditions are a set of criteria based on
WorldKeysthat must be met for the
Goalto be considered achieved. These conditions guide the
Plannerin its decision-making process, helping it select the best
Actionthat aligns with the desired outcome.
For instance, if a
Goalis to "Stay Safe", conditions might include
WorldKeyslike "IsHealthHigh" or "IsInSafeZone".
Goalclass serves as the blueprint for creating specific goals. Key points about the
- Inheritance: Every
Goalclass is derived from the foundational
GoalBaseclass. This ensures that all goals share some basic properties and behaviors.
- Statelessness: A
Goalclass doesn't maintain any internal state. Its primary role is to provide criteria to the
Planner, which then uses this information to decide on the most appropriate
By understanding and configuring
Goalsappropriately, game developers can guide agents towards desired behaviors, ensuring they act in ways that enhance the gameplay experience.
public class FixHungerGoal : GoalBase