1 / 27

Production Systems

Set of production rules – condition/action statements Working memory – set of current facts Recognize-act cycle – Match conditions of the rules against the working memory. Those that match make up the conflict set. A conflict resolution procedure selects a rule which is fired.

Download Presentation

Production Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Set of production rules – condition/action statements Working memory – set of current facts Recognize-act cycle – Match conditions of the rules against the working memory. Those that match make up the conflict set. A conflict resolution procedure selects a rule which is fired. Production Systems

  2. A pure production does not recover from dead ends. If no production rules are enable, the system quits. Other systems allow for backtracking from previous states – restore the working memory and select a different production rule to fire. Backtracking

  3. There are different conflict resolution strategies that range from simple to complex: Don't allow a rule to fire again unless some fact in working memory that met the condition of the rule is changed. Choose the least recently used rule Choose the rule whose condition most recently became true Choose the more specific rule Conflict Resolution

  4. Haunt was a text-based interactive adventure. It was inspired by Advent, although Haunt was a bit over-the-top, and quirky (and a bit buggy). Haunt was developed by me while I was a graduate student at Carnegie Mellon around 1980-1981. At that time, I was involved in research on rule-based systems (working with Allen Newell), and decided that I wanted to use rule-based systems to create a game (inspired by Adventure). Haunt was written in OPS-4, which in turn was written in Interlisp and it was never ported to any other machines, so I'm afraid that Haunt is really dead. I started to port Haunt to OPS-5, but quickly gave up. Haunt was the first rule-based system to have over 1000 rules and it topped out at around 1500. Because of its size, it served as an important data point in early research on building large rule-based systems. Examples: Haunt (Laird)

  5. From Wikipedia: A network of nodes – each node (except the root) corresponds to a pattern in the condition of a rule The path of the root to a leaf specifies the entire condition Essentially the network is a search trie When facts are asserted or modifier, they are propagated along the trie When a leaf is reached, the rule is triggered Rete Algorithm (Forgy)

  6. Advantages: Eliminates or reduces redundancy through the use of node-sharing Stores partial matches Avoids complete re-evaluation of all facts when changes made Allows for efficient retrieval of memory elements when facts are remove Rete Algorithm (cont'd)

  7. Production system used in the R1/Xcon expert system to configure VAXen (1970s) Written in LISP, then BLISS Uses forward-chaining algorithm Uses the RETE algorithm Example - OPS5

  8. (p Holds::Object-Ceiling {(goal ^status active ^type holds ^objid <O1>) <goal>} {(physical-object ^id <O1> ^weight light ^at <p> ^on ceiling) <object-1>} {(physical-object ^id ladder ^at <p> ^on floor) <object-2>} {(monkey ^on ladder ^holds NIL) <monkey>} -(physical-object ^on <O1>) --> (write (crlf) Grab <O1> (crlf)) (modify <object-1> ^on NIL) (modify <monkey> ^holds <O1>) (modify <goal> ^status satisfied) ) OPS5 Example Rule

  9. Rules: ba -> ab ca -> ac cb -> bc Working memory: cbaca will sort to aabcc. Simple Example

  10. If Earnings Trend is Negative Then there will be a loan default Else If Earnings Trend is Positive Then there will be no loan default Else If Earnings Trend is stable Then If Current Ratio Trend is up Then there will be no loan default Else If Current Ratio Trend is down Then there will be loan default Example – Bankruptcy and Default

  11. Forward chaining: If p and q, then assert(p ^ q) If p and p -> q, then assert(q) If p -> r and q -> r and p v q, then assert(r) Backward chaining: If goal(p ^ q), then add goal(p) and goal(q) If goal(p v q), then add goal(p) Question: What do we do about boxes? Example - Logic

  12. Separation of knowledge and control Natural mapping for certain problems Modularity of rules Pattern-directed control Possibility of heuristic control of search Tracing and explanation Possible randomness Plausible model of human behavior Advantages of Production Systems

  13. The ARPA Speech Understanding Research (SUR) (1971) challenge: Accept connected speech, from many cooperative speakers, in a quiet room, using a good microphone, with slight tuning/speaker, accepting 1000 words, using an artificial syntax, in a constrained task, yielding < 10% semantic error, in a few times real time, on a 100 MIPS machine. ARPA Challenge

  14. Conventional segmentation and labeling approach Compiled acoustic models with the lexical representation of words, syntactic production rules for sentences, and set of word boundaries into one large network (finite state machine) Used beam search to find the best match Harpy (Lowerre)

  15. Parallel and synchronous processing for word hypotheses Blackboard architecture for coordinating information KS: waveform analysis, extract acoustic parameters, classify acoustic segments into phonetic classes, recognize words, parse phrases, hypothesize about unknown words of syllables Hearsay-II (Erman, Reddy)

  16. Coordinates multiple processes or knowledge sources (KS) Global data base of partial results, accessible by all KS. Each KS gets data from the blackboard, processes it, and returns the result to the blackboard Each KS works independently, asynchronously Possibly has a scheduler to decide who goes next Blackboard Architecture

  17. Type of knowledge-intensive or strong method problem-solving “Knowledge is king” - Inference engine of lesser importance Model of human problem solving Gather knowledge from human sources – experts, books, articles, manuals Expert Systems

  18. Rules sets can be modular Can combine knowledge from difference sources (be wary of differences) Can inspect reasoning process, explanation facility Easy to add/delete/modify rules Reason heuristically Reason stochastically Advantages of Expert Systems

  19. Interpretation – form conclusions from data Prediction – give probable consequences in a give situation Diagnosis – determine the cause given the symptoms Design/Planning – find a configuration or list of steps to accomplish a goal Monitoring – compare current behavior to expected behavior Use of Expert Systems

  20. Knowledge base – set of production rules General knowledge Case specific information Inference engine User interface Knowledge base editor Explanation subsystem Components of an Expert System

  21. Knowledge engineer Domain expert End User Roles in Creating an Expert System

  22. Expert systems are expensive to create – a considerable investment of human time and money – but relatively inexpensive to use When to Create an Expert System

  23. The need justifies the cost Human expertise may not be available in the field The problem may be solved using symbolic reasoning The problem domain is well-structured No common sense reasoning needed Human experts exist Traditional methods don't work Criteria

  24. Similar to program development cycle: Define problem Construct prototype Test/use system Debug/Modify If necessary, start over again Final evaluation, alpha-testing, beta-testing, release Maintenance Development Cycle

  25. One difference between an expert and a novice is that the expert has conceptual model(s) for organizing information and rules, that is a set of concepts that are not apparent in the data, but are a way to group together different elements and reason about them. For example, aerobic vs. anaerobic bacteria, the electrical system of a car, leaf classification for trees. Conceptual Models

  26. Mycin Prospector Dendral OPS5 Expert Systems – Classic Exs.

  27. An advantage of expert systems is that one can segregate the knowledge base for a specific problem from the general system. Removing the knowledge base leaves an expert system shell that can be used for other domains, e.g., MYCIN -> EMYCIN. Expert System Shells

More Related