SlideShare a Scribd company logo
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 R10:
?the animal is carnivore
the animal has a tawny color
the animal has dark spot
Stack:
Cheetah
R1
R1
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
R2
Carnivore
R1
R2
 Pass 3:
Based on R1 and R2:
the animal has hair
the animal gives milk
Stack:
OR Mammal
R1
R2
 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
R1
 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:
R10, R5, R6, R1, R2.
AND Cheetah
THE END
Any Questions??

More Related Content

PPTX
Ruled based expert system
PDF
OWLED 2014 - All But Not Nothing: Left Hand Side Universals for OWL EL
PPT
Pandemic Logic Quiz - Solutions
PPTX
Adventure works [year] sales proposal
PPTX
Character education (1)
PPTX
Application Development
PDF
Ивановская область
PDF
Тамбовская область
Ruled based expert system
OWLED 2014 - All But Not Nothing: Left Hand Side Universals for OWL EL
Pandemic Logic Quiz - Solutions
Adventure works [year] sales proposal
Character education (1)
Application Development
Ивановская область
Тамбовская область

Viewers also liked (14)

PDF
Забайкальский край
PPTX
средња стручна школа ,,борислав михајловић михиз
PDF
Оренбургская область
PPTX
Web hunting
PDF
Челябинская область
PPTX
кулинарски техничар
PDF
Новосибирская область
PDF
G4 MSL Curriculum 2014-2015
PDF
Ленинградская область
PPS
Mwi field tablet comparison
PPTX
PDF
Республика Татарстан
PDF
Новосибирская область
PDF
Hạt giống tâm hồn22
Забайкальский край
средња стручна школа ,,борислав михајловић михиз
Оренбургская область
Web hunting
Челябинская область
кулинарски техничар
Новосибирская область
G4 MSL Curriculum 2014-2015
Ленинградская область
Mwi field tablet comparison
Республика Татарстан
Новосибирская область
Hạt giống tâm hồn22
Ad

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
A Presentation on Artificial Intelligence
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
MIND Revenue Release Quarter 2 2025 Press Release
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Per capita expenditure prediction using model stacking based on satellite ima...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
A Presentation on Artificial Intelligence
gpt5_lecture_notes_comprehensive_20250812015547.pdf
1. Introduction to Computer Programming.pptx
cuic standard and advanced reporting.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
Diabetes mellitus diagnosis method based random forest with bat algorithm
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Advanced methodologies resolving dimensionality complications for autism neur...
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Ad

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 R10: ?the animal is carnivore the animal has a tawny color the animal has dark spot Stack: Cheetah R1 R1 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 R2 Carnivore R1 R2
  • 11.  Pass 3: Based on R1 and R2: the animal has hair the animal gives milk Stack: OR Mammal R1 R2
  • 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 R1
  • 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: R10, R5, R6, R1, R2. AND Cheetah