Constructing a soldier blackboard
Previously, we stored any data from evaluators and actions on the userData
structure. We can now move all this data to our blackboard. The following is the list of attribute values we'll be storing within the blackboard:
Blackboard attributes |
Description |
---|---|
|
Whether the agent is considered alive or dead |
|
The current amount of ammunition the soldier's rifle has left |
|
The clip size of the soldier's rifle |
|
The starting health of the agent |
|
The best enemy agent that can be attacked |
|
The best strategic position to avoid enemy agents |
Constructing a blackboard requires you to set the initial attribute values we previously stored on the soldierUserData
table directly. At this point, we can create KnowledgeSource
instance implementations for enemy selection and flee position calculations. To allow access of the blackboard to all our agent systems, we can store the blackboard itself on soldierUserData...