1 / 82

CPE/CSC 481: Knowledge-Based Systems

CPE/CSC 481: Knowledge-Based Systems. Dr. Franz J. Kurfess Computer Science Department Cal Poly. Usage of the Slides. these slides are intended for the students of my CPE/CSC 481 “Knowledge-Based Systems” class at Cal Poly SLO

Télécharger la présentation

CPE/CSC 481: Knowledge-Based 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. CPE/CSC 481: Knowledge-Based Systems Dr. Franz J. Kurfess Computer Science Department Cal Poly

  2. Usage of the Slides • these slides are intended for the students of my CPE/CSC 481 “Knowledge-Based Systems” class at Cal Poly SLO • if you want to use them outside of my class, please let me know (fkurfess@calpoly.edu) • I usually put together a subset for each quarter as a “Custom Show” • to view these, go to “Slide Show => Custom Shows”, select the respective quarter, and click on “Show” • To print them, I suggest to use the “Handout” option • 4, 6, or 9 per page works fine • Black & White should be fine; there are few diagrams where color is important

  3. Introduction Knowledge Representation Semantic Nets, Frames, Logic Reasoning and Inference Predicate Logic, Inference Methods, Resolution Reasoning with Uncertainty Probability, Bayesian Decision Making Expert System Design ES Life Cycle CLIPS Overview Concepts, Notation, Usage Pattern Matching Variables, Functions, Expressions, Constraints Expert System Implementation Salience, Rete Algorithm Expert System Examples Conclusions and Outlook Course Overview

  4. Motivation Objectives Chapter Introduction Review of relevant concepts Overview new topics Terminology R1/XCON System Configuration Knowledge Representation Reasoning MYCIN Human Resources ES OSHA Hazard Awareness Advisor Gensym G2 Real-Time Expert System Important Concepts and Terms Chapter Summary Overview ES Examples

  5. Logistics • Introductions • Course Materials • textbooks (see below) • lecture notes • PowerPoint Slides will be available on my Web page • handouts • Web page • http://www.csc.calpoly.edu/~fkurfess • Term Project • Lab and Homework Assignments • Exams • Grading

  6. Bridge-In

  7. Pre-Test

  8. Motivation • reasons to study the concepts and methods in the chapter • main advantages • potential benefits • understanding of the concepts and methods • relationships to other topics in the same or related courses

  9. Objectives • regurgitate • basic facts and concepts • understand • elementary methods • more advanced methods • scenarios and applications for those methods • important characteristics • differences between methods, advantages, disadvantages, performance, typical scenarios • evaluate • application of methods to scenarios or tasks • apply • methods to simple problems

  10. R1/XCON • one of the first commercially successful expert systems • application domain • configuration of minicomputer systems • selection of components • arrangement of components into modules and cases • approach • data-driven, forward chaining • consists of about 10,000 rules written in OPS5 • results • quality of solutions similar to or better than human experts • roughly ten times faster (2 vs. 25 minutes) • estimated savings $25 million/year

  11. System Configuration • complexity • tens or hundreds of components that can be arranged in a multitude of ways • in theory, an exponential problem • in practice many solutions ``don't make sense'', but there is still a substantial number of possibilities • components • important properties of individual components • stored in a data base • constraints • functional constraints derived from the functions a component performs • e.g. CPU, memory, I/O controller, disks, tapes • non-functional constraints • such as spatial arrangement, power consumption,

  12. Knowledge Representation • configuration space • constructed incrementally by adding more and more components • the correctness of a solution often can only be assessed after it is fully configured • subtasks are identified • make the overall configuration space more manageable • component knowledge • retrieved from the external data base as needed • control knowledge • rules that govern the sequence of subtasks • constraint knowledge • rules that describe properties of partial configurations

  13. Example Component • partial description of RK611* disk controller • facts are retrieved from the data base and then stored in templates RK611* Class: UniBus module Type: disk drive Supported: yes Priority Level: buffered NPR Transfer Rate: 212 . . .

  14. Example Rule • rules incorporate expertise from configuration experts, assembly technicians, hardware designers, customer service, etc. Distribute-MB-Devices-3 If the most current active context is distributing Massbus devices • & there is a single port disk drive that has not been • assigned to a Massbus • & there are no unassigned dual port disk drives • & the number of devices that each Massbus • should support is known • & there is a Massbus that has been assigned • at least one disk drive and that should support • additional disk drives • & the type of cable needed to connect the disk drive • to the previous device is known Then assign the disk drive to the Massbus

  15. Configuration Task • check order; identify and correct omissions, errors • configure CPU; arrange components in the CPU cabinet • configure UniBus modules; put modules into boxes, and boxes into expansion cabinets • configure panels; assign panels to cabinets and associate panels with modules • generate floor plan; group components and devices • determine cabling; select cable types and calculate distances between components • this set of subtasks and its ordering is based on expert • experience with manual configurations

  16. Reasoning • data-driven (forward chaining) • components are specified by the customer/sales person • identify a configuration that combines the selected components into a functioning system • pattern matching • activates appropriate rules for particular situations • execution control • a substantial portion of the rules are used to determine what to do next • groups of rules are arranged into subtasks

  17. Performance Evaluation • notoriously difficult for expert systems • evaluation criteria • usually very difficult to define • sometimes comparison with human experts is used • empirical evaluation • Does the system perform the task satisfactorily? • Are the users/customers reasonably happy with it? • benefits • faster, fewer errors, better availability, preservation of knowledge, distribution of knowledge, etc. • often based on estimates

  18. Development of R1/XCON • R1 prototype • the initial prototype was developed by Carnegie Mellon University for DEC • XCON commercial system • used for the configuration of various minicomputer system families • first VAX 11/780, then VAX 11/750, then other systems • reimplementation • more systematic approach to the description of control knowledge • clean-up of the knowledge base • performance improvements

  19. Extension of R1/XCON • addition of new knowledge • wider class of data • additional computer system families • new components • refined subtasks • more detailed descriptions of subtasks • revised descriptions for performance or systematicity reasons • extended task definition • configuration of ``clusters'' • tightly interconnected multiple CPUs • related system XSEL • tool for sales support

  20. Summary R1/XCON • commercial success • after initial reservations within the company, the system was fully accepted and integrated into the company's operation • widely cited as one of the first commercial expert systems • domain-specific control knowledge • the availability of enough knowledge about what to do next was critical for the performance and eventual success of the system • suitability of rule-based systems • appropriate vehicle for the encoding of expert knowledge • subject to a good selection of application domain and task

  21. MYCIN based on a presentation by Adam Gray, CSC 481 W04 some modifications by Franz J. Kurfess, W05, W06 A. Gray, 2004

  22. Overview • History • DENDRAL • MYCIN • Background • Knowledge Representation • Knowledge Manipulation • Uncertainty • Performance Evaluation • Advantages and Problems • References A. Gray, 2004

  23. MYCIN Background • Medical expert system • Developed at Stanford in the 1970s by Feigenbaum, Buchanan and Ted Shortliffe (a doctor) • Recommended therapy for blood/meningitis infections • the diagnosis normally involved growing cultures of the infecting organism (48 hours) • Doctors had to come up with quick guesses about likely problems • Prescribe drugs to deal with immediate problems • Developed to explore how doctors make these rough, but important, guesses with partial information • Also important in practice as there are many junior doctors or non-specialized doctors A. Gray, 2004

  24. MYCIN Implementation • Goal-directed system that uses a basic backward-chaining technique • 450 Rules written in LISP • Performed as well as some experts and significantly better than junior doctors • Never actually used in practice • Not due to its performance • But rather ethical and legal issues A. Gray, 2004

  25. Example Rule • If • The site of the culture is blood • The gram of the organism is neg • The morphology of the organism is rod • The burn of the patient is serious Then there is weakly suggestive evidence (0.4) that the identity of the organism is pseudomonas A. Gray, 2004

  26. Representation • Rules had no variables, contexts instead • MYCIN dealt with a number of implicit variables • For example there could be a patient, a culture, a few infectious organisms. • MYCIN’s knowledge structured into “object-parameter-value” triples • “culture” would be an object • “site” would be a parameter of “culture” • a possible value of this parameter would be “blood” A. Gray, 2004

  27. Manipulation • MYCIN starts out with a rule that says • If there is an organism requiring therapy, then, compute the possible therapies and pick the best one • First tries to see if the disease is known • if it isn’t begins reasoning process • Basic routine in MYCIN • attempt to find the value of a parameter A. Gray, 2004

  28. Finding Values • Depending on the type of data may ask user if the value is known • Tried to ask the most general question possible, so as not to become annoying or repetitive • E.g., if MYCIN wants to know if morphology of organism is rod, will ask “What is morphology of organism?” rather than a specific question repeatedly • Format of KR is supposed to make questions reasonable • If the value is not know, MYCIN does backward chaining • Stores a list of rules that might yield a value for each parameter A. Gray, 2004

  29. Uncertainty • Medical field must reason in the presence of unknown, incomplete, vague or uncertain information • MYCIN used “certainty factors” • initially hard to defend from a sound theoretical viewpoint • theoretical foundations were established later (Dempster-Shafer) • useful to see where knowledge about uncertainty exists, and the implications it has for the design of the system A. Gray, 2004

  30. Certainty Factors • Range from –1 (positive it is not the case) to +1 (positive it is the case). • MYCIN maintains certainty for • possible values of parameters (ultimately, the certainty that you have a particular disease) • can maintain multiple possible values, each with its own certainty • validity of a rule • MYCIN has rules for combining the certainty factors A. Gray, 2004

  31. Performance Evaluation • Shortliffe used • 10 sample problems • 8 other therapy recommenders • 5 faculty at Stanford Med. School, 1 senior resident, 1 senior postdoctoral researcher, 1 senior student • 8 impartial judges gave 1 point per problem • Max score was 80 • MYCIN: 65, Faculty: 40-60, Fellow: 60, Resident: 45, Student: 30 A. Gray, 2004

  32. Controls • Judges’ bias for/against computers • Judges did not know who recommended each therapy • Difficulty of problems • Medical student did badly, so problems not easy • Level of Interest • Hypothesis in MYCIN that “knowledge is power” • Have groups with different levels of knowledge A. Gray, 2004

  33. Good Points • MYCIN was good in that • It could calculate dosages very precisely • Dealt well with interactions between drugs • An area in which humans have trouble • Possesses nice explanation facilities • Retrieves and displays relevant rules to offer explanation of its behavior A. Gray, 2004

  34. Difficulties • Narrow in scope • did not scale up well to larger problems • Practical concerns • Doctors have reservations about advise from computers • Legal issues A. Gray, 2004

  35. References • E. H. Shortliffe, F. S. Rhame, S. G. Axline, S. N. Cohen, B. G. Buchanan, R. Davis, A. C. Scott, R. Chavez-Pardo, & W. J. van Melle. “MYCIN: A computer program providing antimicrobial therapy recommendations”. Clinical Medicine, (Issue):34, 1975. • E. H. Shortliffe. “MYCIN: A rule-based computer program for advising physicians regarding antimicrobial therapy selection”. Proceedings of the ACM National Congress (SIGBIO Session), 739. 1974. • Giarratano, J. and G. Riley, ``Expert Systems – Principles and Programming'' 3rd Edition, PWS Publishing Company, 1998. • “MYCIN: A Quick Case Study”. <http://www.cee.hw.ac.uk/~alison/ai3notes/section2_5_5.html>. • Russel, Stuart J. and Peter Norvig. “Artificial Intelligence, A Modern Approach”. Prentice-Hall, Inc., 2003. A. Gray, 2004

  36. Human Resources Expert System • expert systems to determine conditions and entitlements for public employees in New South Wales, Australia • main user groups • employees • managers • HR staff • accessible via Internet • http://www.premiers.nsw.gov.au/WorkAndBusiness/WorkingForGovernment/HRExpert.htm • some functionality limited to authorized users • not available anymore when tested on 02-19-09 • developed by Softlaw Corporation http://www.softlaw.com.au

  37. Objectives • improve HR advice and information • quality, consistency, timeliness • enable value-adding strategic functions • e.g. work force planning • extend use of technology from transaction-based ES to advice and information systems

  38. HR Expert Principles • enhanced electronic decision tree • on-line inquiries from users determine branches • accessible via official HR web sites • integrated with source documents • legislation, personnel handbook, etc.

  39. HR Expert: Inquiries

  40. HR Expert: Service History

  41. Output • summary screens • reports • letters • applications and forms • audit reports

  42. HR Expert: Summary Report

  43. HR Expert: Full Report

  44. Project • phase 1 - pilot project • 3 agencies, 1,250 staff, conducted in 2002-3 • demonstrated potential savings, user satisfaction, qualitative benefits • phase 2 • extension to all relevant conditions and entitlements • to be operational by May 2004 • cited in the report of the Australian Government - Information Management office as an example • technology • legislative rulebase technology, STATUTE Expert, by Softlaw Corp., Canberra, Australia, http://www.softlaw.com.au

  45. employees immediate and up to date information about conditions and entitlements easy access for inquiries improved data for decisions increased equity on-demand generation of reports standardized outputs and audit reports Human Resources direct access to information about entitlements less tedious work e.g. looking up information when employees need it reduced need for repetitive work more consistent decisions on-demand generation of reports standardized reports Benefits

  46. Issues • some of the input provided by the users • not always accurate, up to date • only generic conditions and entitlements • special cases not included • limited coverage • not all laws and regulations included • requires computer and Web access • commitment and buy-in from staff and employees

  47. Status • operational and in use • update to include recent changes in laws and regulations under way • current modules • Maternity Leave • Study Time • Extended Leave • Recognition of Previous Service • Leaving the Service • Voluntary Redundancy • Travel Compensation, including Meal and Private Motor Vehicle Allowances • Higher Duties A • llowance Salary • Packaging Agency • List Inquiry

  48. RuleBurst Demo • a Flash demo of the RuleBurst enviroment is available at http://www.ruleburst.com/uploads/files/RuleBurst.html • a predecessor of RuleBurst was used to develop the HR Expert application

  49. References • HR Expert Case Study at http://www.agimo.gov.au/resources/ppt/2003/030926sb • NSW governmental web site at http://www.premiers.nsw.gov.au/WorkAndBusiness/WorkingForGovernment/HRExpert.htm • Australian Government Information Management Office Report at http://www.agimo.gov.au/publications/2004/05/egovt_challenges/accountability/determinations/conclusion • Softlaw Corporation Web site http://www.softlaw.com.au • Softlaw HR Expert Announcement http://www.softlaw.com.au/content.cfm?categoryid=12&topicid=49&infopageid=152 • RuleBurst KB Development Environment http://www.ruleburst.com/ sites visited 03-02-05, 02-28-06

  50. OSHA Hazard Awareness Advisor • asks questions about workplace activities, equipment, materials • analyzes the user’s answers • generates a report with common occupational hazards, applicable OSHA standards, and contacts • developed by the U.S. Department of Labor, Occupational Safety & Health Administration (OSHA) • version 1.0 released in September 1999 • http://www.osha.gov/dts/osta/oshasoft/hazexp.html

More Related