01/11/2023
Unlike finite state machines, a behaviour tree controls the flow of decisions made by an AI agent rather than the states it inhabits. The tree comprises nodes arranged in a hierarchy. At the far ends of this hierarchy are ‘leaves’ that constitute commands that NPCs follow. Other nodes form the tree’s branches, which the AI selects and traverses based on the game context to give NPCs the best sequence of commands in any particular situation. 😍😎