The weapons manager controls the updating of the agent’s weapons. In every frame the weapons manager queries the blackboard and checks what tasks is it required to carry out such as reloading or changing weapons. The weapons manager also fires at the agent’s target if there’s a request on the blackboard to do so. Each of the agent’s weapons are updated which involves rendering and updating all the weapon’s shots. Once finished attacking, the weapons manager updates the attack status on the blackboard.
The navigation manager coordinates the agent’s navigation around the virtual world. The A* algorithm is used to find paths as it is an industry standard algorithm for pathfinding and is used for the GOAP planner. The navigation manager is also in charge of finding patrolling nodes, valid attack positions, dodging, finding pickup locations and performing flocking. As the process of navigation using A* it directly linked to the actual GOAP planning, the more involved details of it is left for a later stage. However when updated, the navigation manager checks if its current navigation target is the same as the navigation target on the blackboard, if not then it requests for the new path to be created using A*. It then steps through the sequence of path nodes in the navigation plan one node at a time, moving the agent along until it reaches its final destination. When finished, the navigation manager updates its navigation status on the blackboard.
3.4 Working Memory
When the sensory manager discovers something about the world it deposits a working memory fact in working memory. At a later stage if the AI module is looking for information about the world, it searches all valid working memory facts looking for the best fact which is used to help make a decision or execute an action. The benefit of using the working memory is that it allows for the storage of results (caching) and sensors may not need to be run every frame, they can be delayed (distributed processing).