0% found this document useful (0 votes)
5 views

Ch. 01 - Introduction to Expert Systems (2)

The document provides an introduction to Expert Systems (ES), detailing their definition, types, components, and real-world applications in fields like healthcare and finance. It also covers knowledge representation, including key forms such as rules and semantic networks, and the role of the inference engine in simulating expert reasoning. Additionally, it includes practical exercises and homework for implementing rule-based decision-making in Python.

Uploaded by

Yuddho Seavminh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Ch. 01 - Introduction to Expert Systems (2)

The document provides an introduction to Expert Systems (ES), detailing their definition, types, components, and real-world applications in fields like healthcare and finance. It also covers knowledge representation, including key forms such as rules and semantic networks, and the role of the inference engine in simulating expert reasoning. Additionally, it includes practical exercises and homework for implementing rule-based decision-making in Python.

Uploaded by

Yuddho Seavminh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Introduction to

Expert Systems

By: SEK SOCHEAT


Advisor to DCS and Lecturer
Mobile: 017 879 967
Expert System Email: [email protected]
2024 – 2025 [email protected]
Y3 – DCS – NU
Table of Contents:
1. Overview of Expert Systems (ES)
• Definition of Expert Systems
• Types of Expert Systems 3. Practical Exercise
• Components of an Expert System Implementing Rule-Based Decision-Making with
• Real-World Applications if-else Constructs
• Practical Setup

4. Homework
2. Knowledge Representation in Expert Systems
Additional Exercises on Rule-Based Decision-
• Definition of Knowledge Representation
Making
• Key Forms of Knowledge Representation

• Role of the Inference Engine

2
1. Overview of Expert
Systems (ES)

Expert Systems (ES) are AI systems


that mimic expert decision-making
using a knowledge base and inference
engine, often applied in fields like
healthcare and finance.

3
Theory
Definition of Expert Systems
What expert systems are: computer systems that
emulate (mimic) decision-making abilities of
human experts in specific domains.

Example: Highlight expert systems in healthcare


(diagnosis systems), finance (loan approval), and
customer support (troubleshooting).

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.

2. Case-Based Systems: They solve new problems by comparing them to past


cases, often used in legal and medical fields.

3. Model-Based Systems: These systems use mathematical or logical models


to simulate complex processes, ideal for engineering and scientific
applications.

4. Hybrid Systems: Combining two or more types, these systems offer


flexibility, especially in environments needing both rules and case
comparisons, like customer support.
3 4

5
Components of an Expert System
An Expert System has three main components and these components 1

work together to simulate expert decision-making.

1. Knowledge Base: Stores expert knowledge as rules and


facts.
2

2. Inference Engine: Applies rules to known facts to draw


conclusions.

3. User Interface: Allows users to interact with the system,


3
providing inputs and receiving insights.

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.

3. Customer Support 4. Manufacturing

• 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

• Guided Setup: Walk through the installation of


Python and VS Code on student devices.

• Setup Verification: Verify installations by


running a simple print("Hello, Expert Systems!")
in the VS Code terminal.

8
Practical Setup
Introduction to Python Basics

• Variables and Data Types: Show how to


declare variables (e.g., integers, strings, lists).

• Control Structures: Cover if statements and


loops (for, while).

• Interactive Exercise: Create a simple program


that assigns values to variables and performs
calculations (e.g., basic math operations).

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

Knowledge Representation in Expert Systems


is how information is structured to simulate
expert reasoning.

This involves organizing rules, facts, and


relationships to make decisions or provide
solutions.

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.”

3. Semantic Networks: Graph-based representations that show relationships between


concepts, helpful for visualizing hierarchies or dependencies. Example: Representing
symptoms and their associated diseases.

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.

This structured approach enables Expert Systems to solve complex


problems by logically interpreting stored knowledge, enhancing their
effectiveness in decision-making.

13
3. Practical Exercise
Implementing Rule-Based Decision-Making
with if-else Constructs

Objective: Create a basic expert system


in Python to diagnose minor health
issues based on symptoms.

14
Implementing Rule-Based Decision-Making with if-else
Constructs
Step-by-Step Guide

1. Define Symptoms as Variables

Defining symptoms as boolean variables (True or False) to indicate the presence or


absence of each symptom.

has_fever = True

has_cough = False

has_body_ache = True

15
Implementing Rule-Based Decision-Making with if-else
Constructs
Step-by-Step Guide

2. Implement Basic if-else Logic


Write a simple series of if-else statements to check for symptom combinations and
diagnose a health condition.

if has_fever and has_body_ache:


print("Diagnosis: You might have the flu.")
elif has_cough:
print("Diagnosis: You might have a common cold.")
else:
print("Diagnosis: Symptoms not specific enough.")

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:

• New Symptoms: like sore throat, runny nose, headache.

• New Diagnoses: such as “strep throat” or “common allergies.”

Instructions:

• Update your system to include these symptoms.

• Create at least two new rules to handle these added symptoms.

Goal: Understand how adding more conditions enhances the system’s ability to make accurate
diagnoses.

18
Thank You
SEK SocheaT
[email protected]

You might also like