types of frames that define the object distribution (i.e., factual knowledge) are called situational frames.
A frame consists of a frame label and a set of slots, as schematically shown in Figure 1.5. Each slot stores either a set of statements (rules) or another frame that is at the next lower level in the hierarchy than the present level. In this manner, knowledge may be represented at several hierarchical levels in different degrees of detail (i.e., resolution). Generation of a know-ledge base using frames is an evolutionary procedure. First, a generic frame (i.e., a template or a schematic frame) is activated within the knowledge-base computer. This schematic frame will have a default label and a standard num-ber of default sets. Subsequent steps are as follows:
(1) Give a name (label) to the frame.
(2) Name the slots to represent objects contained within the frame.
(3) Open the slots one at a time, and either program the set of action rules or define the lower-level frames as in Step 2.
(4) Repeat Step 3 as many times as required, depending on the required num-ber of levels in the hierarchy.
Example 1.3
Consider a frame representing a manufacturing workcell, as shown in Figure 1.6. Note that the workcell consists of a four-axis robot, milling machine, con-veyor, positioning table, inspection station, and a cell-host computer. They are represented by slots in the cell frame. Each of these slots contains a situational frame. For example, the robot slot stores the robot frame as shown. The cell host also has a data slot, which stores the data files that are needed for the operation of the cell. The programs slot contains an action frame, which carries various procedures needed in the operation of the cell. For example, the programs that are needed for carrying out various cell tasks, through proper coordination of the cell components, monitoring, and control, are carried by the
“Host programs” frame.
Figure 1.5: Schematic representation of a frame
1.3 Knowledg e-ba sed sy s tems
19So far we have considered knowledge representation using frames. Now let us address reasoning or knowledge processing, which is essential for prob-lem solution through frames. Reasoning using frames is done as follows. An external input (say, operator command or a sensor signal) or a program action triggers a frame according to some heuristics. Then, slots in the frame are matched with context (i.e., current data including sensory inputs), which may lead to a possible updating of slot values in the current frame, and to triggering of subsequent frames, once the conditions are matched. Finally the appropriate procedures are executed by the action frames.
To illustrate this procedure, consider once again the manufacturing workcell problem shown in Figure 1.6. During operation of the reasoning mechanism the knowledge-base computer opens a workcell frame. There will be both manual and automatic data inputs to the computer indicating the cell components (e.g., robot, mill). The system matches the actual components with the slots of the frame. If there is no match and if the system has another workcell frame, that frame is matched. In this manner, the closest match is chosen and updated to obtain an exact match for all frames at all levels. Then the action slots of the frame at the highest level (cell level) are activated. This will initiate the cell actions, which in turn trigger the cell-component actions.
Note that in a hierarchical system of this type, the knowledge and actions needed at a higher level are generally more “intelligent” than what are needed at a lower level. But the resolution (i.e., degree of detail) of the information needed at a higher level is lower than at a lower level. For example, the
Figure 1.6: Representation of a manufacturing workcell using frames
1 Introduction to intel lig ent sy s tems and sof t c omputing
20 coordination of a multi-component workcell is an activity that would require far more intelligence than the servo control of an axis of a robot. But the information for the former is needed at a considerably lower bandwidth and resolution than that for the latter.
1.3.4 Blackboard systems
A suitable structure for a knowledge-based system would be a blackboard architecture, which is a cooperative problem-solving architecture. It consists of a global database called a blackboard, several intelligent modules called knowledge sources, and a control unit, which manages the operation of the system. The main feature of the blackboard architecture is the common data region (blackboard), which is shared by and visible to the entire system. In particular, the database is shared by the knowledge sources.
A blackboard-based system has the flexibility of accommodating differ-ent types of knowledge sources, with associated methods of knowledge representation and processing. Generally the knowledge sources are not arranged in a hierarchical manner and will cooperate as equal partners (specialists) in making a knowledge-based decision. The knowledge sources interact with the shared data region under the supervision of the control unit.
When the data in the blackboard change, which corresponds to a change in the context (data condition), the knowledge sources would be triggered in an opportunistic manner and an appropriate decision would be made. That decision could then result in further changes to the blackboard data and subsequent triggering of other knowledge sources. Data may be changed by external means (for example, through the user interface) as well as by knowledge-source actions. External data entering the system go directly to the blackboard. Also, the user interface is linked to the blackboard.
The operation of a blackboard-based system is controlled by its control unit. Specifically, when an updating of data occurs in the blackboard, the control unit will trigger the appropriate knowledge source, which will result in the execution of some reasoning procedure and, possibly, generation of new information. This architecture is generally fast, and particularly suitable for real-time control applications. A blackboard may consist of more than one layer (hierarchical level), each consisting of a subsystem, itself having a blackboard-system architecture. In this manner, a hierarchical structure can be organized for the system. Hybrid systems consisting of subsystems having production and frame-based architectures can be developed as well.
Figure 1.7 shows a blackboard application of controller tuning for a pro-cess plant. A knowledge-based controller is implemented in a hierarchical architecture. The hardware consists of a computer workstation connected through an IEEE-488 parallel bus to a front-end dedicated controller board, which is built around the Intel 8096 microcontroller. This board constitutes the lower layer of the hierarchy where actual real-time control is performed.
The microcontroller computes and sends the control signal to the plant at every sampling interval. At the upper level of the hierarchy is the workstation where the knowledge-based system is implemented. The workstation runs on
1.3 Knowledg e-ba sed sy s tems
21UNIX and has three processes running concurrently. The knowledge-based process oversees and supervises the microcontroller on line. This involves starting and stopping of particular algorithms, calculating algorithm para-meters, analyzing results from identification algorithms, bumpless transfer from one algorithm to another, and reacting correctly to alarms from the monitoring algorithm. The user-interface process provides man–machine interaction for the operator, while the IEEE-488 communication process exchanges information with the microcontroller board.
The knowledge-based system is implemented using a commercial expert system shell (NEXPERT Object), which is a hybrid shell that has rule-based and frame-based knowledge representation. The knowledge-based process is implemented in a blackboard architecture and has six knowledge sources as depicted in Figure 1.7. The manual control knowledge source supervises the manual control operation and is also responsible for gathering open-loop process information like open-loop gain and process noise during manual control. The system identification knowledge source supervises the on–off (relay) control operation, gathers process information such as input–output data, ultimate gain and ultimate period, and carries out experimental modelling. The refined controller tuning knowledge source supervises the fine-tuning of the automatic controller. The plant monitor knowledge source examines plant response information. It contains heuristics to determine the achievable performance of the plant and the controller and decides whether the plant performance is acceptable. The controller and actuation knowledge source oversees the control and actuation tasks for the plant. The scheduler knowledge source takes overall charge of the blackboard. It contains rules Figure 1.7: A blackboard architecture
1 Introduction to intel lig ent sy s tems and sof t c omputing
22 that keep track of changes on the blackboard and decides which knowledge source to activate.
1.3.5 Object-oriented programming
We have noticed that the architecture of a knowledge-based system is char-acterized by the presence of multiple objects that are interlinked. Specifically, one or more distinct knowledge sources together with separate memory re-gions or databases would be present. In this manner, the domain knowledge is isolated from the data. Hence, the data structure of one object may be modified without affecting the knowledge base and the remaining objects of the system. This is different from the traditional programs written in proced-ural languages such as FORTRAN, PASCAL, and C. In a conventional pro-gram, written in a procedural language, the instructions and data structures are integrated together throughout the entire program. Hence even a small change to a data structure could make the program nonfunctional, clearly indicating an advantage of the object-oriented approach.
Many early knowledge-based systems were implemented in a symbolic language like Lisp and Prolog. However, with proper design, there can be a clear separation between the knowledge source and the inference engine, and this has led to the development of many so-called knowledge-based system shells or frameworks. A knowledge-based system shell is just an empty knowledge-based system without any domain knowledge. It provides an inference engine and a knowledge representation structure that can be used as a programming tool for developing knowledge-based systems in different application areas.
The architectures of knowledge-based systems provide a modularity that results from the explicit representation of knowledge as a distinct component of the system, in the form of a knowledge source. The knowledge source can be built incrementally and is relatively easy to expand. Each module or object may be developed separately, and appropriately interconnected, using object-oriented programming, to generate and implement a very com-plex logic system, in a convenient manner. A frame-based architecture with multiple “slots” is particularly amenable to object-oriented programming. In contrast, in conventional algorithmic programming, a complex logic system will result in program codes with huge numbers of nested if-then-else loops.
This causes the program to become difficult to understand and not amenable to maintenance, debugging, or modular development. As a result, object-oriented extensions such as C++ and CLOS to conventional programming languages such as C and LISP have been developed.
1.3.6 Expert systems
Expert systems are a class of production systems, which are typically used in a consultation mode, and provide an alternative to consulting a human expert. They deal with complex knowledge for which real expertise is required, and this knowledge is typically acquired from human experts.
1.3 Knowledg e-ba sed sy s tems
23Consequently, it is unrealistic to expect an expert system for an application where human expertise would not be available. Knowledge-based systems are a general form of expert systems in view of the fact that they are quite general in application and not limited to mimicking the role of a human expert. Furthermore, very often they acquire knowledge from non-human information sources.
An expert system is defined as a software system with high symbolic and descriptive information content, which can simulate the performance of a human expert in a specific field or domain. Since an expert system is a special type of knowledge-based system, it contains the traditional constituents of the latter such as a knowledge base, a database, an inference engine, and a human/machine interface, as indicated in Figure 1.8.
The system interface is used for both development, particularly knowl-edge acquisition, and utilization of the expert system. The knowlknowl-edge base of an expert system embodies human knowledge and understanding, somewhat imitating a human expert in the particular domain of expertise (e.g., special-ist, engineer, scientspecial-ist, doctor, lawyer, financial consultant). The inference engine is a “driver” program that traverses the knowledge base in response to observations and other inputs from the external world, and possibly previous inferences and results from the expert system itself, and will identify one or more possible outcomes or conclusions. This task of making inferences for arriving at solutions will involve “processing” of knowledge. The data structure selected for the specific form of knowledge representation deter-mines the nature of the program that serves as an inference engine. Monitors and keyboards, sensors and transducers, and even output from other com-puter programs including expert systems, usually provide communication links between an expert system and the external world.
An expert system is intended to take the place of a human expert in an advisory capacity. It can be used by a nonexpert to improve problem-solving abilities or by an expert to obtain supporting or corroborating information in her decision-making process. An expert system is typically used in a con-sultation mode. It receives problem descriptions (for example, in a question–
answer form) and provides advice through knowledge-based reasoning.
In addition to a dedicated knowledge acquisition facility, an expert system should be an explanation facility, because it should be able to explain its Figure 1.8: Components of an expert system