Goal oriented AI

An exploration in code of Goal Oriented Action Planning (GOAP), a way to build AI with fairly emergent behaviour. From the world and the objects around it, the agent works out the best strategy to reach its goal; here, gathering wood.

2020 Games Table

A simple game scene shows blocks, trees, and a chart comparing action costs, with text about choosing the most efficient plan.

Every available action has a cost and a precondition. Collecting logs from the ground needs nothing but costs more than chopping wood, and chopping wood needs an axe first. Over several prototypes in Unity and C#, I improved the performance and my control over the agents.

The system became the rabbits’ brain in A Leap Forward, and I have used it since in other games that needed good or experimental AI.

Jeff Orkin’s GOAP page

How it was made

GOAP 3rd Person
Goal oriented AI - chopping wood/collecting logs