Game AI Labs
Five exercises covering a patrolling guard, A* pathfinding, steering behaviours, behaviour trees and goal-oriented action planning.
GOAP Guard Planning · Case study
A goal-oriented action planning exercise that separates observed facts from changes an agent expects its actions to produce.
The agent reads sensed world facts separately from facts set by its own actions. This gives the planner a way to reason about the current scene without mistaking an expected effect for something it already observed.
The planner uses Dijkstra’s algorithm over bitmask world states. Action prerequisites and effects define where each action can take the agent; cumulative cost guides which state it explores next. Patrol and approaching a target are examples of available guard actions.
The agent checks feasibility before it starts an action. A failed check invalidates the plan and starts a cooldown before the next planning attempt. This does not claim that every running action is continuously revalidated.
References
Separates sensed world facts from action effects, checks whether an action can execute, and limits replanning.