Blackboards
To easily access and store arbitrary knowledge that agents use, we can implement a well-known data structure called a blackboard. In essence, a blackboard is a centralized place that allows the reading and writing of any arbitrary data that our agent's systems can use. Sources of the blackboard's knowledge can be sent directly to the blackboard, or it can be provided by encapsulated knowledge sources added to the blackboard. For an in-depth overview of blackboard systems, see the paper Blackboard Systems by Daniel Corkill.
Creating a blackboard
Creating a blackboard is relatively simple, as the blackboard can be represented almost entirely by an associated array index by knowledge attribute names. One small caveat to simply storing attributes, though, is the use of knowledge sources that create read-only attributes within the blackboard:
Blackboard.lua
:
Blackboard = {}; function Blackboard.new(userData) local blackboard = {}; -- The Blackboard's data members. blackboard...