Many real problems cannot be solved by the simple application of a single expert system technique. Problems often require multiple knowledge representation techniques as well as conventional programming techniques.
The example used in this chapter is the same room furniture placement used in the chapter on forward chaining. While the application was developed with the pure Oops system, a much more elegant solution can be implemented by integrating frames, Oops, and Prolog. In particular, there is a lot of knowledge about the types of furniture that could be better stored in a frame system. Also the awkward input and output sections of the system could be better written in Prolog.
7.1 Foops (Frames and Oops)
In the frame system as it is currently written, the frames are the data. Particular instances of a frame, such as person, are just additional frames. For use in the expert system it is cleaner to distinguish between frame definitions and instances of frames.
To implement the instances, we need both a data structure and predicates to manipulate the data structure. An instance of a frame looks a lot like a frame, and will be stored in the relation frinst/4. The four arguments will be:
• the class name;
[ako-woman, hair-brown, hobby-rugby],
[ako-man, hair-blond, hobby-go],
• delf — delete a frinst, or attribute values for a frinst;
• printf — print information about a frinst.
|Chapter 7 - Integration|