# Simple

The simple example use `ScriptableObject` as the configuration method. This is the easiest way to get started with GOAP. The demo scene can be found in `Demos/Simple/Scenes/SimpleDemo.unity`.

Each agent has 2 separate goals: `WanderGoal` and `FixHungerGoal`. The `WanderGoal` will make the agent wander around the scene. The `FixHungerGoal` will make the agent eat apples. The agent will only eat apples if it is hungry. The agent will only wander if it is not hungry.

Goals:

* WanderGoal
* FixHungerGoal

Actions:

* WanderAction
* EatAppleActions
* PickupAppleAction
* PluckAppleAction

## Rules

If the agent has a `hunger > 80`, it will switch to the `FixHungerGoal`. If the agent has a `hunger < 20`, it will switch to the `WanderGoal`.

![Simple Demo Graph](/files/ETmlHI0uKs5GpYmD7AAi)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://goap.crashkonijn.com/goap-v2/examples/simple.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
