Unity game AI

HTN Forward Planner

A hierarchical task network planner that lets four adventurers cooperate to take a treasure guarded by a minotaur.

The map in play

How it works

Four adventurers start by boat, one in each corner of the map. A minotaur in the centre guards a treasure, and the adventurers have to team up so that one of them carries it back to a corner.

  • Shared world state: positions, health, what the minotaur is doing and whom it targets, and who is closest to the treasure. Every adventurer reads it, so they cooperate without messaging each other.
  • Task network: compound tasks break down into actions such as pathfinding to the treasure, picking it up, delivering it, attacking or resting, each with its own preconditions.
  • Minotaur: it reacts at four levels of priority, from scouting its surroundings to going after whoever carries the treasure.

Credit: the water and the floating boats start from FusionWater by nailuj05, which I then extended for this project.