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

Viewers also liked

Забайкальский край
Забайкальский крайЗабайкальский край
Забайкальский край
informika
 
средња стручна школа ,,борислав михајловић михиз
средња стручна школа ,,борислав михајловић михизсредња стручна школа ,,борислав михајловић михиз
средња стручна школа ,,борислав михајловић михиз
Jelena Radić
 
Оренбургская область
Оренбургская областьОренбургская область
Оренбургская область
informika
 
Новосибирская область
Новосибирская областьНовосибирская область
Новосибирская область
informika
 
Mwi field tablet comparison
Mwi field tablet comparisonMwi field tablet comparison
Mwi field tablet comparison
Michelle Jacques
 

Viewers also liked (14)

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

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 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 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