HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A small expert system for identifying animals has five rules…
HardComputer ScienceHigh School (9–10)Computer Science › Automated and Emerging TechnologiesNumericalConceptualIGCSE

A small expert system for identifying animals has five rules…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A small expert system for identifying animals has five rules.

  • Rule 1: IF it has feathers THEN it is a bird.
  • Rule 2: IF it gives milk THEN it is a mammal.
  • Rule 3: IF it is a bird AND it cannot fly AND it is very tall THEN it is an ostrich.
  • Rule 4: IF it is a bird AND it swims THEN it is a water bird.
  • Rule 5: IF it is a mammal AND it has stripes THEN it is a zebra.

The user's answers give these facts: it has feathers, it cannot fly, it is very tall, it does not swim.

The inference engine applies the rules again and again until no new fact appears. How many rules fire, and what is the final conclusion about the animal?

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

An expert system has four parts. The knowledge base holds the facts. The rule base holds the IF ... THEN rules. The inference engine applies the rules to the facts and the user's answers, chooses the next question and reaches a conclusion. The interface asks the questions and shows the conclusion.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. First pass. Rule 1 fires: it has feathers, so it is a bird (a new fact). Rule 2 cannot fire: we do not know that it gives milk.

Step 2. Using the new fact. Rule 3 now fires: it is a bird, it cannot fly and it is very tall, so it is an ostrich. Rule 4 does not fire, because it does not swim. Rule 5 does not fire, because it is not known to be a mammal.

Step 3. Another pass. No rule gives a new fact, so the engine stops.

Answer: 222 rules fire (rules 1 and 3), and the conclusion is that the animal is an ostrich.

Watch out. Rule 3 could not fire on the first look at the user's facts. It needed the conclusion of rule 1. This chaining is the inference engine reasoning.

Log in to save this for later
← All Problems
← A garage uses an expert system to help mechanics find faults in car engines…A health centre in a remote area uses an expert system to help a nurse decide whether a patient… →
More onComputer Science › Automated and Emerging Technologies

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A filter calls an email unwanted when its score is greater than its dividing line T…Hard
  2. A bank wants software to decide which card payments might be fraud…Hard
  3. A learning filter is given eight emails that users have labelled…Medium
  4. An email service has a filter that moves unwanted messages into a separate folder…Medium
  5. A health centre in a remote area uses an expert system to help a nurse decide whether a patient…Hard
All problems on this topic →