SlideShare a Scribd company logo
1 of 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??

More Related Content

What's hot

Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3DigiGurukul
 
Deep Reinforcement Learning
Deep Reinforcement LearningDeep Reinforcement Learning
Deep Reinforcement LearningUsman Qayyum
 
Turing Machine
Turing MachineTuring Machine
Turing MachineRajendran
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchTekendra Nath Yogi
 
Turing machine and Halting Introduction
Turing machine and Halting IntroductionTuring machine and Halting Introduction
Turing machine and Halting IntroductionAmartyaYandrapu1
 
Local search algorithms
Local search algorithmsLocal search algorithms
Local search algorithmsbambangsueb
 
Artificial intelligence agents and environment
Artificial intelligence agents and environmentArtificial intelligence agents and environment
Artificial intelligence agents and environmentMinakshi Atre
 
Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4DigiGurukul
 
Turing machine Introduction
Turing machine IntroductionTuring machine Introduction
Turing machine IntroductionAram Rafeq
 
Natural Language Processing (NLP) - Introduction
Natural Language Processing (NLP) - IntroductionNatural Language Processing (NLP) - Introduction
Natural Language Processing (NLP) - IntroductionAritra Mukherjee
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmvikas dhakane
 

What's hot (20)

AI local search
AI local searchAI local search
AI local search
 
First order logic
First order logicFirst order logic
First order logic
 
Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3
 
AI_Unit I notes .pdf
AI_Unit I notes .pdfAI_Unit I notes .pdf
AI_Unit I notes .pdf
 
Deep Reinforcement Learning
Deep Reinforcement LearningDeep Reinforcement Learning
Deep Reinforcement Learning
 
Artificial Intelligence - Reasoning in Uncertain Situations
Artificial Intelligence - Reasoning in Uncertain SituationsArtificial Intelligence - Reasoning in Uncertain Situations
Artificial Intelligence - Reasoning in Uncertain Situations
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
Turing machine and Halting Introduction
Turing machine and Halting IntroductionTuring machine and Halting Introduction
Turing machine and Halting Introduction
 
Ai notes
Ai notesAi notes
Ai notes
 
Local search algorithms
Local search algorithmsLocal search algorithms
Local search algorithms
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Rule Based System
Rule Based SystemRule Based System
Rule Based System
 
Artificial intelligence agents and environment
Artificial intelligence agents and environmentArtificial intelligence agents and environment
Artificial intelligence agents and environment
 
Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4
 
Hill climbing
Hill climbingHill climbing
Hill climbing
 
Turing machine Introduction
Turing machine IntroductionTuring machine Introduction
Turing machine Introduction
 
Natural Language Processing (NLP) - Introduction
Natural Language Processing (NLP) - IntroductionNatural Language Processing (NLP) - Introduction
Natural Language Processing (NLP) - Introduction
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
 

Viewers also liked

Introduction to Rule-based Applications
Introduction to  Rule-based ApplicationsIntroduction to  Rule-based Applications
Introduction to Rule-based Applicationsgiurca
 
Rule Based Architecture System
Rule Based Architecture SystemRule Based Architecture System
Rule Based Architecture SystemFirdaus Adib
 
Expert Systems
Expert SystemsExpert Systems
Expert Systemsosmancikk
 
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 INTELIGENCEJohnLeonard Onwuzuruigbo
 
Expert system 21 sldes
Expert system 21 sldesExpert system 21 sldes
Expert system 21 sldesYasir Khan
 
Introduction to Expert Systems {Artificial Intelligence}
Introduction to Expert Systems {Artificial Intelligence}Introduction to Expert Systems {Artificial Intelligence}
Introduction to Expert Systems {Artificial Intelligence}FellowBuddy.com
 
Lecture5 Expert Systems And Artificial Intelligence
Lecture5 Expert Systems And Artificial IntelligenceLecture5 Expert Systems And Artificial Intelligence
Lecture5 Expert Systems And Artificial IntelligenceKodok Ngorex
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Yasir Khan
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AIVishal Singh
 
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 - 45Sattar kayani
 
Pengantar Sistem Pakar
Pengantar Sistem PakarPengantar Sistem Pakar
Pengantar Sistem PakarHerman Tolle
 
Backward chaining rule-based system
Backward chaining rule-based systemBackward chaining rule-based system
Backward chaining rule-based systemJenny Padillo
 
04 reasoning systems
04 reasoning systems04 reasoning systems
04 reasoning systemsJohn Issac
 
MIS BAB 6 Sistem Pakar
MIS BAB 6 Sistem PakarMIS BAB 6 Sistem Pakar
MIS BAB 6 Sistem PakarRiza Nurman
 

Viewers also liked (20)

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
 
MIS BAB 6 Sistem Pakar
MIS BAB 6 Sistem PakarMIS BAB 6 Sistem Pakar
MIS BAB 6 Sistem Pakar
 

Recently uploaded

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

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