Suppose a backward chaining rule based expert system (IDENTIFIER) is constructed
ID: 3824766 • Letter: S
Question
Suppose a backward chaining rule based expert system (IDENTIFIER) is constructed which can recognize various animals in the zoo (see the separate sheet for rules).
a)Simulate IDENTIFIER’s behavior on the given facts. Take care to use the hypotheses in the specified order. Indicate your answer by showing the sequence in which the rules fire and name of the selected animal.
b)Is IDENTIFIER’s ultimate answer sensitive, in any circumstances, to the order of hypotheses? Explain.
IDENTIFIER
Assume the IDENTIFIER pursues hypotheses in the following order:
cheetah
tiger
giraffe
zebra
ostrich
penguin
albatross
Now, here are some facts to assume TRUE, if inquiry is made:
The animal has feathers.
It lays eggs.
It does not fly.
It is black and white.
It swims.
And here are some facts to assume FALSE, if inquiry is made:
It has hair.
It gives milk.
It flies.
It eats meat.
Its eyes point forward.
It has pointed teeth.
It has claws
It has hoofs.
It chews its cud.
It has a brownish color.
It has dark spots.
It has black stripes.
It has long legs.
It has a long neck.
It has a white color.
It is a good flier.
IF-THEN Rules (for Question 1) Rule 10: IF he animal is a carnivore AND it has a brownish color AND it has black stripes Rule 1: LF the animal has hair THEN it is a tiger THEN it is a mammal Rule 2: IF the animal gives milk Rule 11: IF the animal is an ungulate AND it has long legs THEN it is a AND it has a long neck. AND it has a brownish color Rule 3: IF the animal has feathers it has dark spots THEN it is a bird THEN it is a giraffe Rule 4: IF the animal flies AND it lays eggs Rule 12: IF the animal is an ungulate THEN is a bird. AND it has white color Rule 5: IF the animal is a mammal AND it has black stripes AND eats meal THEN it is a zebra THEN it is a carnivore. Rule 6: IF the animal is a mammal Rule 13: IF the animal is a bird AND it does not fly AND it has pointed teeth AND it has long legs AND has claws AND it has a long neck AND its eyes point forward AND it is black and white THEN it is a carnivore. THEN it is an ostrich Rule 7: IF the animal is a mammal Rule 14: IF the animal is a bird AND it has hoofs AND it does not fly THEN it is an ungulate. AND AND it is black and white Rule 8: IF the animal is a THEN it is a penguin AND it chews cud THEN 1) it is an ungulate Rule 15: IF he animal is a bird 2) it is even-toed AND it is a good flyer THEN it is an albatross Rule 9: IF he animal is a carnivore has a brownish color AND it has dark spots THEN t is aExplanation / Answer
There are a few important things to keep in mind as you work through this first exercise. It is, first of all, a multi-part hand-simulation problem designed to teach you many things about how rule-based systems work. While hand-simulations can be a fair amount of work, they can also be quite instructive. They help to remove the mystery about exactly how certain things are accomplished inside the system. This problem set also has a fair amount of reading, as it is intended to teach you some things. Don’t be surprise if the reading takes longer than the actual working of the problems. There is also a computer-based version of the problem, which you will do as Problem Set 3,. This is less busywork (and more fun), but not as instructive in terms of understanding the internals. The exercise is developed in several stages, in order to show you a number of different important points. In some cases it turns out that the best way to make a point is by seeing how not to do something. So you may find as you go along that there are things about the system and about the rule set you're given that are not quite correct. Have patience, because by the end of the exercise we will have fixed all of them. Finally, there is a separate answer sheet, downloadable in both Word and PDF formats from the course web site. Be sure to put all your answers on that sheet and hand in just that, in either hardcopy or electronic form, as you wish.. THE BASICS OF THE INFERENCE ENGINE GOAL In this part of the exercise you will learn first hand the basics of the inference engine, seeing exactly how backward chaining works and how explanations are generated. A SYSTEM FOR RECOMMENDING INVESTMENTS With all the different kinds of mutual funds that are available these days, it's become difficult to decide how to invest your hard-earned money. Luckily we can call on knowledge-based systems for some help. In this exercise we'll be using a simple system that can help you to decide among six of the most common categories of mutual funds. The system assumes that you have $2000 to invest and can help select among the following possibilities: • a money-market fund • an income fund (e.g., bonds) • an aggressive growth fund • a mixed growth and income fund (abbreviated “G&I”) • a conservative growth fund • a tax-free fund Rule-based Systems Exercises Page 2 • none (i.e., don't invest) THE KNOWLEDGE BASE In Table 1 you'll find the knowledge base, a set of rules written in a slightly abbreviated form. To help you read the rules, we have used some formatting conventions to help make their structure clear. Consider rule 12, for instance: 12] if Investment Goal = RETIREMENT and Number Of Years To Retirement < 10 then Category Of Fund = CONSERVATIVE GROWTH Each rule is expressed in terms of an if part (the premise) and a then part (the conclusion). In rule 12 there are two clauses in the premise and (as in all of our rules) one in the conclusion. While there is no theoretical limit to the number of clauses in the premise, it is in general a very good idea to keep the premise small—say between one and six clauses. Rules with larger premises are generally an indication that the “fracturing” of knowledge into rules has not been very successful. Each clause in a rule is expressed in terms of an attribute and its value. As a formatting convention, attributes are written as phrases with their first letters capitalized (e.g., Investment Goal, Number Of Years To Retirement, Category Of Fund); values are written in all capitals (RETIREMENT, 10, CONSERVATIVE GROWTH). The first clause thus asks whether the topic Invest Goal has the value RETIREMENT, or, in smoother English, “the goal for this investment is to fund your retirement.” (Keep in mind that this is strictly for presentation here; the system pays no attention to this.) Putting the whole rule in somewhat better English, it says: if the goal for this investment is to fund your retirement, and the number of years until you retire is less than 10, then the category of fund to select is the conservative growth funds. THE INFERENCE ENGINE IN ACTION But how can we put all that knowledge to work? Our system will proceed by chaining backward. In this case the primary goal is to determine which Category of Fund to invest in. The system starts trying to determine this by retrieving all the rules that are relevant, i.e., all rules that conclude about this attribute. Conveniently enough, the rules in Table 1 are organized according to what they conclude about, so it's clear that rules 10 through 22 are the relevant ones. Assume that the system tries them in the order shown there. It would thus begin with Rule 10, chaining backward: Rule-based Systems Exercises Page 3 category 10 insurance coverage FIGURE 1 Rule 10 warns us not to invest if we don't have basic insurance coverage (i.e., use the money to buy insurance instead). But we don't know if the premise of Rule 10 is satisfied yet, that is, whether our Basic Insurance Coverage is INADEQUATE. How can the system determine that? KNOWLEDGE BASED SYSTEMS HAVE A SIMPLE DATABASE The system has a simple database in which it records any inferences it makes and any answers the user gives to questions. The first thing to do then, when trying to determine the value of any attribute, is to check the database to see if the answer is already there, either because the system deduced it earlier, or because the user told us earlier. (Recording the answers also provides some common sense and efficiency. Some facts are used in more than one rule, so if the deductions and answers were not recorded, the system would deduce them all over again or ask the user all over again.) Here's a more detailed description of what the system does to determine the value of an attribute. There are three steps to be taken: 1. Check the database to see if the answer has previously been deduced or supplied by the user. If so, that's the value to use. 2. If there's no value in the database, retrieve from the knowledge base all rules capable of deducing any value for the attribute. Try using all of those rules (i.e., for each rule, determine the truth of the premise; if the premise turns out to be true, make the conclusion.) 3. If, despite steps 1 and 2, there is still no value for the attribute, ask the user. Note that in step 2 we might find some rules in the knowledge base, try them and discover that none of them is relevant. Thus we can get to step 3 and have to ask the user because there were no rules at all, or because there none of the rules were relevant to the current situation. The System Retrieves All Rules About A Given Topic In this case, since we have just begun, the database is empty so step 1 fails. To try step 2, the system looks in the knowledge base for any rule that can tell it anything about insurance coverage. Note that even though the premise of Rule 10 specifies the condition “Basic Insurance Coverage = INADEQUATE”, the inference engine will retrieve all rules that conclude about insurance coverage, whether they conclude that it is ADEQUATE, INADEQUATE, or anything else.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.