SlideShare ist ein Scribd-Unternehmen logo
1 von 14
RULED-BASED EXPERT SYSTEM
(FORWARD CHAINING AND BACKWARD CHAINING)
-Amit Singh Dahal
-g5638545
FIRST STEP: WRITE THE RULES BASED ON
DIAGRAMS:
 R1: IF the animal has hair
THEN it is a mammal
 R2: IF the animal gives milk
THEN it is a mammal
 R3: IF the animal has feathers
THEN it is a bird
 R4: IF the animal flies
the animal lays eggs
THEN it is a bird
 R5: IF the animal is a mammal
the animal eats meat
THEN it is a carnivore
CONTD…
 R6: IF the animal is a mammal
the animal has pointed teeth
the animal has claws
the animal's eyes point forward
THEN it is a carnivore
 R7: IF the animal is a mammal
the animal has hooves
THEN it is an ungulate
 R8: IF the animal is a mammal
the animal chews cud
THEN it is an ungulate AND
it is even-toed
CONTD…
 R9: IF the animal is a carnivore
the animal has a tawny colour
the animal has dark spots
THEN it is a cheetah
 R10: IF the animal is a carnivore
the animal has a tawny colour
the animal has black stripes
THEN it is a tiger
 R11: IF the animal is an ungulate
the animal has long legs
the animal has a long neck
the animal has dark spot
THEN it is a giraffe
 R12: IF the animal is an ungulate
the animal has a white colour
the animal has black stripes
THEN it is a zebra
CONTD…
 R13 :IF the animal is a bird
the animal does not fly
the animal has long legs
the animal has a long neck
the animal is black and white
THEN it is an ostrich
 R14 :IF the animal is a bird
the animal does not fly
the animal swims
the animal is black and white
THEN it is a penguin
 R15 :IF the animal is a bird
the animal is a good flier
THEN it is an albatross
FORWARD CHAINING
 Facts in the working memory:
-the animal gives milk
-the animal chew cuds
-the animal has long legs
-the animal has a long neck
-the animal has a dark spot
 Assume GOAL:
the animal is Giraffe
 Round 1:
R2: IF the animal gives milk
THEN it is a mammal  fires mammal
 Round 2:
R8: IF the animal is mammal
the animal chews cud
THEN it is an ungulate  fires ungulate
 Round 3:
R11: IF the animal is an ungulate
the animal has long legs
the animal has a long neck
the animal has dark spot
THEN it is a GIRAFFE
Hence, goal reached. The used rules are: R2, R8
and R11.
BACKWARD CHAINING
 Facts in the working memory:
-the animal has hair
-the animal has claws
-the animal has pointed teeth
-the animal’s eyes point forward
-the animal has a tawny color
-the animal has dark spots
 Assume GOAL:
the animal is Cheetah
 Pass 1:
Based on R9:
?the animal is carnivore
the animal has a tawny color
the animal has dark spot
Stack:
Cheetah
S1
S1
AND
 Pass 2:
Based on R5 and R6:
?the animal is a mammal
?the animal can eat meat
?the animal is a mammal
the animal has pointed teeth
the animal has claws
the animal eyes point forward
Stack:
AND
AND
OR
S2
Carnivore
S1
S2
 Pass 3:
Based on R1 and R2:
the animal has hair
the animal gives milk
Stack:
OR Mammal
S1
S2
 Pass 4:
Based on R5 and R6:
 the animal is a mammal
? the animal can eat meat
 the animal is a mammal
the animal has pointed teeth
the animal has claws
the animal eyes point forward
Stack:
AND
OR
AND
Carnivore
S1
 Pass 5:
 the animal is carnivore
the animal has a tawny color
the animal has dark spot
Stack: Clear
Hence, goal is correct using backward chaining
provided the information and the rules used are:
R9, R6, R1.
AND Cheetah
THE END
Any Questions??

Weitere ähnliche Inhalte

Was ist angesagt?

Wild animals
Wild animalsWild animals
Wild animals
johnja85
 

Was ist angesagt? (20)

Introduction to Programming in LISP
Introduction to Programming in LISPIntroduction to Programming in LISP
Introduction to Programming in LISP
 
Distributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
Distributed Models Over Distributed Data with MLflow, Pyspark, and PandasDistributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
Distributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
 
Entity2rec recsys
Entity2rec recsysEntity2rec recsys
Entity2rec recsys
 
Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilon
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Deep Learning for Recommender Systems RecSys2017 Tutorial
Deep Learning for Recommender Systems RecSys2017 Tutorial Deep Learning for Recommender Systems RecSys2017 Tutorial
Deep Learning for Recommender Systems RecSys2017 Tutorial
 
Wild animals
Wild animalsWild animals
Wild animals
 
Applied NLP - Poster
Applied NLP - PosterApplied NLP - Poster
Applied NLP - Poster
 
AI local search
AI local searchAI local search
AI local search
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learning
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Reinforcement learning
Reinforcement learningReinforcement learning
Reinforcement learning
 
Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
Model-Agnostic Meta-Learning for Fast Adaptation of Deep NetworksModel-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
 
Reinforcement Learning Q-Learning
Reinforcement Learning   Q-Learning Reinforcement Learning   Q-Learning
Reinforcement Learning Q-Learning
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Introduction to deep learning
Introduction to deep learningIntroduction to deep learning
Introduction to deep learning
 
Deep Learning A-Z™: Artificial Neural Networks (ANN) - Plan of Attack
Deep Learning A-Z™: Artificial Neural Networks (ANN) - Plan of AttackDeep Learning A-Z™: Artificial Neural Networks (ANN) - Plan of Attack
Deep Learning A-Z™: Artificial Neural Networks (ANN) - Plan of Attack
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
 

Andere mochten auch

Introduction to Rule-based Applications
Introduction to  Rule-based ApplicationsIntroduction to  Rule-based Applications
Introduction to Rule-based Applications
giurca
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
osmancikk
 
Expert system 21 sldes
Expert system 21 sldesExpert system 21 sldes
Expert system 21 sldes
Yasir Khan
 
Lecture5 Expert Systems And Artificial Intelligence
Lecture5 Expert Systems And Artificial IntelligenceLecture5 Expert Systems And Artificial Intelligence
Lecture5 Expert Systems And Artificial Intelligence
Kodok Ngorex
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
Vishal Singh
 
Backward chaining rule-based system
Backward chaining rule-based systemBackward chaining rule-based system
Backward chaining rule-based system
Jenny Padillo
 
04 reasoning systems
04 reasoning systems04 reasoning systems
04 reasoning systems
John Issac
 

Andere mochten auch (20)

Rule Based System
Rule Based SystemRule Based System
Rule Based System
 
Introduction to Rule-based Applications
Introduction to  Rule-based ApplicationsIntroduction to  Rule-based Applications
Introduction to Rule-based Applications
 
Rule Based Architecture System
Rule Based Architecture SystemRule Based Architecture System
Rule Based Architecture System
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
 
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCEFORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
 
Expert system 21 sldes
Expert system 21 sldesExpert system 21 sldes
Expert system 21 sldes
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
 
Forward Backward Chaining
Forward Backward ChainingForward Backward Chaining
Forward Backward Chaining
 
Introduction to Expert Systems {Artificial Intelligence}
Introduction to Expert Systems {Artificial Intelligence}Introduction to Expert Systems {Artificial Intelligence}
Introduction to Expert Systems {Artificial Intelligence}
 
Lecture5 Expert Systems And Artificial Intelligence
Lecture5 Expert Systems And Artificial IntelligenceLecture5 Expert Systems And Artificial Intelligence
Lecture5 Expert Systems And Artificial Intelligence
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
6.expert systems
6.expert systems6.expert systems
6.expert systems
 
Truth management system
Truth  management systemTruth  management system
Truth management system
 
Artificial intelligence cs607 handouts lecture 11 - 45
Artificial intelligence   cs607 handouts lecture 11 - 45Artificial intelligence   cs607 handouts lecture 11 - 45
Artificial intelligence cs607 handouts lecture 11 - 45
 
Pengantar Sistem Pakar
Pengantar Sistem PakarPengantar Sistem Pakar
Pengantar Sistem Pakar
 
Pengantar Sistem Pakar
Pengantar Sistem PakarPengantar Sistem Pakar
Pengantar Sistem Pakar
 
Backward chaining rule-based system
Backward chaining rule-based systemBackward chaining rule-based system
Backward chaining rule-based system
 
04 reasoning systems
04 reasoning systems04 reasoning systems
04 reasoning systems
 
Sistem Pakar.ppt
Sistem Pakar.pptSistem Pakar.ppt
Sistem Pakar.ppt
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Ruled based expert system

  • 1. RULED-BASED EXPERT SYSTEM (FORWARD CHAINING AND BACKWARD CHAINING) -Amit Singh Dahal -g5638545
  • 2. FIRST STEP: WRITE THE RULES BASED ON DIAGRAMS:  R1: IF the animal has hair THEN it is a mammal  R2: IF the animal gives milk THEN it is a mammal  R3: IF the animal has feathers THEN it is a bird  R4: IF the animal flies the animal lays eggs THEN it is a bird  R5: IF the animal is a mammal the animal eats meat THEN it is a carnivore
  • 3. CONTD…  R6: IF the animal is a mammal the animal has pointed teeth the animal has claws the animal's eyes point forward THEN it is a carnivore  R7: IF the animal is a mammal the animal has hooves THEN it is an ungulate  R8: IF the animal is a mammal the animal chews cud THEN it is an ungulate AND it is even-toed
  • 4. CONTD…  R9: IF the animal is a carnivore the animal has a tawny colour the animal has dark spots THEN it is a cheetah  R10: IF the animal is a carnivore the animal has a tawny colour the animal has black stripes THEN it is a tiger  R11: IF the animal is an ungulate the animal has long legs the animal has a long neck the animal has dark spot THEN it is a giraffe  R12: IF the animal is an ungulate the animal has a white colour the animal has black stripes THEN it is a zebra
  • 5. CONTD…  R13 :IF the animal is a bird the animal does not fly the animal has long legs the animal has a long neck the animal is black and white THEN it is an ostrich  R14 :IF the animal is a bird the animal does not fly the animal swims the animal is black and white THEN it is a penguin  R15 :IF the animal is a bird the animal is a good flier THEN it is an albatross
  • 6. FORWARD CHAINING  Facts in the working memory: -the animal gives milk -the animal chew cuds -the animal has long legs -the animal has a long neck -the animal has a dark spot  Assume GOAL: the animal is Giraffe
  • 7.  Round 1: R2: IF the animal gives milk THEN it is a mammal  fires mammal  Round 2: R8: IF the animal is mammal the animal chews cud THEN it is an ungulate  fires ungulate  Round 3: R11: IF the animal is an ungulate the animal has long legs the animal has a long neck the animal has dark spot THEN it is a GIRAFFE Hence, goal reached. The used rules are: R2, R8 and R11.
  • 8. BACKWARD CHAINING  Facts in the working memory: -the animal has hair -the animal has claws -the animal has pointed teeth -the animal’s eyes point forward -the animal has a tawny color -the animal has dark spots  Assume GOAL: the animal is Cheetah
  • 9.  Pass 1: Based on R9: ?the animal is carnivore the animal has a tawny color the animal has dark spot Stack: Cheetah S1 S1 AND
  • 10.  Pass 2: Based on R5 and R6: ?the animal is a mammal ?the animal can eat meat ?the animal is a mammal the animal has pointed teeth the animal has claws the animal eyes point forward Stack: AND AND OR S2 Carnivore S1 S2
  • 11.  Pass 3: Based on R1 and R2: the animal has hair the animal gives milk Stack: OR Mammal S1 S2
  • 12.  Pass 4: Based on R5 and R6:  the animal is a mammal ? the animal can eat meat  the animal is a mammal the animal has pointed teeth the animal has claws the animal eyes point forward Stack: AND OR AND Carnivore S1
  • 13.  Pass 5:  the animal is carnivore the animal has a tawny color the animal has dark spot Stack: Clear Hence, goal is correct using backward chaining provided the information and the rules used are: R9, R6, R1. AND Cheetah