system architectures blackboard pattern
play

System Architectures Blackboard Pattern Jonathan Thaler Department - PowerPoint PPT Presentation

System Architectures Blackboard Pattern Jonathan Thaler Department of Computer Science 1 / 31 Blackboard Pattern Motivation Fire propagation in complex buildings is hard to detect and forecast, but exremely important for emergency plans. 2 /


  1. System Architectures Blackboard Pattern Jonathan Thaler Department of Computer Science 1 / 31

  2. Blackboard Pattern Motivation Fire propagation in complex buildings is hard to detect and forecast, but exremely important for emergency plans. 2 / 31

  3. Blackboard Pattern Motivation Figure: Fire-Alarm System (Jan Bosch, 2000). 3 / 31

  4. Blackboard Pattern Motivation Monitors a large number (up to 10,000) of detectors (temp., smoke). Alarm situation depends on complex input correlations in time & space. Each output depends on a potentially large collection of inputs. Each output requests the status at each sensor (input) it depends on. This might result in too long request cycles. Figure: Fire-Alarm System (Jan Bosch, 2000). 4 / 31

  5. Blackboard Pattern Blackboard Architectural Pattern The blackboard architecture is used in an immature domain, in which no closed approach to a solution is known or feasible. It is used to coordinate separate, disparate systems that need to work together or in sequence, continually cycling for updates and actions. 5 / 31

  6. Blackboard Pattern The blackboard model is usually presented with three major parts : 1. The knowledge sources : separate, independent parcels of application-dependent knowledge. Interaction among knowledge sources takes place solely through the blackboard . 2. The blackboard data structure : problem-solving state data, organized into an application-dependent hierarchy. Knowledge sources make changes to the blackboard that lead incrementally to a solution to the problem. 3. Control : driven entirely by the state of the blackboard. Knowledge sources respond opportunistically when changes in the blackboard make them applicable. The blackboard consists of a number of variables. This is similar to a repository , which can be accessed by separate autonomous processes. A controller monitors the properties on the blackboard and can decide which knowledge sources to prioritize. 6 / 31

  7. Blackboard Pattern Mobile robots was used in the NAVLAB project as part of the CODGER system Captain : overall supervisor (controller). Map navigator : high-level path planner (knowledge source). Lookout : module that monitors the environment for landmark (knowledge source). Pilot : low-level path planner and motor controller (controller). Perception subsystem : modules that accept the raw input from multiple sensors and integrate it into a coherent interpretation. 7 / 31

  8. Blackboard Pattern The first blackboard system was the HEARSAY-II speech-recognition system Six- to eight-level hierarchy . Each level abstracts information, blackboard elements represent hypotheses about the interpretation of an utterance. Knowledge sources correspond to tasks as segmenting the raw signal , identifying phonemes, generating word candidates, proposing semantic interpretations,... Knowledge sources organized as a condition part that specifies when it is applicable and an action part that processes relevant blackboard elements and generates new ones. 8 / 31

  9. Blackboard Pattern The Problem In general, the Blackboard pattern tackles problems that do not have a feasible deterministic solution for the transformation of raw data into high-level data structures, such as diagrams, tables or english phrases. 9 / 31

  10. Blackboard Pattern Problem Domains The Blackboard Pattern is applicable to domains of vision, image recognition, speech recognition and surveillance,... They are characterized by a problem that, when decomposed into subproblems, spans several fields of expertise . In many cases no predetermined strategy exists for how the ”partial problem solvers” should combine their knowledge. This is in contrast to functional de- composition, in which several solution steps are arranged so that the sequence of their activation is hard-coded . In some of the above problem domains you may also have to work with uncertain or approximate knowledge. Each transformation step can also generate several alternative solutions . 10 / 31

  11. Blackboard Pattern A complete search of the solution space is not feasible in a reasonable time. Since the domain is immature , you may need to experiment with different algorithms for the same subtask. For this reason, individual modules should be easily exchangeable . Different algorithms solve partial problems. Input, as well as intermediate and final results, have different representations , and the algorithms are implemented according to different paradigms. An algorithm usually works on the results of other algorithms . Uncertain data and approximate solutions are involved, for example the interpretation of a signal is error-prone and there might occur competing alternatives for an interpretation at any stage of the process. Employing disjoint algorithms induces potential parallelism . If possible you should avoid a strictly sequential solution. 11 / 31

  12. Blackboard Pattern Structure and Dynamics Divide your system into a component called Blackboard , a collection of Knowledge Sources , and a Control Component . 12 / 31

  13. Blackboard Pattern The blackboard is the central data store . Elements of the solution space and control data are stored here. The blackboard provides an interface that enables all knowledge sources to read from and write to it. For solutions that are constructed during the problem solving process which are put on the blackboard, we use the terms hypothesis or blackboard entry . Hypotheses rejected later in the process are removed from the blackboard. 13 / 31

  14. Blackboard Pattern Knowledge sources are separate , independent subsystems that solve specific aspects of the overall problem. Together they model the overall problem domain. None of them can solve the task of the system alone. A solution can only be built by integrating the results of several knowledge sources. Knowledge sources do not communicate directly . They read from and write to the blackboard. They therefore have to understand the vocabulary of the blackboard. 14 / 31

  15. Blackboard Pattern The control structure component runs a loop that monitors the changes on the blackboard and decides what action to take next. It schedules knowledge source evaluations and activations according to a knowledge application strategy. The basis for this strategy is the data on the blackboard. The strategy may rely on special control knowledge sources which perform calculations on which control decisions are made (e.g. about progress and termination criteria). 15 / 31

  16. Blackboard Pattern Theoretically, it is possible that the blackboard can reach a state at which no knowledge source is applicable . In this case, the system fails to deliver a result. In pracice , it is more likely that each reasoning step introduces several new hypotheses and that the number of possible next steps increases exponentially . The problem is therefore to restrict the alternatives to be taken rather than to find an applicable knowledge source. 16 / 31

  17. Blackboard Pattern The Blackboard component defines two procedures: inspect and update Knowledge sources call inspect to check the current solutions on the blackboard. update is used to make changes to the data on the Blackboard . The Control component runs a loop that monitors changes on the blackboard and decides what actions to take next using nextSource . 17 / 31

  18. Blackboard Pattern Sequence of Activities : 1. The main loop of the Control component is started. 2. Control calls the nextSource() method to select the next knowledge source. 3. nextSource() first determines which knowledge sources are potential contributors by observing the blackboard . 4. nextSource() invokes the condition part of each candidate knowledge source. 5. The Control component chooses a knowledge source to invoke, and a hypothesis or a set of hypotheses to be worked on. 18 / 31

  19. Blackboard Pattern Implementation 19 / 31

  20. Blackboard Pattern 1. Define the Problem. Specify the domain of the problem and the general fields of knowledge necessary to find a solution. 2. Define the solution space for the problem. 3. Divide the solution process into steps (e.g. how are solutions transformed into higher-level solutions, predicting and verifying hypotheses, ...). 4. Divide the knowledge into specialized knowledge sources with certain subtasks. These subtasks often correspond to areas of specialization. 5. Define the vocabulary of the blackboard. 6. Specify the control of the system. Follows an opportunistic problem-solving strategy that determines which knowledge sources are allowed to make changes to the blackboard. The aim of this strategy is to construct a hypothesis that is acceptable as a result. 7. Implement the knowledge sources (different technologies may apply: actors, rule-based system, neural net,...). 20 / 31

  21. Blackboard Pattern Example Implementation: Radar Defence System 1 1 https://social.technet.microsoft.com/wiki/contents/articles/13461. blackboard-design-pattern-a-practical-c-example-radar-defence-system.aspx 21 / 31

  22. Blackboard Pattern: Radar Defence System Figure: The radar defense system is detecting objects (Planes, Rockets, Birds or Unknown) which fly from the bottom to the top of the screen. 22 / 31

Recommend


More recommend