Dynamic blackboard memory¶
Blackboard class holds the central data repository of the platform. It
stores the knowledge sources and any shared data, in particular the output of
the knowledge sources (e.g. estimates of the location of a sound source). It is
accessible to all knowledge sources; and it not only stores current data, but
keeps track of the history of this data in order to enable knowledge sources to
work on time series data.
Blackboard is flexible about data categories, which do not
have to be hard-coded into the system. Knowledge sources decide on their own and at runtime what to add and what
to request. Thus, the system does not need to be changed in order to implement
new knowledge sources that work with new data categories. Of course, knowledge
sources can only read data categories that are actually stored in the blackboard
by other knowledge sources (or themselves).
The following listing shows an excerpt of the
class Blackboard KSs; signals; currentSoundTime; methods Blackboard() addData( dataLabel, data, append, time ) getData( dataLabel, reqSndTime ) getLastData( dataLabel, time ) getNextData( dataLabel, time ) getDataBlock( dataLabel, blockSize_s )
Prominently featured are methods to add and access data:
- lets knowledge sources add data to the blackboard storage. The data category
has to be named in
datahands over the actual data to store.
appendis an optional flag indicating whether to overwrite or append data at the same time step (there might, for example, be several source identity hypotheses per time step, but only one source number hypothesis might be allowed).
timespecifies the time point under which this data shall be stored. It is optional and, if not set, defaults to the current time.
- lets knowledge sources read data from the blackboard storage.
dataLabelindicates the data category requested,
reqSndTimethe time point of interest.
getDataBlockare special cases of
getDatafor retrieving the last data, the next data after a particular point in time, or a whole data block of length
The following is an example from the implementation of the
idHyps = obj.blackboard.getData( ... 'identityHypotheses', obj.trigger.tmIdx ).data; %... %find the most likely identity hypothesis -> maxProbHyp %... obj.blackboard.addData( ... 'identityDecision', maxProbHyp, false, obj.trigger.tmIdx );
Let us assume that we have an instantiation called
bbs of the Blackboard system.
Now we would like to see the currently available data in its memory. For that
you can run:
or specify explicitly a time for which you would like to see the available data:
Additionally, the blackboard is used as a storage for pointers to signals from
the Auditory front-end requested by knowledge sources inheriting from
AuditoryFrontEndDepKS. The actual memory in which these signals are stored
for recall is implemented in the Auditory front-end through circular buffers.