Building Expert Systems in Prolog



1 Introduction
 1.1 Expert Systems
 1.2 Expert System Features
    Goal-Driven Reasoning
    Data Driven Reasoning
    Data Representation
    User Interface
    1.3 Sample Applications
 1.4 Prolog
 1.5 Assumptions

2 Using Prolog's Inference Engine   
 2.1 The Bird Identification System
    Rule formats
    Rules about birds
    Rules for hierarchical relationships
    Rules for other relationships
 2.2 User Interface
    Attribute Value pairs
    Asking the user
    Remembering the answer
    Multi-valued answers
    Menus for the user
    Other enhancements
 2.3 A Simple Shell
    Command loop
    A tool for non-programmers
 2.4 Summary

3 Backward Chaining with Uncertainty
 3.1 Certainty Factors
    An Example
    Rule Uncertainty
    User Uncertainty
    Combining Certainties
    Properties of Certainty Factors
 3.2 MYCINs Certainty Factors
    Determining Premise CF
    Combining Premise CF and Conclusion CF
    Premise Threshold CF
    Combining CFs
 3.3 Rule Format
 3.4 The Inference Engine
    Working Storage
    Find a Value for an Attribute
    Attribute Value Already Known
    Ask User for Attribute Value
    Deduce Attribute Value from Rules
 3.5 Making the Shell
    Starting the Inference
 3.6 English-like Rules

4 Explanation
    Value of Explanations to the User
    Value of Explanations to the Developer
    Types of Explanation
 4.1 Explanation in Clam
    How Explanations
    Why Questions
 4.2 Native Prolog Systems

5 Forward Chaining
 5.1 Production Systems
 5.2 Using Oops
 5.3 Implementation
 5.4 Explanations for Oops
 5.5 Enhancements
 5.6 Rule Selection
    Generating the conflict set
    Time stamps
 5.7 LEX
    Changes in the Rules
    Implementing LEX
 5.8 MEA

6 Frames
 6.1 The Code
 6.2 Data Structure
 6.3 The Manipulation Predicates
 6.4 Using Frames
 6.5 Summary
7 Integration
 7.1 Foops (Frames and Oops)
    Rules for frinsts
    Adding Prolog to Foops
 7.2 Room Configuration
    Furniture frames
    Frame Demons
    Initial Data
    Input Data
    The Rules
    Output Data
 7.3 A Sample Run
 7.4 Summary

8 Performance
 8.1 Backward Chaining Indexes
 8.2 Rete Match Algorithm
    Network Nodes
    Network Propagation
    Example of Network Propagation
    Performance Improvements
 8.3 The Rete Graph Data Structures
 8.4 Propagating Tokens
 8.5 The Rule Compiler
 8.6 Integration with Foops
 8.7 Design Tradeoffs

9 User Interface
 9.1 Object Oriented Window Interface
 9.2 Developer's Interface to Windows
 9.3 High-Level Window Implementation
    Message Passing
 9.4 Low-Level Window Implementation

10 Two Hybrids
 10.1 CVGEN
 10.2 The Knowledge Base
    Rule for parameters
    Rules for derived information
    Questions for the user
    Default rules
    Rules for edits
    Static information
 10.3 Inference Engine
 10.4 Explanations
 10.5 Environment
 10.6 AIJMP
 10.7 Summary

11 Prototyping
 11.1 The Problem
 11.2 The Sales Advisor Knowledge Base
    Objectives - Benefits - Features
    Situation Analysis
    Competitive Analysis
    Miscellaneous Advice
    User Queries
 11.3 The Inference Engine
 11.4 User Interface
 11.5 Summary

12 Rubik's Cube
 12.1 The Problem
 12.2 The Cube
 12.3 Rotation
 12.4 High Level Rules
 12.5 Improving the State
 12.6 The Search
 12.7 More Heuristics
 12.8 User Interface
 12.9 On the Limits of Machines

Appendix - Full Source Code
 Taxes (Bonus Code)

Published by:

Amzi! inc.
5861 Greentree Road
Lebanon, OH 45036 U.S.A.

phone +1-513-425-8050
fax +1-513-425-8025

Book Edition Copyright ©1989 by Springer-Verlag.
On-line Edition Copyright ©2000 by Amzi! inc. All Rights Reserved.

This document ("Work") is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. You may use and distribute copies of this Work provided each copy of the Work is a true and complete copy, including all copyright and trademark notices, and each copy is accompanied by a copy of this notice. You may not distribute copies of this Work for profit either on a standalone basis or included as part of your own product or work without written permission from Amzi! You may not charge any fees for copies of this work including media or download fees. You may not include this Work as part of your own works. You may not rename, edit or create any derivative works from this Work. Contact Amzi! for additional licensing arrangements.

Amzi! is a registered trademark and Logic Server, Active Prolog Tutor, Adventure in Prolog and the flying squirrel logo are trademarks of Amzi! inc.

Last Updated: August 2000