This page is part of the IAUS Manual. ♦ Brain ♦ Behavior ♦ Behavior Type ♦ Decision ♦ AI Entity ♦
A Brain is the top level component that is assigned to an agent in the game. From a data standpoint, a Brain is simply a collection of Behavior Packs and Ability Packs. However, the Brain class contains most of the data for the agent's thinking and does most of the work of scoring Behaviors and keeping track of the history of the Behavior usage.
It is the Brain class that is ticked on a regular basis by the game code. However, the Think Cycle is controlled by the brain itself. That means that while the Brain might be ticked every frame of game loop, the Brain may only think perhaps every 250ms.
During this process, the Brain assembles a list of potential neighbors and combines them as necessary with Behaviors to arrive at a combined list of Decisions to be scored and selected from. It then proceeds to score all those Decisions to arrive at the one with the greatest utility at the time.
From a data standpoint, other than a unique ID, name, and a description, a Brain is simply a collection of Behavior Packs and Ability Packs.
Exporting a Brain is merely exporting the Brain's ID and the Behavior Packs and Ability Packs it contains.