Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
84 views
24 pages
Rule Based Expert System
Uploaded by
HANAE BARAKA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Rule Based Expert System For Later
Download
Save
Save Rule Based Expert System For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
84 views
24 pages
Rule Based Expert System
Uploaded by
HANAE BARAKA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Rule Based Expert System For Later
Carousel Previous
Carousel Next
Download
Save
Save Rule Based Expert System For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 24
Search
Fullscreen
Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis Chapter Three: Rule-Based Expert Systems By: Dr Muhanad Tahrir Youniy 1, Introduction In which we introduce the most popular choice for building knowledge*based systems: Rule-Based Expert Systems(RBESs). In the 1970s, it was finally accepted that to make a machine solve aff intellectual problem one had to know the solution. In other words, one has to have knowledge, *know-how’, in some specific domain 2. What is knowledge? Knowledge is a theoretical or practiGal undétstafiding of a subject or a domain, Knowledge is also the sum of what is curtently known, and apparently knowledge is power. Those who possess kndwledge are called experts. They are the most powerful and important peopleiin theif organizations, Any successful company has at least a few first-class experts,and it cannot remain in business without them. 3. Who is generally acknowledged as an expert? Anyone canbe Considered a domain expert if he or she has deep knowledge (of both facts ‘and Ytles) and strong practical experience in a particular domain. The area of the domain may be limited. For example, experts in electrical machines imay have only general knowledge about transformers, while experts in life instirance marketing might have limited understanding of a real estate insurance policy. In general, an expert is a skillful person who can do things other people cannot.Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis 4. Rules as a knowledge representation technique Any rule consists of two parts; the IF part, called the antecedent (premise or condition) and the THEN part called the consequent (conclusion or action). ‘The basic syntax of a rule is: IF
THEN
In general, a rule can have multiple antecedents joined by the keywofds AND (conjunction), OR (disjunction) or a combination of both. However, it is a good habit to avoid mixing conjunctions and disjunctions,in the'same rule. The antecedent of a rule incorporates two parts: an dbject (linguistic object) and its value. In our road crossing example, the linguistic'ebject ‘traffic light’ can take either the value green or the value red, The’ object and its value are linked by an operator. The operator identifies the objet.and assigns the value. Operators such as is, are, is not, are hot are used to assign a symbolic value to a linguistic object. But expert syst8his can also use mathematical operators to define an object as numerical and,assign it to the numerical value. For example, 5, What is an Expert System? In aftificial intelligence, an expert system is a computer system that ernulites, thedecision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning about knowledge, like an expert, and,not by following the procedure of a developer as is the case in conventional programming. The first expert systems were created in the 1970s and then proliferated in the 1980s. Expert systems were among the first truly successful forms of AI software.Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis As soon as knowledge is provided by a human expert, we can input it into a computer. We expect the computer to 1- Act as an intelligent assistant in some specific domain of expertise or to solve a problem that would otherwise have to be solved by an expert. 2- Be able to integrate new knowledge and to show its knowledge in a forny'that is easy to read and understand, and to deal with simple sentences in @*natiiral Janguage rather than an artificial programming language. 3- Explain how it reaches a particular conclusion. In other words, we have to build an expert system, accomputer program capable of performing at the level of a human expert in a narrow problem area. The most popular expert systems are rule-based, systems. A great number have been built and successfully applied if, such (areas as business and engineering, medicine and geology, power systems and\mining. THE APPLICATIONS OF EXPERT SYSTEMS The spectrum of applicdtions%ef expert systems technology to industrial and commercial problems is\so Wide as to defy easy characterization. The applications find their way ifto thost’areas of knowledge work. They are as varied as helping salespergons\ sell, thodular factory-built homes to helping NASA plan the maintenance of a space shuttle in preparation for its next flight. Applications tend to cluster into seven major classes. 1- Diagnosis and Troubleshooting of Devices and Systems of All Kinds: This class comprises systems that deduce faults and suggest corrective actions for a malfunctioning device or process. Medical diagnosis was one of the first knowledge areas to which ES technology was applied, but diagnosis of engineered systems quickly surpassed medical diagnosis. There are probablyChapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis more diagnostic applications of ES than any other type. The diagnostic problem can be stated in the abstract as: given the evidence presenting itself, what is the underlying problenvreason/eaus: Planning and Scheduling: Systems that fall into this class analyze a set of one or more potentially complex and interacting goals in order to determine a set 6f, actions to achieve those goals, and/or provide a detailed temporal ordering Of, those actions, taking into account personnel, materiel, and other constfaints. This class has great commercial potential, which has“beeh, reGognized, Examples involve airline scheduling of flights, pefSOnnel, and gates; manufacturing job-shop scheduling; and manufacturing process planning. Configuration of Manufactured Objects\.from — Subassemblies: Configuration, whereby a solution to a problem is'synthesized from a given set of elements related by a set of constraints, is historically one of the most important of expert system applitations:.Configuration applications were pioneered by computer companies as a Means of facilitating the manufacture of semi-custom minicomputers. The technique has found its way into use in many different industries, for ckamtiple, modular home building, manufacturing, and other problems involVing tomplex engineering design and manufacturing. Financial Decision "Making: The financial services industry has been a vigorous user ‘of expert system techniques. Advisory programs have been created to assist bankers in determining whether to make loans to businesses Sidhin¥lividuals. Insurance companies have used expert systems to assess the risk presented by the customer and to determine a price for the insurance. A typical application in the financial markets is in foreign exchange trading Knowledge Publishing This is a relatively new, but also potentially explosive area, The primary function of the expert system is to deliver knowledge that is relevant to the user's problem, in the context of the user's problem. The two most widely distributed expert systems in the world are in this category. TheChapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis first is an advisor which counsels a user on appropriate grammatical usage in a text, The second is a tax advisor that accompanies a tax preparation program and advises the user on tax strategy, tactics, and individual tax policy. 6- Process Monitoring and Control: Systems falling in this class analyze real- time data from physical devices with the goal of noticing anomalies, predictinig, trends, and controlling for both optimality and failure correction, Examples Of real-time systems that actively monitor processes can be found iti\the)steel making and oil refining industries. 7- Design and Manufacturing: These systems assist in the'design of physical devices and processes, ranging from high-level conceptual design of abstract entities all the way to factory floor configuration of maftufacturing processes. 6. What is an expert system shell? ‘An expert system shell can be considéted as an éXpert system with the knowledge removed. Therefore, all the userthas to dois to add the knowledge in the form of rules and provide relevant data t6 sdlye a problem. 7. The main players,inthe.expert system development team Let us now lo6k atwhd isneeded to develop an expert system and what skills are needed, In gerteral) there are five members of the expert system development team: the domain.expert, the knowledge engineer, the programmer, the project manager and thé’end-user. The success of their expert system entirely depends on how well the members work together. The basic relations in the development team are summarized in Figure (1).Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahrir Younis | Figure (1): The main players of the expert system deyélopment team 1- The domain expert is a knowledgeable and skilled pétson capable of solving problems in a specific area or domain. This persotvhas the greatest expertise in a given domain, This expertise is totbe captured in the expert system. Therefore, the expert must be able to communicate his or her knowledge, be willing to participate in the expert system Wevelopment and commit a substantial amount of time to the project. The domain expert is the most important player in the expert system development team. 2- The knowledge ehgince¥ is someone who is capable of designing, building and testing an expert System. This person is responsible for selecting an appropriate task for the expert system. He or she interviews the domain expert to find out how a\particular problem is solved. Through interaction with the expert, the knowledge engineer establishes what reasoning methods the expert uses to handle facts and rules and decides how to represent them in the expert system, The knowledge engineer then chooses some development software or an expert system shell, or looks at programming languages for encoding the knowledge (and sometimes encodes it himself). And finally, the knowledge engineer is responsible for testing, revising and integrating the expert system into the workplace. Thus, the knowledge engineer is committed to the project from theChapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahrir Younis initial design stage to the final delivery of the expert system, and even after the project is completed, he or she may also be involved in maintaining the system, The programmer is the person responsible for the actual programming, describing the domain knowledge in terms that a computer can understand. The programmer needs to have skills in symbolic programming in such Al languages as LISP, and Prolog and also some experience in the application Of, different types of expert system shells. In addition, the programmer should know conventional programming languages like C, Pascal, FORTRAN and Basic. If an expert system shell is used, the knowledge"Engineer can easily encode the knowledge into the expert system and thus eliminate the need for the programmer. However, if a shell cannot be“ased}»a programmer must develop the knowledge and data representation structures (knowledge base and database), control structure (inference enginle) and dialogue structure (user interface). The programmer may also be intvolved in testing the expert system. The project manager is thé\leader of the expert system development team, responsible for keeping the project on track. He or she makes sure that all deliverables and milestonesare met, interacts with the expert, knowledge engineer, programmérandjend-user The end-user, offer Called just the user, is a person who uses the expert system when it is developed, The user might be an analytical chemist determining the molecular sirubture of soil from Mars, a junior doctor diagnosing an infectious Blood disdase, an exploration geologist trying to discover a new mineral deposit, ora power system operator needing advice in an emergency. Each of these users cof expert systems has different needs, which the system must meet: the system’ final acceptance will depend on the user’s satisfaction. The user must not only be confident in the expert system performance but also feel comfortable using it, Therefore, the design of the user interface of the expert system is also vital for the project’s success; the end-user’s contribution here can be crucial.Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis The development of an expert system can be started when all five players have joined the team, However, many expert systems are now developed on personal computers using expert system shells, This can climinate the need for the programmer and also might reduce the role of the knowledge engineer. For small expert systems, the project manager, knowledge engineer, programmer and evén, the expert could be the same person, But all team players are required whe large. expert systems are developed. 8, Structure of a rule-based expert system In the early 1970s, Newell and Simon from Carnegie-Mellon University proposed a production system model, the foundation of the“modem rule-based expert systems. The production model is based on the idea that humans solve problems by applying their knowledge (expressed as producti6n rules) to a given problem represented by problem-specific infotmation\.The production rules are stored in the long-term memory and the problem-specific information or facts in the short- c structure of a rule-based term memory. The production syétemmodel and the bas expert system are shown in Figure (2). Arule-based expert sfStemthas five components: the knowledge base, the database, the inference efiginéthe explanation facilities, and the user interfaceChapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahrir Younis Longterm memory Shortlerm memory ae Conclusion) (a) <4 Knowledge base Database —— Rule: IF-THEN Fact | Explenation facilities User Interface © Figure (2): Production system and basic structure of a rule-based expert system: (a) production system model; (b) basic structure of a rule~ based expert system 9Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahrir Younis 1- The knowledge base contains the domain knowledge useful for problem solving, In a rule-based expert system, the knowledge is represented as a set of rules. Each rule specifies a relation, recommendation, directive, strategy or heuristic and has the IF (condition) THEN (action) structure. When the condition part of a rule is satisfied, the rule is said to fire and the action partis, executed. 2. The database includes a set of facts used to match against the IF (@ondition) parts of rules stored in the knowledge base. 3- The inference engine carries out the reasoning whereby"the expert system reaches a solution. It links the rules given in the knowledge base with the facts provided in the database. 4- The explanation facilities cnable the user to a8k the expert system how a particular conclusion is reached and.whya specific f ct is needed. An expert system must be able to explain itg reasoning and justify its advice, analysis or conclusion, The user interface is the means"of communication between a user seeking a solution to the problem and anexpert system, The communication should be as meaningful and frientily a8 possible. These five components’ are essential for any rule-based expert system. They constitute its.cofe, But there may be a few additional components. 6- Theextertial interface allows an expert system to work with external data files and programs written in conventional programming languages such as C, Pascal, FORTRAN and Basic. The complete structure of a rule-based expert system is shown in Figure (3). The developer interface usually includes knowledge base editors, debugging aids and input/output facilities. All expert system shells provide a simple text editor to input and modify rules, and to check their correct format and spelling. 10Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahrir Younis External — database External program Export systom Knowledge base Database i ser Interface Dereinner Hessian Interface 5 Car) Gooniedgeennees) Carer Figure (3): Complete'structure of a rule-based expert system Many expert systemS”also include book-keeping facilities to monitor the changes made by the knowledge engineer or expert. Ifa rule is changed, the editor witlautomatieally store the change date and the name of the person who made this change'for later reference. This is very important when a number of knowledge efigineers and experts have access to the knowledge base and can modify it. Debugging aids usually consist of tracing facilities and break packages. Tracing provides a list of all rules fired during the program’s execution, and a break package makes it possible to tell the expert system in advance where to stop so that uChapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahrir Younis the knowledge engineer or the expert can examine the current values in the database. Most expert systems also accommodate input/output facilities such as runtime knowledge acquisition. This enables the running expert system to ask for needed information whenever this information is not available in the database. Wheti the requested information is input by the knowledge engineer or the expert, ‘the program resumes. In general, the developer interface, and knowledge "acquisition facilities in particular, are designed to enable a domain expert to inptithis or her knowledge directly in the expert system and thus to minimize the iftervention of a knowledge engineer. 9, Fundamental characteristics of an ‘expert System An expert system is built to perform ata/hunian expert level in a narrow, specialized domain. Thus, the most important characteristic of an expert system is its high-quality performance. No thatter how fast the system can solve a problem; the user will not be satisfied if thérestilt is wrong. On the other hand, the speed of reaching a solution is very important. Even the most accurate decision or diagnosis may not be useful if ifis t8o late to apply, for instance, in an emergency, when a ical patient dies of\4 fuclear power plant explodes. Experts use their pra experience and‘understanding of the problem to find short cuts to a solution, Experts us®rulés of thumb or heuristics. Like their human counterparts, expert systems Should apply heuristics to guide the reasoning and thus reduce the search area for'a solution. A unique feature of an expert system is its explanation eapability. This enables the expert system to review its own reasoning and explain its decisions. An explanation in expert systems in effect traces the rules fired during a problem- solving session. This is, of course, a simplification; however a real or ‘human’ 12Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahrir Younis explanation is not yet possible because it requires basic understanding of the domain, Although a sequence of rules fired cannot be used to justify a conclusion, we can attach appropriate fundamental principles of the domain expressed as text to each rule, or at least each high-level rule, stored in the knowledge base. This is probably as far as the explanation capability can be taken. However, the ability to explain a line of reasoning may not be essential for some expert systemt&,, For example, a scientific system built for experts may not be required fo, provide extensive explanations, because the conclusion it reaches can Be self-explanatory to other experts; a simple rule-tracing might be quite appropriate. On the other hand, expert systems used in decision making usually*demand complete and thoughtful explanations, as the cost of a wrong decisién. may be very high. Expert systems employ symbolic reasoning whith sélying a problem. Symbols are used to represent different types of knowledge'such as facts, concepts and rules. Unlike conventional programs, written “for numerical data processing, expert systems are built for knowledge processing and can easily deal with qualitative data. Conventional programs proses data using algorithms, or in other words, a series of well-defined stefby-step operations. An algorithm always performs the same operations in {hésiime order, and it always provides an exact solution. Conventional programs'do not make mistakes ~ but programmers sometimes do. Unlike conventional programs, expert systems do not follow a prescribed sequence of steps. They permit inexact reasoning and can deal with incomplete, uncertain and fuzzy data. 10)Can expert systems make mistakes? Even a brilliant expert is only a human and thus can make mistakes. This suggests that an expert system built to perform at a human expert level also should be allowed to make mistakes. But we still trust experts, although we do recognize that their judgments are sometimes wrong. Likewise, at least in most cases, we can rely 13Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis on solutions provided by expert systems, but mistakes are possible and we should be aware of this. 11. Does it mean that conventional programs have an advantage over expert systems? In theory, conventional programs always provide the same ‘correct’ solutions. However, we must remember that conventional programs can tackle problems)if, and only if, the data is complete and exact. When the data is incompl¢te br iff€ludes some errors, a conventional program will provide either né:solution at all or an incorrect one. In contrast, expert systems recognize that the available information may be incomplete or fuzzy, but they can work in suchisittations and still arrive at some reasonable conclusion. Another important feature that distingtishés)expert systems from conventional programs is that knowledge is separatedifrom ‘its processing (the knowledge base and the inference engine are splitup). A onventional program is a mixture of knowledge and the control structure {8 process this knowledge. This mixing leads to difficulties in understanding and reviewing the program code, as any change to the eode.affects both the knowledge and its processing. In expert systems, knowledge ‘is clearly separated from the processing mechanism. This makes éxpettisystems much easier to build and maintain, When an expert system shellsis sca knowledge engineer or an expert simply enters rules in the knowledge base. Each new rule adds some new knowledge and makes the expert system smarter. The system can then be easily modified by changing or subtracting tules. The characteristics of expert systems discussed above make them different from conventional systems and human experts. A comparison is shown in Table (1). 14Chapter Three: Rule-Based Expert Systems Prepared Gy: Dr Muhanad Tahir Younis Table (1): Comparison of expert systems with conventional systems and human experts Human experts Use knowledge in the ‘orm of rules of thumb or heuristics to solve problems in a namrow domain. Ina human brain, knomedge exists in a ‘compiled form. Capable of explaining a line of reasoning end providing the details. Use inexact reasoning and can deal with incompiete, uncertain and fuzzy information. Can make mistakes when information Is incomplete or fuzy. Enhance the quality of problem solving via yeers ‘of leaming and practical ‘raining. This process is, slow, inefficient and expensive. Expert systems Process knowledge exoressed in the form of rules and use symbolic reasoning to sohe probiems in a narrow domain. Provide a clear separation of knowledge from its processing. Trace the rules fired during a problersolving session ‘and explain how 2 particular conclusion was reached and why specific deta was needed. Permit inexact reasoning, ard can deal with Incomplete, uncertain and fuzzy data, Can make mistakes when dota is incomplete or fuzzy. Enhance the quality of probiem solving by adding ew rules or adjusting old cones in the knowledge base. When new knowledge 's acquired, changes are easy to accomplish. Conventional programs Process data and use algorthms, a series of welkdefined operations. to solve general numerical problems. Do not separate knowedge trom the ‘control structure to process this knowledge. Do not explain now a particular result was obtained and why input data was needed. Work only on problems. where data is complete ‘and exact. Provide no solution at all, or awrong one, when data Is Incomplete or fuzzy. Enhance the quality of prablem solving by ‘changing the program ‘code, which affects both the knowledge and its processing, making changes dificult 12. Forward chaining and backward chaining inference techniques Tha rule-based expert system, the domain knowledge is represented by a set of IF- THEN production rules and data is represented by a set of facts about the current uation. The inference engine compares each rule stored in the knowledge base with facts contained in the database. When the IF (condition) part of the rule matches a fact, the rule is fired and its THEN (action) part is executed. The fired rule may change the set of facts by adding a new fact, as shown in Figure (4). 15Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahrir Younis Letters in the database and the knowledge base are used to represent situations or concepts, Daidbase Fact; Als x Fact: Bis y Maton Fre! Kricwleclge base Uy Rule IF Als x THEN Bis. yf Figure (4): The inference engine cycles via,amatch-fire procedure The matching of the rule IF parts tocthe factsproduces inference chains. The infe erence chain indicates how an expe? system applies the rules to reach a conclusion. To illustrate chaining inference techniques, consider a simple example. Suppose the database initially inéludes facts A, B, C, D and E, and the knowledge base contains only threg rules? Rule 1: IF Y is tfuc AND Distrie THEN Z is true Rule,2: IF Xiis true AND B is true AND E is true THEN Y is true Rulé 3: IF A is true THEN X is true The inference chain shown in Figure 5 indicates how the expert system applies the rules to infer fact Z. First Rule 3 is fired to deduce new fact X from given fact A. en Rule 2 is executed to infer fact Y from initially known facts B and E, and 16Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis already known fact X. And finally, Rule | applies initially known fact D and just- obtained fact Y to arrive at conclusion Z. ‘An expert system can display its inference chain to explain how a particular conclusion was reached; this is an essential part of its explanation facilities. A x a ¥ L-[z E D Figure (5): An example of an inference chain The inference engine must decide when the rules Haye'to be fired. Ther are two principal ways in which rules are executed. On@is Called forward chaining and the other backward chaining, 12.1 Forward chaining The example discussed aboye uses forward chaining. Now consider this technique in more detail. Let usfirstrewrite our rules in the following form: Rule 1: ¥ & DZ Rule 2:X &B &ED Y Rule 3: A> X& Arrows here indicate the IF and THEN parts of the rules. Let us also add two more ules: Rule 4: CL. Rule 5:L&M9N Figure (6) shows how forward chaining works for this simple set of rules. Forward chaining is the data-driven reasoning. The reasoning starts from the known data 7Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis and proceeds forward with that data. Each time only the topmost rule is executed. When fired, the rule adds a new fact in the database. Any rule can be executed only once. The match-fire cycle stops when no further rules can be fired. In the first cycle, only two rules, Rule 3: A > X and Rule 4: C > L, match facts in the database. Rule 3: A > X is fired first as the topmost one. The IF part of this rule matches fact A in the database, its THEN part is executed and new fact Xpis added to the database. Then Rule 4: C > L is fired and fact L igalsg’placed:in the database. In the second cycle, Rule 2: X&B&E > Y is fired becatise facts B, E and X are already in the database, and as a consequence facteY “is ifferred and put in the database. This in turn causes Rule 1: Y &D 9 Z'to éXecute, placing fact Z in the database (cycle 3). Now the match-fire cycl€@)stop because the IF part of Rule 5: L&M > N does not match all facts i thedatabase and thus Rule 5 cannot be fired. Database Dotabase: Database. [ol TELE eo ae EE var veo] (iemearees = = =e = a os at = Tawsn)) [Coemsn) (Cewsa]) [cen Figure (6): Forward chaining 18Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis Forward chaining is a technique for gathering information and then inferring from it whatever can be inferred, However, in forward chaining, many rules may be executed that have nothing to do with the established goal. Suppose, in our example, the goal was to determine fact Z. We had only five rules in the knowledge base and four of them were fired. But Rule 4: CL, which is unrelated to fact 2 was also fired among others. A real rule-based expert system can have hundféds Of, rules, many of which might be fired to derive new facts that are“validyy but unfortunately unrelated to the goal. Therefore, if our goal is‘to infer ‘only one particular fact, the forward chaining inference technique would'not be efficient. In such a situation, backward chaining is more appropriate, 12.2 Backward chaining Backward chaining is the goal-driven reasoning. In Backward chaining, an expert system has the goal (a hypothetical sélution) and the inference engine attempts to find the evidence to prove it. First, the knowledge base is searched to find rules that might have the desired solution.\Such rules must have the goal in their THEN. (action) parts. If such a rule i$ found’and its IF (condition) part matches data in the database, then the rule ig fired, and the goal is proved. However, this isarély the case. Thus the inference engine puts aside the rule it is working with (the rile is said to stack) and sets up a new goal, a sub-goal, to prove the IF part of this rule. Then the knowledge base is searched again for rules that can prove the sub-goal. The inference engine repeats the process of stacking the ules until no rules are found in the knowledge base to prove the current sub-goal. Figure (7) shows how backward chaining works, using the rules for the forward chaining example. In Pi 1, the inference engine attempts to infer fact Z. It searches the knowledge base to find the rule that has the goal, in our case fact Z, in its THEN part, The inference engine finds and stacks Rule 1: Y &D > Z. The 19Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis IF part of Rule 1 includes facts Y and D, and thus these facts must be established. In Pass 2, the inference engine sets up the sub-goal, fact Y, and tries to determine it. First it checks the database, but fact Y is not there. Then the knowledge base is searched again for the rule with fact Y in its THEN part. The inference engine locates and stacks Rule 2: X&B&E > Y. The IF part of Rule 2 consists of facts Xy B and E, and these facts also have to be established. In Pass 3, the inference engine, sets up a new sub-goal, fact X. It checks the database for fact X, and ‘whetsthat fails, searches for the rule that infers X. The inferenc engine firids and stacks Rule 3: A> X. Now it must determine fact A. In Pass 4, the inférelie engine finds fact A in the database, Rule 3: A > X is fired and new fact X is inferred. In Pass 5, the inference engine retums to the sub-goal fact Y and onc@again tries to execute Rule 2: X&B&E > Y. Facts X, B and E are in the'databastand thus Rule 2 is fired and a new fact, fact Y, is added to the database,In Pass 6, the system returns to Rule 1: Y &D > Z trying to establish the original\goal, fact Z. The IF part of Rule 1 matches all facts in the databaséyRule | is executed and thus the original goal is finally established. 20ess 3 Bates aleleLole ALICE re rn ® @ Arlo bas I Koowlodgs hese Aoonke ba Yao zp—1 YaD>z Yaz eBtE>¥| Masatsyj—! [Rebaesy fox rE: Ao! 30 cot CL TaN tama TaNow oe Z subgoa¥ Subgoal x pass 4 acs 5 Pass 6 Dstbase Bitabose Database 4 —_ v 4 1 alelcLoLe aLeLeIole 3] Dh xLy Ya | ee Met Neton Fre Wetch Fre Atos bass Actors base Aroulegebnse YaD>7 YRD>Z ney Kapa] | Frapaes] Kabaesy| ao ADK aoa ost Ook Ck Taw oN Ten Wi Tan ow subgoa x subsoat ¥ GoalZ Figure (7): Backward chaining Let us now compare Figure (6) with Figure (7). As you can see, four rules were fired when forward chaining was used, but just three rules when we applied backward chaining, This simple example shows that the backward chaining inference technique is more effective when we need to infer one particular fact, in our case fact Z. In forward chaining, the data is known at the beginning of the 2Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis inference process, and the user is never asked to input additional facts. In backward chaining, the goal is set up and the only data used is the data needed to support the direct line of reasoning, and the user may be asked to input any fact that is not in the database. 12.3 How do we choose between forward and backward chaining? The answer is to study how a domain expert solves a problem. If an éxpeftfitst needs to gather some information and then tries to infer from“it whatever can be inferred, choose the forward chaining inference engine. HoWever, if your expert begins with a hypothetical solution and then attempts to find facts to prove it, choose the backward chaining inference engine. and Forward chaining is a natural way to desigiexpert”systems for analys interpretation. For example, DENDRAC, an/éxpéit system for determining the molecular structure of unknown soil based.on its mass spectral data, uses forward chaining. Most backward chaining’expert systems are used for diagnostic purposes. For instance, MYCIN, a medicaltexpert system for diagnosing infectious blood diseases, uses backward ¢haining. 12.4 Can wecombine forward and backward chai Many expert systeftyshells use a combination of forward and backward chaining inference techniques, so the knowledge engineer does not have to choose between them: HWever, the basic inference mechanism is usually backward chaining. Only when a few fact is established is forward chaining employed to maximize the use of the new data. 13. Advantages and disadvantages of rule-based expert systems Rule-based expert systems are generally accepted as the best option for building knowledge-based systemsChapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis Which features make rule-based expert systems particularly attractive for knowledge engineers? Among these features are: 1- Natural knowledge representation, An expert usually explains the problem solving procedure with such expressions as this: ‘In such-and-such situation, 1 do. so-and-so’, These expressions can be represented quite naturally as IETHEN: production rules. 2- Uniform structure. Production rules have the uniformlE=THEN" structure. Each rule is an independent piece of knowledge. The very syntax’ of production rules enables them to be self-documented. 3- Separation of knowledge from its processing, The structure of a rule-based expert system provides an effective separation ofthe knowledge base from the inference engine. This makes it possible to develop different applications using the same expert system shell. It also allows a graceful and easy expansion of the expert system. To make the system smarter, alknowledge engineer simply adds some rules to the knowledge base without intervening in the control structure. 4- Dealing with incomplete and uncertain knowledge. Most rule-based expert systems are capable Of representing and reasoning with incomplete and uncertain knowledge. For example, the rule IF seasoftis autumn AND sky’is ‘cloudy’ AND wind is low THEN forecast is clear { ef 0.1 }; forecast is drizzle { ef 1.0 }; forecast is rain { cf 0.9 } could be used to express the uncertainty of the following statement, ‘If the season is autumn and it looks like drizzle, then it will probably be another wet day today’. 23Chapter Three: Rule-Based Expert Systems Prepared By: Dr Muhanad Tahir Younis The rule represents the uncertainty by numbers called certainty factors {cf 0.1g}. The expert system uses certainty factors to establish the degree of confidence or level of belief that the rule’s conclusion is true. Alll these features of the rule-based expert systems make them highly desirable for knowledge representation in real-world problems. Are rule-based expert systems problem-free? There are three main shortcomings: 1+ Opaque relations between rules. Although the individual prodtietion rules tend to be relatively simple and self-documented, their logi¢al interactions within the large set of rules may be opaque. Rule-based systenis make it difficult to observe how individual rules serve the overall strategy ‘Thi8 problem is related to the lack of hierarchical knowledge representation in thé rule-based expert systems. 2. Ineffective search strategy. The inferente engine applies an exhaustive search through all the production rules durifig each cycle. Expert systems with a large set of rules (over 100 rules) can belslow, and thus large rule-based systems can be unsuitable for real-time appli¢ations. 3- Inability to lear general, rule-based expert systems do not have an ability to learn¢from,th8jexperience. Unlike a human expert, who knows when to ‘break theaules*, an.expert system cannot automatically modify its knowledge base, or adjust existing rules or add new ones. The knowledge engineer is still responsible for revising and maintaining the system.
You might also like
The Basics of Expert (Knowledge Based) Systems
PDF
No ratings yet
The Basics of Expert (Knowledge Based) Systems
6 pages
RuleBased IA TIP
PDF
No ratings yet
RuleBased IA TIP
68 pages
Lect7- AI-rule-based-expert-systems
PDF
No ratings yet
Lect7- AI-rule-based-expert-systems
47 pages
6
PDF
No ratings yet
6
28 pages
Seminar 1
PDF
No ratings yet
Seminar 1
19 pages
Expert-System
PDF
No ratings yet
Expert-System
12 pages
Expert Systems - Class2 PDF
PDF
No ratings yet
Expert Systems - Class2 PDF
41 pages
BEU 5173 Artificial Intelligence: Rule Based Expert Systems
PDF
No ratings yet
BEU 5173 Artificial Intelligence: Rule Based Expert Systems
33 pages
Expert Systems_class2
PDF
No ratings yet
Expert Systems_class2
41 pages
Unit 5
PDF
No ratings yet
Unit 5
111 pages
Artificial Intelligence Expert Systems
PDF
100% (1)
Artificial Intelligence Expert Systems
12 pages
Expert Systems: BY:-Shavet Tiku MBA (BE) - 2 SEM ROLL NO.-36
PDF
No ratings yet
Expert Systems: BY:-Shavet Tiku MBA (BE) - 2 SEM ROLL NO.-36
18 pages
AI-Unit 5
PDF
100% (1)
AI-Unit 5
6 pages
UNIT5
PDF
No ratings yet
UNIT5
7 pages
An Overview of Expert Systems
PDF
No ratings yet
An Overview of Expert Systems
74 pages
Expert System1 - Rotated
PDF
No ratings yet
Expert System1 - Rotated
15 pages
Expert System Notes
PDF
No ratings yet
Expert System Notes
7 pages
Unit - IV: Expert Systems
PDF
No ratings yet
Unit - IV: Expert Systems
29 pages
EXPERT SYSTEM Is An Interactive and Reliable Computer-Based Decision
PDF
No ratings yet
EXPERT SYSTEM Is An Interactive and Reliable Computer-Based Decision
8 pages
Andersn AI
PDF
No ratings yet
Andersn AI
26 pages
Expert Systems
PDF
No ratings yet
Expert Systems
8 pages
Expert Systems A Tutorial
PDF
No ratings yet
Expert Systems A Tutorial
9 pages
Expert System
PDF
No ratings yet
Expert System
7 pages
Chapter 8: Expert System: What Are Expert Systems?
PDF
No ratings yet
Chapter 8: Expert System: What Are Expert Systems?
9 pages
Artificial Intelligence: Chapter # 04 Expert System
PDF
No ratings yet
Artificial Intelligence: Chapter # 04 Expert System
31 pages
Lecture 5 Expert Systems
PDF
No ratings yet
Lecture 5 Expert Systems
50 pages
What Is An Expert System?
PDF
No ratings yet
What Is An Expert System?
35 pages
Expert Systems
PDF
No ratings yet
Expert Systems
29 pages
Com 423 Expert System and Machine Learning
PDF
No ratings yet
Com 423 Expert System and Machine Learning
19 pages
E X P e R T S y S T e M S
PDF
No ratings yet
E X P e R T S y S T e M S
7 pages
Expert System PDF
PDF
No ratings yet
Expert System PDF
8 pages
Expert System
PDF
No ratings yet
Expert System
19 pages
Introduction To Expert Systems (1 of 2)
PDF
No ratings yet
Introduction To Expert Systems (1 of 2)
27 pages
Lec3-Rule-based Expert Knowledge Basesystems
PDF
No ratings yet
Lec3-Rule-based Expert Knowledge Basesystems
32 pages
Short Report On Expert Systems
PDF
100% (1)
Short Report On Expert Systems
12 pages
AI BSC Cs
PDF
No ratings yet
AI BSC Cs
8 pages
ICT_Notes+Chapter+6.8+Expert+Systems
PDF
No ratings yet
ICT_Notes+Chapter+6.8+Expert+Systems
22 pages
expert system
PDF
No ratings yet
expert system
14 pages
Expert System in AI
PDF
No ratings yet
Expert System in AI
11 pages
An Expert System Is A Computer Program That Is Designed To Hold The Accumulated Knowledge of One or More Domain Experts
PDF
100% (1)
An Expert System Is A Computer Program That Is Designed To Hold The Accumulated Knowledge of One or More Domain Experts
19 pages
Real Time Expert System: Term Paper OF Artificial Intelligence
PDF
No ratings yet
Real Time Expert System: Term Paper OF Artificial Intelligence
10 pages
Rule - Based Expert Systems
PDF
No ratings yet
Rule - Based Expert Systems
8 pages
Part 5 Expert Systems Final
PDF
No ratings yet
Part 5 Expert Systems Final
39 pages
AI_TU_CSE_6
PDF
No ratings yet
AI_TU_CSE_6
73 pages
Week-3 Applications that use expert systems
PDF
No ratings yet
Week-3 Applications that use expert systems
4 pages
Chapter 4 Expert Systems
PDF
No ratings yet
Chapter 4 Expert Systems
27 pages
ISM Research Study
PDF
No ratings yet
ISM Research Study
26 pages
Expert System
PDF
No ratings yet
Expert System
11 pages
Rules For Knowledge Representation
PDF
No ratings yet
Rules For Knowledge Representation
19 pages
Chapter-20 (Expert Systems)
PDF
No ratings yet
Chapter-20 (Expert Systems)
4 pages
SIM4
PDF
No ratings yet
SIM4
14 pages
Experts System
PDF
No ratings yet
Experts System
4 pages
Chapter 2 AI&Expert
PDF
No ratings yet
Chapter 2 AI&Expert
11 pages
Case Study On Expert Systems
PDF
No ratings yet
Case Study On Expert Systems
5 pages
Expert System
PDF
100% (1)
Expert System
54 pages
Expert System
PDF
No ratings yet
Expert System
8 pages
03a04chapter2v4 2
PDF
No ratings yet
03a04chapter2v4 2
50 pages
6th unit Expert systems
PDF
No ratings yet
6th unit Expert systems
19 pages