Tech-O-Bytes feature new and emerging technology topics in a simple analogy-driven explanation format for ease of consumption by techies and non-techies alike.
Blackboard Architecture is an architecture style or pattern used in solving Artificial Intelligence, Mining, Machine learning problems
Classroom & problem solving assignment analogy
Picture a number of students are all writing on a blackboard at the same time, trying to solve a problem. You think they will?
What if we add a teacher who first asks each student what he wants to write on the blackboard and decides which student has the best idea. And when the student is finished, the process is repeated.
This is the idea behind the blackboard architecture. The students are called Knowledge Sources. The teacher is called the Scheduler and the Blackboard is the common data structure of the Knowledge Sources. The blackboard represents all states of some problem space.
Blackboard is the common data structure of the knowledge sources. The blackboard all the states of the given problem space. The blackboard usually contains several levels of description w.r.t the problem space. These levels may have several relationships with each other. These levels are a part of the same data structure. In case more than one data structure is needed, the representation is broken into panels and each panel can now hold multiple levels.
The knowledge source is a component that adds to the solution of the problem. It is anything that reads from the blackboard and suggests some changes to parts of the blackboard. Usually, the knowledge sources are disconnected with other knowledge sources.
Scheduler controls and decides which knowledge source will get an opportunity to change the blackboard. For every execution cycle, the scheduler observes the changes made to the blackboard and activates the knowledge source to execute the next change.
A classic example is speech recognition. The input data is the audio that is to be recognized. The audio can be segmented and multiple threads start matching the snippets to words. As each thread finds matching words, they update the blackboard with the translation up to this point. As phrases start to be assembled another thread can do grammar checking to verify the choices the various recognizer threads are making. If a word has a low confidence and violates the grammar, the piece can be rerun looking for alternatives. This might even result in re-partitioning the audio data as stutters and pauses are resolved.
As the phrases become sentences, even larger views can be taken and the various options for homophones (pair, pare) can be resolved. All of this is done by having the blackboard open to all of the processes and “locks” only being applied as they various results roll in.