13.2 Approaches to Structuring the Blackboard

There is no one way to structure a blackboard. However, most blackboards will have certain characteristics and attributes in common. The original contents of the blackboard will typically contain some kind of partitioning of the solution space for the problem that is to be solved . The solution space will contain all the partial solutions and full solutions to a problem. For instance, let's say that we have a search engine that searches the Internet for pictures of cars . The search engine can process a bitmap image or vector image to determine whether it contains a picture of a car and if so, whether it is the target car. Let's say that our search engine is developed using the blackboard model. Each knowledge source has a speciality: one knowledge source is a specialist in identifying images of tires, another focuses on identifying rearview mirrors, and another is an expert in identifying car door handles, lug nuts, and so on. Each aspect of the car represents a small part of the solution space. Parts of the solution space contain full images of cars from different perspectives that is, from the top, the bottom, 45-degree angles, and so on. Other parts of the solution space only contain sections of cars, perhaps the front end, the roof, the trunk, and the back end. A bitmap or vector image is placed on the blackboard and the individual knowledge sources attempt to identify something in the image that might be part of a car. If some part of the solution space matches something in the image, that piece of the image is written to another part of the blackboard as a partial solution. One knowledge source might put an identified car door handle on the blackboard. Another may put an identified car door on the blackboard. Once these two pieces of information have been put on the blackboard, another knowledge source may use this information to aid in identifying the front end of a car in the image. Once this has been identified, the image of the front end is placed on the blackboard. Each of these various ways to identify the image of a car represents part of the solution space.

The solution space is sometimes organized in a hierarchy. In our car example, complete images of cars might be at the top of the hierarchy and the next level may consist of various views of front ends and back ends, with the next level consisting of the doors, trunks, hoods, windshields, and wheels. Each level describes a smaller, perhaps less obvious image of some part of a car. The knowledge sources may work on multiple levels within the hierarchy simultaneously . The solution space may also be organized as a graph where each node represents some part of the solution and each edge represents the relationships between two partial solutions. The solution space may be represented as one or more matrices, with each element of the matrix containing a solution or partial solution. The solution space representation is an important component of the blackboard architecture. The nature of the problem will often determine how the solution space should be partitioned. In addition to a solution space component, blackboards typically have one or more rule (heuristic) components . The rule component is used to determine which knowledge sources to deploy and what solutions to accept or reject. The rule component can also be used to translate partial solutions from one level in the solution space hierarchy to another level. The rule component may also be used to prioritize the knowledge source approaches. Some knowledge sources may go down blind alleys. The blackboard deselects one set of knowledge sources in favor of another set. The blackboard may use the rule component to suggest to the knowledge sources a more appropriate potential hypothesis based on the partial hypothesis already generated. In addition to the solution space and rule component, the blackboard will often contain initial values, constraint values, and ancillary goals. In some cases the blackboard will contain one or more event queues used to capture input from either the problem space or the knowledge sources. Figure 13-2 shows a logical layout for a basic blackboard architecture.

Figure 13-2. The logical layout for a basic blackboard architecture.

* If the KS (knowledge source) is a process, communication can be over a network or IPC (interprocess communication). If the KS is a thread, communication may be parameter passing.

graphics/13fig02.gif

Figure 13-2 shows the blackboard has a number of segments, each segment having a variety of implementations . This suggests that blackboards are more than global pieces of memory or traditional databases. While Figure 13-2 shows the common core components that most blackboards have, the blackboard architecture is not limited to these components. Other useful components for blackboards include context models of the problem and domain models that can be used to aid the problem solvers with navigation through the solution space. The support C++ has for object-oriented design and programming fits nicely with the flexibility requirements of the blackboard model. Most blackboard architectures can be modeled using classes in C++. Recall that classes can be used to model some person, place, thing, or idea. Blackboards are used to solve problems that involve persons, places, things, or ideas. So using C++ classes to model the objects that blackboards contain or the actual blackboards is a natural fit. We take advantage of C++ container classes and the standard algorithms in our implementations of the blackboard model. In addition to the built-in classes we construct interface classes for the mutexes and other synchronization variables that we use with the blackboard. Because multiple knowledge sources can access the blackboard simultaneously, this means that the blackboard is a critical section and access needs to be synchronized. So along with the other components that a blackboard contains, we will use synchronization objects to the blackboard.



Parallel and Distributed Programming Using C++
Parallel and Distributed Programming Using C++
ISBN: 0131013769
EAN: 2147483647
Year: 2002
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net