A rule-based blackboard kernel system : some principles in design

A rule-based kernel system to support reasoning within the blackboard problem architecture has been developed, with enough generality to support a number of expert system projects. The blackboard allows diverse expert-system modules to cooperate in solving complex design problems, making use of network communication to reduce difficulties with combining programs in various languages and operating systems. Features of the internal structure of the kernel allow it to be adapted readily to new problem areas and to new configurations of expert modules. From our experience we derive some design principles for enabling multi-expert cooperation, and for using expert knowledge effectively. 1. Motivation and Target Applications Engineering design places many diverse demands on expert system software. Some past attempts at using specialized 'empty systems came up against basic limitations in those systems, particularly in their interface to existing analysis software. [9] There were also difficulties in evolving the knowledge base, in accessing hardware sensors, and in making use of history, causality and other databases of information. Thus we must aim to build software that will be expandable and readily adaptable to diverse demands, while containing Al techniques (including inference engine, search strategy, explanation, knowledge acquisition aids, etc.) in a useable form. We also desire portability of the expert system tools. We need software that is concise and readily embedded in new (emerging) computing environments. (The use of Lisp as a basis is detrimental to this goal, given its large size and complexity much of which is unnecessary for expert systems.) Rule-based kernel software has some potential for satisfying some of these requirements, due to the following features: • Modification by adding or changing rules; • Explanation of the kernel itself by applying its own capabilities to its rules; • Implementation with high-level and concise code; • Openness and flexibility of control (if rules suitably designed). We define a kernel to be a small set of rules, enough to provide a framework within which further elaboration and refinement can take place. For OPS5, a system with about 100 to 200 rules is sufficient for this purpose. A kernel is enough to establish representation and control conventions, UNIVERSITY LIBRARIES CARNEGIE-MELLON UNIVE^TY PITTSBURGH, PENNSYLVANIA -^ 1 Motivation and Target Applications and is coded in such a way that extension is easy. For example, it may contain goals whose processing is only done in a 'default way, leaving it up to the user to add rules for whatever further actions are desired. Control and data concepts must be expressed (and documented) clearly, so that the user can readily grasp the existing rules. A kernel has some problem-solving organization as its focus, e.g., backward-chaining diagnostic reasoning, hierarchical planning, or learning by being told. Thus there are a few basic functional capabilities in the kernel, determined by the chosen organization. Along with these are basic user interaction, tracing, explanation, and general support functions. For each of these functions, the basis of the capability is given, and the user is free to expand it according to specific domain demands. The difficult part of building such a kernel is often the selection and design of components and their interfaces, rather than the implementation as rules. We have chosen the blackboard model of problem solving as our kernel's system organization. This model was first discussed by Newell [7], and its most effective application to date was in the Hearsay-II system [1]. Its orientation is towards cooperative problem-solving by a group of programs, termed knowledge sources. It is intended to be analogous to a group of human experts sitting around a table and discussing a problem in which each one can bring some specialized expertise. Each one offers ideas and these can be freely used by each other participant. It is as if each of the various contributions were written on a blackboard that is visible to all. There is usually a referee to ensure that two experts don't speak at once or try to write on the blackboard at once in the same place. In computer implementations of the blackboard model, the blackboard is viewed as a data structure containing a variety of types of information. These will be described in the next section. This data structure can be read by the other modules of the system, and some modules have enough privilege to perform additions and modifications to it. The function of coordinating the various knowledge sources (KSs) is called the focus of attention (FA) (this is similar to the referee in the above analogy). The FA in particular has full write privileges on the blackboard. There is a special module in the system that handles interactions with the user, called the user interface (Ul). In our OPS5 implementation, the Working Memory is the blackboard, and it is partitioned into several areas, to be described in the next section. All rules within the various KSs can perform pattern-matching on the blackboard portion of Working Memory. Modifications to the blackboard are done by asserting goals in the Working Memory that are processed by the FA. The blackboard model appears to have the following advantages: • The addition of KSs without requiring knowledge of other KSs; only FA and Ul need to 1 Motivation and Target Applications know a little about new modules; the system may grow gradually, and is configurable in several ways for experiments; • A clean framework into which domain expertise is easily added, either as sets of expert rules or as entire programs, databases, etc.; • Mechanisms for directing problem solving while taking account of diverse types of expertise; • Means for combining evidence, resolving conflicts, handling asynchronous communications, etc., which are problems that arise in distributed, cooperating programs; • Accommodation to a variety of modules, various languages, various processors, etc., provided they meet minimal interface demands. There are further advantages from implementing the blackboard model as a rule-based system. Production-rule systems are uniquely suited to blackboard types of reasoning, in being patterndirected. RETE matching [4], the internal mechanism of execution, is near optimal in picking out patterns in the blackboard, and within the pattern matcher, parallel processing is a good possibility. The blackboard is symbolic, so there are potentially multiple levels of representation, and diverse types of representations can be accommodated. The current implementation has some features that make its development promising. It may reside on a powerful personal workstation (such as the processors in CMU's planned campus-wide network), i.e., it is small, self-contained, and written so as to be portable to other similar systems. It may utilize graphics and other features, for a powerful user interface. It will build upon the experience gained from some current prototype systems at CMU, in specialized engineering domains, focussing on issues of useability, efficiency, and advanced Al capabilities. Within the Design Research Center at CMU, a variety of problems are encountered that demand the integration inherent to the blackboard model. We have designed our kernel so that these various demands can be serviced. The domains targeted by our design are the following: • Selection of chemical catalysts by chemical engineers, where experts are used in the areas of literature search, thermodynamic calculations, chemical reactions, catalyst properties, and others; • Mobile robots, where the experts are planners, sensor modules, vision, etc.; • Production scheduling, where the experts look at various aspects of a factory schedule; • Design of metal alloys, with a collection of experts analogous to that of the chemical catalyst case; 1 Motivation and Target Applications • Integrated Circuit, layout, where various electrical engineering analysis tools can be brought to bear on a chip design; • Structural design of buildings, which brings together various civH engineering techniques, along with some knowledge-based heuristic modules. The main result of our continuing work will be the refinement of the blackboard kernel design and its implementation as a rule-based system, along with the evidence of its effectiveness over a diverse set of engineering design problems, starting with the above list. We hope to encode some of the expertise in using and adapting the kernel to new domains as rule-based expert modules, and to fit them gracefully into the blackboard system. There are three aspects to the Kernel design: the blackboard data structures, the rules that define the processes on the blackboard, and the messages that define the communications among the various modules. The data structures are the frame-like elements of the OPS Working Memory, and are established by defining the slots within the various element classes. The rules are established as a result of combining the demands of the blackboard model, the data structures and the messages that the rules have to process. Two main sets of rules are in the Kernel: the focus of attention and the user interface. Within the focus of attention, the main Al aspect is the management of tasks within a heuristic search paradigm: the focus maintains the tree of tasks and enough information for backtracking to be done and for progress to be maintained toward the main objective of the system. The messages are also defined as frame structures, with their contents organized into pre-established slots. We distinguish between general and domain-specific data and rules: the former are built into the Kernel, and are processed exclusively by Kernel rules; the latter are built by the user (for some problem domain), and are processed by the user's rules, contained either in the focus of attention or in other rule set