View on GitHub

Notes

reference notes

Outline

Introduction

1. Knowledge Base Overview

2. Representational Scheme vs. Medium

3. Representational Schemes

a. Logical Schemes

b. Network Schemes

c. Structured Schemes

d. Procedural Schemes

Formal Logic

1. Logical Representation Scheme

2. Advantages

3. Disadvantages

Network Representation Schemes

Semantic Networks

1. Overview

2. Elements of Semantic Networks

3. Example of a Bird’s Property in Semantic Network

feathers bird
small bluebird blue
flies
is_a
size
has_covering has_property
has_color

4. Creating a Semantic Network

Example Description:

LAB
DOOR
ROOM
COMPUTERS
PRINTERS LASER_PRINTER
has_a
is_a
has
is_a
in

5. Inheritance in Semantic Networks

Example of Inheritance:

Animal
Breathe
Move
Fly
Bird
Wings
Feathers
Canary Sing
is Yellow
can
can
has
has
can
can

Exception Handling in Inheritance

6. Advantages and Disadvantages

Advantages

Disadvantages

Conceptual Graphs

1. Introduction

2. Conceptual Nets for “OR”

Apple
Green
Red
Color

3. Conceptual Nets for “Where do Rivers Flow to?”

River
flow_to
Sea
Lake
Marsh

4. Conceptual Net for “AND”

PANDA
WHITE
BLACK
Color
Color

5. Advantages and Potential

Advantages

Conceptual graphs provide a versatile way to represent complex relationships, making them suitable for a variety of scenarios and knowledge domains.

Structured Representations Schemes

Frames

1. Overview

2. Example Frame

BOOK
Title : Qualitative Reasoning
Author : Ken D. Forbus
Publisher : Prentice-Hall
Year : 2000

3. Conversion from Frames to Semantic Nets

book
author

Forbus QPT

novel
book
publisher
encyclopedia
editor
has_a has_a
is_a is_a
has_a
has_a
is_a
is_a

4. Example Frame Descriptions

Hotel Room
specialisationof:room
location: the hotel
contains: bed, chair & phone
HotelPhone
specialisationof:phone
use: calling room service
billing: through room

Hotel Bed superclass:bed size: king contains: mattress,pillow, etc.

5. Analysis of Frames

6. Advantages and Disadvantages

Advantages

Disadvantages

Scripts

1. Overview

2. Components in Scripts

Entry-conditions

Results

Props

Roles

Scenes/Episodes

Production Rules

1. Overview

2. Nature of Production Rules

3. Structure of a Production Rule

4. Logical Operators in Production Rules

5. Mathematical Operators in Production Rules

6. Types of Rules

Examples:

7. Advantages and Disadvantages

Advantages:

Disadvantages:

8. Production System Model

9. “Firing” of Rules (Imortant)

Reasoning Methods in Production

Rule Systems

The design of the reference engine plays a crucial role in rule-based expert systems. Two reasoning methods are often used in rule-based expert systems:

Forward Chaining

Example of Forward Chaining

Given a rule-based expert system with 4 rules:

  1. If A and C Then F
  2. If A and E Then G
  3. If B Then E
  4. If G Then D

Question: Prove If A and B are true, then D is true.

Backward Chaining

Example of Backward Chaining

Rules:

  1. If A and C Then E
  2. If D and C Then F
  3. If B and E Then F
  4. If B Then C
  5. If F Then G

Facts: A is true, B is true

Goal: Prove G

Exercise: Forward Chaining

Question 1 (a): Run a forward chaining system to determine the health state of a person who eats veal.

Answer: The person is unhealthy. Rules 8, 1, 7 fired.

Question 1 (b): What if you are Catholic, eat poultry, and work 4 hours today? Advise the person on his health situation. Justify your answer.

Answer: The person is healthy. Rules 9, 4, 2, 6 fired.

Question 2: Given rules with conditions and a goal, determine the outcome of the system.

Answer: The system will return “W” as the goal, firing rules 3, 1, 4.

Question 3: Given rules and facts, apply forward chaining to predict the outcome.

Answer: The outcome depends on the specific rules and facts provided.

Exercise: Backward Chaining

Question: Explain how backward chaining works to prove a goal, using examples.

Answer:

Example: For the goal G in Rule 5, backward chaining checks rules 4, 2, 3, 1, and backtracks when needed, proving G through the satisfaction of sub-goals.

Conflict Resolution

Conflict in Rule Systems

In rule-based systems, conflicts can arise when multiple rules match the current state of the system. Let’s consider an example:

Rule 1:
IF the traffic-light is green THEN the action is go

Rule 2:
IF the traffic-light is red THEN the action is stop

Rule 3:
IF the traffic-light is red THEN the action is go

In this case, both Rule 2 and Rule 3 have the same IF-part, leading to a conflict when the traffic light is red. We need a way to resolve such conflicts and decide which rule to execute.

Methods for Conflict Resolution

  1. Fire Rule with Highest Priority:
    • Assign priorities to rules, and the one with the highest priority is selected for execution.
  2. Longest Matching Strategy:
    • Choose the rule with the longest matching sequence in its IF-part. This strategy provides more specificity.
  3. Most Recently Entered Data:
    • Select the rule based on the most recently entered or updated data. This approach considers the freshness of information.

Example of Conflict Resolution

Suppose we have rules:

Suppose A, B, and E are true. Which rule should the system choose?

Importance of Conflict Resolution

Conflict resolution is crucial for ensuring the proper functioning of rule-based systems. It helps in making decisions when there are multiple rules that could potentially be applied to a given situation. The choice of conflict resolution method depends on the specific requirements and characteristics of the application.