AI manager is Grail’s command center.
Manager takes care of registered entities and shared blackboards.
Also, it’s resposible for threading.
Constructs AI manager.
During construction, AI manager spawns worker threads, whose number is determined by a constructor argument.
Those threads work on updating reasoners of registered entities.
If the user passes 0 as the constructor argument, all updates will execute on the main thread.
Creates a shared blackboard identified by the given name.
Register AI Entity
Registers an entity with a given priority.
After registration, AI Manager is be able to update the entity’s state.
Entities will lower priority values are be updated first.
Remove AI Entity
Queues an entity to be unregistered from the manager.
All queued entities are removed by the end of the next update.
Subscribe To Blackboard
Subscribes the given entity to a shared blackboard owned by this manager and identified by a name.