
dfba6d0b7a9d7685873d0bc2dcc50b34.ppt
- Количество слайдов: 16
Comp 307 Knowledge-Based Systems • Rule-based systems • Reasoning • Limitations, Challenge problems • Text book: III IV
Comp 307 Expert Systems Definition: From Feigenbaum: An Expert system is “an intelligent computer program that uses knowledge and inference procedures to solve problems that are difficult enough to require significant human expertise for their solution. The knowledge of an expert system consists of facts and heuristics'' “Expert System”: task-based definition “Knowledge Based System”: technology-based definition
Comp 307 Knowledge Representation • • Rules Decision trees Decision tables Semantic networks Frames Scripts Object Oriented Representation …
Comp 307 Rule Based Systems • A powerful knowledge representation scheme is “if – then” rules: if <description of situation> then <consequence> • Basis of “rule-based systems” or “expert systems” • First big success story of AI – – – AI systems that solved real problems that couldn’t be solved by traditional programming. Eg R 1 for configuring Vaxes Captured Experts’ knowledge in if-then rules Reasoned with the rules to do diagnosis, classification, design… Could even explain their reasoning but over-hyped, collapsed, emerged again as “Business Rule systems”, ……
Comp 307 Example Rules • If leaves-have-pustules and pustule-colour = orange and leaf-markings = striped and climate-temperature = cool then plant-disease = stripe-rust-fungus • If heart-rate = acceptable and pulse-rate-change-15 min <= 20 and mean-arterial-pressure = acceptable mean-arterial-pressure-change-15 mins <= 15 systolic-blood-pressure = acceptable then hemodynamics = stable
Examples of Knowledge-Based Systems Comp 307 • • • • MYCIN: blood infection diagnosis DENDRAL: inferring molecular structure from mass-spectrometer output PROSPECTOR: analysing geological data XCON/R 1: configuring computer orders GASOIL: designing gas-oil separation systems for offshore oil platforms PATHFINDER IV: lymph node pathology Mortgage approval Building code checking Detecting credit card fraud Plastic formulation Aircraft wing design Copier paper-transport design Help desk (Compaq) Printer configuration aid (MS Windows)
Comp 307 Expert Systems: Architecture
Comp 307 Design Knowledge Based Systems Questions: • • How do you represent the expert's knowledge? How do you reason with the knowledge? How do you represent the particular case? How do you explain the conclusions? • Rules • Backward Chaining does a depth first search starting from the hypotheses (the goal) back to facts it knows or can verify – – Consider rules in order in rule base. Consider conditions in left to right order within rule. • Particular case: facts • The depth first search from hypotheses determines which rules and data are relevant
Comp 307 Simple Rule-based System in Prolog mammal: -f(hair). mammal: -f(milk). bird: -f(feathers). bird: -f(eggs), f(flies). carnivore: -mammal, f(meat). classify(tiger): -carnivore, f(tawny), f(striped). classify(puma): -carnivore, f(black). f(hair). f(black). f(meat). |? -classify(X). X=puma.
Comp 307 backward-chaining • Pick one hypothesis (goal) • Find the rule • Verify each condition in the body of the rule
Comp 307 Backward Chaining Interpreter for each goal Input: A goal G, Set S of rules and facts Output: yes if G is logically implied by S; no otherwise Initialize current goal to G; repeat Choose a goal A from the set of current goals; if A is a fact in S then remove A from current set of goals else if there is no rule in S whose head is A then exit and output no, else begin Choose a rule A : -Body in S, where Body is a set of goals Remove A from current set of goals; Add Body to the current set of goals; end until the current set of goals is empty output yes ;
Comp 307 Backward Chaining: Example Goal: u u w, p. v n, r. w r. p a, b. q a, c, d. r e, p. a b e n
Comp 307 Forward Chaining • Data driving, Data directed reasoning, bottom up – Search from facts to valid conclusions • Given database of true facts: Apply all rules that match facts in the database – Add conclusions to database – Repeat until a goal is reached OR – Repeat until no new facts added –
Comp 307 Forward Chaining Interpreter • Input: a set of goals G, Set S of rules and facts • Output: An element of G logically implied by S Initialize working memory to facts in S; Repeat Choose a rule A: - Body in S; if Body is a subset of working memory then if A is not in working memory then add A to working memory until an element of G is in working memory; output the element of G in working memory
Comp 307 Forward Chaining: Example Goal: u u w, p. v n, r. w r. p a, b. q a, c, d. r e, p. a b e n
Comp 307 Backward Chaining and Forward Chaining Backward chaining (Goal driving, Goal-directed reasoning, top-down) – Search from hypotheses to relevant facts • Good when: – Limited number of hypotheses – Determining truth of facts costs – Very large number of possible facts, mostly irrelevant Forward chaining (Data driving, Data-directed reasoning, bottom-up) – Search from facts to valid conclusions • Good when – Very large number of possible conclusions – True facts known at start Bi-directional reasoning
dfba6d0b7a9d7685873d0bc2dcc50b34.ppt