SlideShare a Scribd company logo
1 of 31
Download to read offline
Expert System With Python
Ahmad Hussein
ahmadhussein.ah7@gmail.com
Lecture 1: Introduction
CONTENT OVERVIEW
• What is knowledge?
• Presenting Knowledge
• The main players in the development team
• Uses of Expert Systems
• Prominent Expert Systems
• Basic structure of a rule-base expert system
• Can expert systems make mistakes?
• Comparison of expert systems with conventional systems and human experts
• Forward chaining and backward chaining
• How do we choose between forward and backward chaining?
• Advantages and Disadvantages of rule-base expert systems
What is knowledge?
• Knowledge is a theoretical or practical understanding of a subject or
domain. Knowledge is also the sum of what is currently known, and
apparently knowledge is power. Those who possess knowledge are
called experts.
• Anyone can be considered a domain expert if he/she has deep
knowledge (of both fact and rules) and strong practical experience in
a particular domain. The area of the domain may be limited. In
general, an expert is a skillful person who can do things other people
cannot.
Presenting Knowledge
knowledge representation techniques:
• Rules
• Frames
• Semantic Nets
Presenting Knowledge
Rules:
• The term rule in AI, which is the most commonly used type of
knowledge representation, can be defined as an IF-THEN structure
that release given information or facts in the IF part to some action in
the THEN part. A rule provides some description of how to solve a
problem. Rules are relatively easy to create and understand.
• Any rule consists of two parts: the IF part, called the antecedent
(premise or condition) and the THEN part called consequent
(conclusion or action).
Presenting Knowledge
Rules:
• IF <condition> THEN <action>
• A rule can have multiple antecedents joined by the keywords AND
(conjunction), OR (disjunction) or a combination of both.
IF <condition1> AND <condition2> OR <condition3>
THEN <action>
Presenting Knowledge
Frames:
• Frames are also useful for representing knowledge. As frames allow
nodes to have structures they can be regarded as representations of
knowledge.
• A frame is similar to a record structure and corresponding to the
fields and values are slots and slot fillers.
Presenting Knowledge
Frames:
• A frame for a book is given below:
Slots Fillers
publisher Dana
title Expert Systems
author Ahmad
edition Third
year 2018
pages 600
Presenting Knowledge
Semantic Nets:
• semantic net (or semantic network) is a knowledge representation
technique used for propositional information. So it is also called a
propositional net. Semantic nets convey meaning. Mathematically a
semantic net can be defined as a labelled directed graph.
• Semantic nets consist of:
• Nodes
• Links (edges)
• Link labels
Presenting Knowledge
Semantic Nets:
Example:
Manar
Mammals
Female Persons
Persons
Male Persons
Karim
Subset of Subset of
Member ofMember of
Sister of
The main players in the development team
• There are five members of the expert system development team:
• The domain expert
• The knowledge engineer
• The programmer
• The project manager
• The end user
• The success of their expert system entirely depends on how well the
members work together.
The main players in the development team
Uses of Expert Systems
• Very useful to companies with a high-level of experience and expertise
that cannot easily be transferred to other members.
• Solves problems that would normally be tackled by a medical or other
professional.
• Currently used in fields such as accounting, medicine, process control,
financial service, production, and human resources.
Prominent Expert Systems
• MYCIN – used to diagnose infectious blood diseases and recommend
antibiotics.
• DENDRAL – embedded a chemist’s knowledge of mass spectrometry rules
to use in analysis.
• CADUCEUS – used to analyze blood-borne infectious bacteria
• CLIPS, JESS, Prolog and Pyknow programming languages are all used in
expert systems
• The Age of Empire game uses CLIPS to control its AI
Basic structure of a rule-base expert system
Basic structure of a rule-base expert system
• The knowledge base contains the domain knowledge useful for
problem solving. In a rule-based expert system, the knowledge is
represented as a set of rules. Each rule specifies a relation,
recommendation, directive, strategy or heuristic and has the IF
(condition) THEN (action) structure. When the condition part of a rule
is said to fire and the action part is executed.
• The database includes a set of facts used to match against the IF
(condition) part of rules stored in the knowledge base.
Basic structure of a rule-base expert system
• The inference engine carries out the reasoning whereby the expert
system reaches a solution. It links the rules given in the knowledge
base with the facts provided in the database.
• The explanation facilities enable the user to ask the expert system
how a particular conclusion is reached and why a specific fact is
needed. An expert system must be able to explain its reasoning and
justify its advice, analysis or conclusion.
• The user interface is the means of communication between a user
seeking a solution to problem and an expert system.
Can expert systems make mistakes?
Even a brilliant expert is only a human and thus can make mistakes.
This suggests that an expert system built to perform at a human expert
level also should be allow to make mistakes. But we still trust experts,
even we recognize that their judgements are sometimes wrong.
Likewise, at least in most cases, we can rely on solutions provided by
expert systems, but mistakes are possible and we should be aware of
this.
Comparison of expert systems with conventional systems
and human experts
Comparison of expert systems with conventional systems
and human experts
Forward chaining and backward chaining
• In rule-based expert system, the domain knowledge is represented by
a set of IF-THEN production rules and data is represented by a set of
facts about the current situation. The inference engine compares
each rule stored in the knowledge base with facts contained in the
database. When the IF (condition) part of the rule matches a fact, the
rule is fired and its THEN (action) part is executed.
• The matching of the rule IF parts to the facts produces inference
chains. The inference chain indicates how an expert system applies
the rules to reach conclusion.
Inference engine cycle via a match-fire produce
Forward chaining
• Forward chaining is the data-driven reasoning. The reasoning starts
from the known data and proceeds forward with that data. Each time
only the topmost rule is executed. When fired, the rule adds a new
fact in the database. Any rule can be executed only once. The match-
fire cycle be executed only once. The match-fire cycle stops when no
further rules can be fired.
• forward chaining is a technique for gathering information and the
inferring for it whatever can be inferred.
Forward chaining
• However, in forward chaining, many rules may be executed that have
nothing to do with the established goal.
• therefore, if our goal is to infer only one particular fact, the forward
chaining inference technique would not be efficient.
Backward chaining
• Backward chaining is the goal-driven reasoning. In backward
chaining, an expert system has the goal (a hypothetical solution) and
the inference engine attempts to find the evidence to prove it. First,
the knowledge base is searched to find rules that might have the
desired solution. Such rules must have the goal in their THEN (action)
parts. If such a rule is found and its IF (condition) part matches data in
the database, then the rule is fired and the goal is proved. However,
this is rarely the case.
Backward chaining
• Thus the inference engine puts side rule it is working with (the rule is
said stack) and sets up a new goal, a subgoal, to prove the IF part of
this rule. Then the knowledge base is searched again for rules that
can prove the subgoal. The inference engine repeats the process of
stacking the rules until no rules are found in the knowledge base to
prove the current subgoal.
How do we choose between forward and
backward chaining?
• If an expert first needs to gather some information and then tries to
infer from it whatever can be inferred, choose the forward chaining
inference engine.
• However, if your expert begins with a hypothetical solution and then
attempts to find facts to prove it, choose the backward chaining
inference engine.
Advantages of rule-base expert systems
• Natural knowledge representation. An expert usually explains the
problem-solving procedure with such expressions as this: “In such-
and-such situation, I do so-and-so”. These expressions can be
represented quite naturally as IF-THEN production rules.
• Uniform structure. Production rules have the uniform IF-THEN
structure. Each rule is an independent piece of knowledge. The very
syntax of production rules enables them to be self-documented.
Advantages of rule-base expert systems
• Separation of knowledge from its processing. The structure of rule-
base expert system provides an effective separation of the knowledge
base from the inference engine. This makes it possible to develop
different applications using the same expert system shell.
• Dealing with incomplete and uncertain knowledge. Most rule-based
expert systems are capable of representing and reasoning with
incomplete and uncertain knowledge.
Disadvantages of rule-based expert systems
• Opaque relations between rules. Although the individual production
rules are relatively simple and self-documented, their logical
interactions within the large set of rules may be opaque. Rule-base
systems make it difficult to observe how individual rules serve the
overall strategy.
• Ineffective search strategy. The inference engine applies an
exhaustive search through all the production rules during each cycle.
Expert systems with a large set of rules (over 100 rules) can be slow,
and thus large rules-based systems can be unsuitable for real-time
applications.
Disadvantages of rule-based expert systems
• Inability to learn. In general, rule-based expert systems do not have
an ability to learn from the experience. Unlike a human expert, who
knows when to “break the rules”, an expert system can’t
automatically modify its knowledge base, or adjust existing rules or
add new ones. The knowledge engineer is still responsible for revising
and maintaining the system.

More Related Content

What's hot

Machine Learning - Splitting Datasets
Machine Learning - Splitting DatasetsMachine Learning - Splitting Datasets
Machine Learning - Splitting DatasetsAndrew Ferlitsch
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representationSajan Sahu
 
Propositional logic
Propositional logicPropositional logic
Propositional logicRushdi Shams
 
Introduction To Mycin Expert System
Introduction To Mycin Expert SystemIntroduction To Mycin Expert System
Introduction To Mycin Expert SystemNipun Jaswal
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rulesHarini Balamurugan
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI Bharat Bhushan
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemMohammad Imam Hossain
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic Junya Tanaka
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Yasir Khan
 
AI Programming language (LISP)
AI Programming language (LISP)AI Programming language (LISP)
AI Programming language (LISP)SURBHI SAROHA
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AIVishal Singh
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representationLikan Patra
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishHemantha Kulathilake
 

What's hot (20)

Machine Learning - Splitting Datasets
Machine Learning - Splitting DatasetsMachine Learning - Splitting Datasets
Machine Learning - Splitting Datasets
 
AI: AI & Searching
AI: AI & SearchingAI: AI & Searching
AI: AI & Searching
 
machine learning
machine learningmachine learning
machine learning
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
 
Machine learning
Machine learningMachine learning
Machine learning
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Introduction To Mycin Expert System
Introduction To Mycin Expert SystemIntroduction To Mycin Expert System
Introduction To Mycin Expert System
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rules
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Lecture 6 expert systems
Lecture 6   expert systemsLecture 6   expert systems
Lecture 6 expert systems
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence
 
AI Programming language (LISP)
AI Programming language (LISP)AI Programming language (LISP)
AI Programming language (LISP)
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
Explainable AI
Explainable AIExplainable AI
Explainable AI
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for English
 
AIML_Unit1.pptx
AIML_Unit1.pptxAIML_Unit1.pptx
AIML_Unit1.pptx
 

Similar to Expert System With Python -1

Similar to Expert System With Python -1 (20)

Lec 4 expert systems
Lec 4  expert systemsLec 4  expert systems
Lec 4 expert systems
 
Expert system
Expert systemExpert system
Expert system
 
Artificial Intelligence for Automated Decision Support Project
Artificial Intelligence for Automated Decision Support ProjectArtificial Intelligence for Automated Decision Support Project
Artificial Intelligence for Automated Decision Support Project
 
Artificial Intelligence Approaches
Artificial Intelligence  ApproachesArtificial Intelligence  Approaches
Artificial Intelligence Approaches
 
AI System.pptx
AI System.pptxAI System.pptx
AI System.pptx
 
Knowledge Representation in AI.pptx
Knowledge Representation in AI.pptxKnowledge Representation in AI.pptx
Knowledge Representation in AI.pptx
 
Chapter 4.ppt mizan Tepi university student population
Chapter 4.ppt mizan Tepi university student populationChapter 4.ppt mizan Tepi university student population
Chapter 4.ppt mizan Tepi university student population
 
Expert system
Expert systemExpert system
Expert system
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Expert system
Expert systemExpert system
Expert system
 
Expert System Development.pptx
Expert System Development.pptxExpert System Development.pptx
Expert System Development.pptx
 
Introduction to Expert Systems {Artificial Intelligence}
Introduction to Expert Systems {Artificial Intelligence}Introduction to Expert Systems {Artificial Intelligence}
Introduction to Expert Systems {Artificial Intelligence}
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
 
Expert system (unit 1 &amp; 2)
Expert system (unit 1 &amp; 2)Expert system (unit 1 &amp; 2)
Expert system (unit 1 &amp; 2)
 
SC1.pptx
SC1.pptxSC1.pptx
SC1.pptx
 
Lecture_8.ppt
Lecture_8.pptLecture_8.ppt
Lecture_8.ppt
 
Sh ch01
Sh ch01Sh ch01
Sh ch01
 
Module -3 expert system.pptx
Module -3 expert system.pptxModule -3 expert system.pptx
Module -3 expert system.pptx
 
Expert system
Expert system Expert system
Expert system
 
Ai lecture 02(unit-02)
Ai lecture  02(unit-02) Ai lecture  02(unit-02)
Ai lecture 02(unit-02)
 

More from Ahmad Hussein

Knowledge Representation Methods
Knowledge Representation MethodsKnowledge Representation Methods
Knowledge Representation MethodsAhmad Hussein
 
Knowledge-Base Systems Homework - 2019
Knowledge-Base Systems Homework - 2019Knowledge-Base Systems Homework - 2019
Knowledge-Base Systems Homework - 2019Ahmad Hussein
 
Knowledge based systems homework
Knowledge based systems homeworkKnowledge based systems homework
Knowledge based systems homeworkAhmad Hussein
 
Python introduction 2
Python introduction 2Python introduction 2
Python introduction 2Ahmad Hussein
 
Python introduction 1
Python introduction 1  Python introduction 1
Python introduction 1 Ahmad Hussein
 

More from Ahmad Hussein (6)

Knowledge Representation Methods
Knowledge Representation MethodsKnowledge Representation Methods
Knowledge Representation Methods
 
Knowledge-Base Systems Homework - 2019
Knowledge-Base Systems Homework - 2019Knowledge-Base Systems Homework - 2019
Knowledge-Base Systems Homework - 2019
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Knowledge based systems homework
Knowledge based systems homeworkKnowledge based systems homework
Knowledge based systems homework
 
Python introduction 2
Python introduction 2Python introduction 2
Python introduction 2
 
Python introduction 1
Python introduction 1  Python introduction 1
Python introduction 1
 

Recently uploaded

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 

Recently uploaded (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 

Expert System With Python -1

  • 1. Expert System With Python Ahmad Hussein ahmadhussein.ah7@gmail.com Lecture 1: Introduction
  • 2. CONTENT OVERVIEW • What is knowledge? • Presenting Knowledge • The main players in the development team • Uses of Expert Systems • Prominent Expert Systems • Basic structure of a rule-base expert system • Can expert systems make mistakes? • Comparison of expert systems with conventional systems and human experts • Forward chaining and backward chaining • How do we choose between forward and backward chaining? • Advantages and Disadvantages of rule-base expert systems
  • 3. What is knowledge? • Knowledge is a theoretical or practical understanding of a subject or domain. Knowledge is also the sum of what is currently known, and apparently knowledge is power. Those who possess knowledge are called experts. • Anyone can be considered a domain expert if he/she has deep knowledge (of both fact and rules) and strong practical experience in a particular domain. The area of the domain may be limited. In general, an expert is a skillful person who can do things other people cannot.
  • 4. Presenting Knowledge knowledge representation techniques: • Rules • Frames • Semantic Nets
  • 5. Presenting Knowledge Rules: • The term rule in AI, which is the most commonly used type of knowledge representation, can be defined as an IF-THEN structure that release given information or facts in the IF part to some action in the THEN part. A rule provides some description of how to solve a problem. Rules are relatively easy to create and understand. • Any rule consists of two parts: the IF part, called the antecedent (premise or condition) and the THEN part called consequent (conclusion or action).
  • 6. Presenting Knowledge Rules: • IF <condition> THEN <action> • A rule can have multiple antecedents joined by the keywords AND (conjunction), OR (disjunction) or a combination of both. IF <condition1> AND <condition2> OR <condition3> THEN <action>
  • 7. Presenting Knowledge Frames: • Frames are also useful for representing knowledge. As frames allow nodes to have structures they can be regarded as representations of knowledge. • A frame is similar to a record structure and corresponding to the fields and values are slots and slot fillers.
  • 8. Presenting Knowledge Frames: • A frame for a book is given below: Slots Fillers publisher Dana title Expert Systems author Ahmad edition Third year 2018 pages 600
  • 9. Presenting Knowledge Semantic Nets: • semantic net (or semantic network) is a knowledge representation technique used for propositional information. So it is also called a propositional net. Semantic nets convey meaning. Mathematically a semantic net can be defined as a labelled directed graph. • Semantic nets consist of: • Nodes • Links (edges) • Link labels
  • 10. Presenting Knowledge Semantic Nets: Example: Manar Mammals Female Persons Persons Male Persons Karim Subset of Subset of Member ofMember of Sister of
  • 11. The main players in the development team • There are five members of the expert system development team: • The domain expert • The knowledge engineer • The programmer • The project manager • The end user • The success of their expert system entirely depends on how well the members work together.
  • 12. The main players in the development team
  • 13. Uses of Expert Systems • Very useful to companies with a high-level of experience and expertise that cannot easily be transferred to other members. • Solves problems that would normally be tackled by a medical or other professional. • Currently used in fields such as accounting, medicine, process control, financial service, production, and human resources.
  • 14. Prominent Expert Systems • MYCIN – used to diagnose infectious blood diseases and recommend antibiotics. • DENDRAL – embedded a chemist’s knowledge of mass spectrometry rules to use in analysis. • CADUCEUS – used to analyze blood-borne infectious bacteria • CLIPS, JESS, Prolog and Pyknow programming languages are all used in expert systems • The Age of Empire game uses CLIPS to control its AI
  • 15. Basic structure of a rule-base expert system
  • 16. Basic structure of a rule-base expert system • The knowledge base contains the domain knowledge useful for problem solving. In a rule-based expert system, the knowledge is represented as a set of rules. Each rule specifies a relation, recommendation, directive, strategy or heuristic and has the IF (condition) THEN (action) structure. When the condition part of a rule is said to fire and the action part is executed. • The database includes a set of facts used to match against the IF (condition) part of rules stored in the knowledge base.
  • 17. Basic structure of a rule-base expert system • The inference engine carries out the reasoning whereby the expert system reaches a solution. It links the rules given in the knowledge base with the facts provided in the database. • The explanation facilities enable the user to ask the expert system how a particular conclusion is reached and why a specific fact is needed. An expert system must be able to explain its reasoning and justify its advice, analysis or conclusion. • The user interface is the means of communication between a user seeking a solution to problem and an expert system.
  • 18. Can expert systems make mistakes? Even a brilliant expert is only a human and thus can make mistakes. This suggests that an expert system built to perform at a human expert level also should be allow to make mistakes. But we still trust experts, even we recognize that their judgements are sometimes wrong. Likewise, at least in most cases, we can rely on solutions provided by expert systems, but mistakes are possible and we should be aware of this.
  • 19. Comparison of expert systems with conventional systems and human experts
  • 20. Comparison of expert systems with conventional systems and human experts
  • 21. Forward chaining and backward chaining • In rule-based expert system, the domain knowledge is represented by a set of IF-THEN production rules and data is represented by a set of facts about the current situation. The inference engine compares each rule stored in the knowledge base with facts contained in the database. When the IF (condition) part of the rule matches a fact, the rule is fired and its THEN (action) part is executed. • The matching of the rule IF parts to the facts produces inference chains. The inference chain indicates how an expert system applies the rules to reach conclusion.
  • 22. Inference engine cycle via a match-fire produce
  • 23. Forward chaining • Forward chaining is the data-driven reasoning. The reasoning starts from the known data and proceeds forward with that data. Each time only the topmost rule is executed. When fired, the rule adds a new fact in the database. Any rule can be executed only once. The match- fire cycle be executed only once. The match-fire cycle stops when no further rules can be fired. • forward chaining is a technique for gathering information and the inferring for it whatever can be inferred.
  • 24. Forward chaining • However, in forward chaining, many rules may be executed that have nothing to do with the established goal. • therefore, if our goal is to infer only one particular fact, the forward chaining inference technique would not be efficient.
  • 25. Backward chaining • Backward chaining is the goal-driven reasoning. In backward chaining, an expert system has the goal (a hypothetical solution) and the inference engine attempts to find the evidence to prove it. First, the knowledge base is searched to find rules that might have the desired solution. Such rules must have the goal in their THEN (action) parts. If such a rule is found and its IF (condition) part matches data in the database, then the rule is fired and the goal is proved. However, this is rarely the case.
  • 26. Backward chaining • Thus the inference engine puts side rule it is working with (the rule is said stack) and sets up a new goal, a subgoal, to prove the IF part of this rule. Then the knowledge base is searched again for rules that can prove the subgoal. The inference engine repeats the process of stacking the rules until no rules are found in the knowledge base to prove the current subgoal.
  • 27. How do we choose between forward and backward chaining? • If an expert first needs to gather some information and then tries to infer from it whatever can be inferred, choose the forward chaining inference engine. • However, if your expert begins with a hypothetical solution and then attempts to find facts to prove it, choose the backward chaining inference engine.
  • 28. Advantages of rule-base expert systems • Natural knowledge representation. An expert usually explains the problem-solving procedure with such expressions as this: “In such- and-such situation, I do so-and-so”. These expressions can be represented quite naturally as IF-THEN production rules. • Uniform structure. Production rules have the uniform IF-THEN structure. Each rule is an independent piece of knowledge. The very syntax of production rules enables them to be self-documented.
  • 29. Advantages of rule-base expert systems • Separation of knowledge from its processing. The structure of rule- base expert system provides an effective separation of the knowledge base from the inference engine. This makes it possible to develop different applications using the same expert system shell. • Dealing with incomplete and uncertain knowledge. Most rule-based expert systems are capable of representing and reasoning with incomplete and uncertain knowledge.
  • 30. Disadvantages of rule-based expert systems • Opaque relations between rules. Although the individual production rules are relatively simple and self-documented, their logical interactions within the large set of rules may be opaque. Rule-base systems make it difficult to observe how individual rules serve the overall strategy. • Ineffective search strategy. The inference engine applies an exhaustive search through all the production rules during each cycle. Expert systems with a large set of rules (over 100 rules) can be slow, and thus large rules-based systems can be unsuitable for real-time applications.
  • 31. Disadvantages of rule-based expert systems • Inability to learn. In general, rule-based expert systems do not have an ability to learn from the experience. Unlike a human expert, who knows when to “break the rules”, an expert system can’t automatically modify its knowledge base, or adjust existing rules or add new ones. The knowledge engineer is still responsible for revising and maintaining the system.