Hierarchical Task Network Planner for Unity

What is a Hierarchical Task Network?

The Hierarchical Task Network (or HTN) planner is an increasingly popular technique for implementing automated planning. It is a fast, expressive, easy to manage, and very powerful method of designing and managing artificial intelligence for games.

Unlike reactive techniques such as Behavior Trees, HTN planners are capable of reasoning about the future state of the game and returning a planned sequence of actions that can be used to satisfy an end goal. Unlike G.O.A.P. and other STRIPS-style planners, which use a complex search strategy like A* or other bottom-up search technique to find an optimal solution to satisfy a goal state, HTN planners use a straightforward (and fast) top-down forward-decomposition model to derive a solution, and its hierarchical nature results in a significantly higher degree of directorial control.

Hierarchical Task Networks have been described by one industry expert as “a great blend of planners and behavior trees, giving developers great control over their behaviors yet leveraging runtime computation to get more robust behaviors with less authoring”, and the HTN Planner for Unity builds upon these strengths by providing a visual designer for authoring HTN graphs in the Unity Editor.

.