Ch. 01 - Introduction to Expert Systems (2)
Ch. 01 - Introduction to Expert Systems (2)
Expert Systems
4. Homework
2. Knowledge Representation in Expert Systems
Additional Exercises on Rule-Based Decision-
• Definition of Knowledge Representation
Making
• Key Forms of Knowledge Representation
2
1. Overview of Expert
Systems (ES)
3
Theory
Definition of Expert Systems
What expert systems are: computer systems that
emulate (mimic) decision-making abilities of
human experts in specific domains.
4
Types of Expert Systems
There are several types of Expert Systems (ES), each suited to
specific tasks.
Each type helps emulate expert reasoning in diverse fields.
1. Rule-Based Systems: These use if-then rules to derive conclusions, commonly
2
1
applied in diagnosis and troubleshooting.
5
Components of an Expert System
An Expert System has three main components and these components 1
6
Real-World Applications
1. Healthcare 2. Finance
Diagnose diseases and recommend treatments Assist in loan approvals, fraud detection, and
(e.g., MYCIN for infections). investment advising.
• Troubleshoot issues and provide automated Monitor systems, predict equipment failures, and
support for products. optimize processes.
5. Agriculture 6. Education
Advise on crop management, pest control, and Provide personalized tutoring and assessment,
soil health. offering guidance and feedback tailored to
each student’s needs.
7
Practical Setup
Installing Python and VS Code
8
Practical Setup
Introduction to Python Basics
9
2. Knowledge Representation
in Expert Systems
Knowledge Representation in Expert
Systems organizes information as rules,
facts, and relationships to enable
reasoning, often using formats like if-
then rules, semantic networks, and
frames to mimic expert decision-making.
10
Theory
Definition of Knowledge Representation
11
Theory
Key Forms of Knowledge Representation
1. Rules: The most common format, often using if-then statements to make logical
conclusions. Example: "If a patient has a high fever, then suggest a flu test."
2. Frames: Data structures that represent stereotyped situations, such as objects and their
attributes. Example: A “Car” frame with attributes like “make,” “model,” and “year.”
4. Logic and Probability: Used in more advanced systems to handle uncertainty, such as
Bayesian networks that calculate the likelihood of various outcomes.
12
Theory
Role of the Inference Engine
The inference engine processes this knowledge, applying rules to
known facts to derive conclusions. It helps Expert Systems simulate
human-like reasoning by navigating through organized knowledge to
reach solutions.
13
3. Practical Exercise
Implementing Rule-Based Decision-Making
with if-else Constructs
14
Implementing Rule-Based Decision-Making with if-else
Constructs
Step-by-Step Guide
has_fever = True
has_cough = False
has_body_ache = True
15
Implementing Rule-Based Decision-Making with if-else
Constructs
Step-by-Step Guide
16
Implementing Rule-Based Decision-Making with if-else
Constructs
Step-by-Step Guide
Enhance the System
Add More Conditions: Guide students to add new conditions to expand the system.
For instance, we can add rules for sinus infection and allergies:
17
4. Homework: Additional Exercises on Rule-Based
Decision-Making
Expanding the Diagnosis System
Task: Add new symptoms and diagnoses to the simple expert system from class. Try to include:
Instructions:
Goal: Understand how adding more conditions enhances the system’s ability to make accurate
diagnoses.
18
Thank You
SEK SocheaT
[email protected]