Upload
sagar-sharma
View
343
Download
2
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
BITS PilaniPilani Campus
Expert System
Sagar Kr. Sharma
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Artificial Intelligence
Artificial Intelligence (AI) is the part of computer science concerned with designing intelligent computer systems, that is, systems that exhibit the characteristics we associate with intelligence in human behavior – understanding language, learning reasoning, solving problems and so on.
Barr and Feigenbaum, 1981
AI = “Making computers think like people.”
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Artificialintelligence
Robotics
Visionsystems
Learningsystems
Natural languageprocessing
Neural networks
Expert systems
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Expert System
A branch of Artificial Intelligence that makes an extensive use of specialized knowledge to solve problems at the level of an human expert.
“An expert system is a computer system that emulates, or acts in all respects, with the decision-making capabilities of a human expert.” Professor Edward Feigenbaum
Stanford University
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Why do we need Expert Systems
• Increased availability• Reduced Danger• Reduced Cost • Multiple expertise• Increased Reliability• Explanation facility• Fast Response• Steady, emotional & complete response • Intelligent tutor
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Complete structure of expert system
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Expert System components
• Working Memory– A global database of facts used by the system
• Knowledge Base – Contains the domain knowledge
• Inference Engine – The brain of the Expert system. Makes logical deductions based upon the
knowledge in the KB. • User Interface
– A facility for the user to interact with the Expert system.• Explanation Facility
– Explains reasoning of the system to the user• Knowledge Acquisition Facility
– An automatic way to acquire knowledge
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Knowledge Types
• The knowledge base of expert system contains both factual and heuristic knowledge.
– Factual knowledge is that knowledge of the task domain that is widely shared, typically found in textbooks or journals, and commonly agreed upon by those knowledgeable in the particular field.
• The capital of Italy is Rome • A day consists of 24 hours • Bacteria type a causes Flu type B
– Heuristic knowledge is the less rigorous, more experiential, more judgmental knowledge of performance.
• For instance, in a medical expert system - if patient has spots, it’s probably chickenpox
• In a mechanical trouble shooting system - if engine doesn’t turn over, check battery
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Inference engine cycles via a match-fire procedure
Knowledge Base
Database
Fact: A is x
Match Fire
Fact: B is y
Rule: IF A is x THEN B is y
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Conflict Resolution
• Conflict Resolution is a method that is used when more than one rule is matched on the facts asserted. There are several approaches– First in first serve
• It involves firing the first rule that matches the content of the working memory or the facts asserted.
– Last in first serve
• The rule applied will be the last rule that is matched.
– Prioritization:• The rule to apply will be selected based on priorities set on rules, with
priority information usually provided by an expert or knowledge engineer.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Conflict Resolution
• Specificity - The rule applied is usually the most specific rule, or the rule that matches the most facts.
• Recency - The rule applied is the rule that matches the most recently derived facts.
• Fired Rules - Involves not applying rules that have already been used.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Conflict Resolution (example)
First we'll look at a very simple set of rules:
1. IF (lecturing X) AND (marking- practicals X) THEN ADD (overworked X)
2. IF (month February) THEN ADD (lecturing Alison)
3. IF (month February) THEN ADD (marking- practicals Alison)
4. IF (overworked X) OR (slept-badly X) THEN ADD (bad-mood X)
5. IF (bad-mood X) THEN DELETE (happy X)
6. IF (lecturing X) THEN DELETE (researching X)
7. IF (marking – praticals X) THEN ADD(Needsrest X)
Here we use capital letters to indicate variables
(month February)
(researching Alison)(overworked Alison)
• First-serve apply Rule 2• Last in first serve apply rule 3
(month February) (researching Alison)(overworked Alison) (marking- practicals Alison)
• Recency Apply Rule that match most recent factRule # 7
• Fired Rules – don’t fire the same rule again
• Specificity: If we had two rules but one of them matched more facts than we’’ chose that rule
• Prioritization If we add priority to these rules then the higher priority rule will be fired
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Problem-solving Models
• Forward-chaining – starts from a set of conditions and moves towards some conclusion
• Backward-chaining – starts with a list of goals and the works backwards to see if there is any data that will allow it to conclude any of these goals.
• Both problem-solving methods are built into inference engines or inference procedures
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Forward Chaining
• The rules are of the form:left hand side (LHS) ==> right hand side (RHS).
• The execution cycle is– Select a rule whose left hand side conditions match the
current state as stored in the working storage.
– Execute the right hand side of that rule, thus somehow changing the current state.
– Repeat until there are no rules which apply.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Forward Chaining
• Facts are represented in a working memory which is continually updated.
• Rules represent possible actions to take when specified conditions hold on items in the working memory.
• The conditions are usually patterns that must match items in the working memory, while the actions usually involve adding or deleting items from the working memory.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Forward Chaining (example)
First we'll look at a very simple set of rules:
1. IF (lecturing X) AND (marking- practicals X) THEN ADD (overworked X)
2. IF (month February) THEN ADD (lecturing Alison)
3. IF (month February) THEN ADD (marking- practicals Alison)
4. IF (overworked X) OR (slept-badly X) THEN ADD (bad-mood X)
5. IF (bad-mood X) THEN DELETE (happy X)
6. IF (lecturing X) THEN DELETE (researching X)
Here we use capital letters to indicate variables
(month February) (happy Alison) (researching Alison)
• Rule 2 & 3 let’s assume rule 2 chosen(lecturing Alison) (month February) (happy Alison) (researching Alison)
• Rule 3 & 6 apply, assume rule 3 chosen, This cycle continues and we end up with
(bad-mood Alison) (overworked Alison) (marking- practicals Alison) (lecturing Alison) (month February)
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example of Forward Chaining System
• XCON– Developed by DEC to configures computers. – Starts with the data about the customer order and
works forward toward a configuration based on that data.
– Written in the OPS5 (forward chaining rule based) language.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Backward Chaining System
If the conclusion is known (goal to be achieved) but the path to that conclusion is not known, then reasoning backwards is called for, and the method is backward chaining.
• The consequence part of rule specifies combinations of facts (goals) to be matched against Working Memory.
• The condition part of the rule is then used as a set of further sub-goals to be proven / satisfied.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Backward Chaining
• Start with a goal state• System will first check if the goal matches the initial
facts given. If it does, the goal succeeds. If it doesn't, the system will looks for rules whose conclusions match the goal.
• One such rule will be chosen, and the system will then try to prove any facts in the preconditions of the rule using the same procedure, setting these as new goals to prove.
• Needs to keep track of what goals it needs to prove its main hypothesis.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Backward Chaining (example)
1. IF (lecturing X) AND (marking- practicals X) THEN (overworked X)
2. IF (month February) THEN (lecturing Alison)
3. IF (month February) THEN (marking- practicals Alison)
4. IF (overworked X) THEN (bad-mood X)
5. IF (slept-badly X) THEN (bad-mood X)
6. IF (month February) THEN (weather cold)
7. IF (year 1993) THEN (economy bad )
• initial facts: (month February) (year 1993)
• Goal that has to be proved: (bad-mood Alison) • The goal is not satisfied by initial
facts.• Rules 4 & 5 apply. Assume 4
chosen• New Goal( overworked Alison)• Rule 1 applies• New Goal (lecturing Alison)
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Expert System Tools
• PROLOG– A programming language that uses backward chaining.
• ART-IM (Inference Corporation) – Following the distribution of NASA's CLIPS, Inference Corporation implemented
a forward-chaining only derivative of ART/CLIPS called ART-IM. • ART (Inference Corporation)
– In 1984, Inference Corporation developed the Automated Reasoning Tool (ART), a forward chaining system.
• CLIPS – – NASA took the forward chaining capabilities and syntax of ART and introduced
the "C Language Integrated Production System" (i.e., CLIPS) into the public domain.
• OPS5 (Carnegie Mellon University)– OPS5 (Carnegie Mellon University) – First AI language used for Production
System (XCON) • Eclipse (The Haley Enterprise, Inc.)
Eclipse is the only C/C++ inference engine that supports both forward and Backward chaining.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ES Development Life Cycles
22
Phase 1Assessment
Phase 2Knowledge Acquisition
Phase 3Design
Phase 4Test
Phase 5Documentation
Phase 6Maintenance
Requirements
Knowledge
Structure
Evaluation
Product
Refinements
Explorations
Reformulations
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ES Development Life Cycles
1. Assessment• Determine feasibility & justification of the problem• Define overall goal and scope of the project• Resources requirement• Sources of knowledge
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ES Development Life Cycles
2. Knowledge Acquisition– Acquire the knowledge of the problem– Involves meetings with expert– Bottleneck in ES development
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ES Development Life Cycles
3. Design– Selecting knowledge representations approach and
problem solving strategies– Defined overall structure and organization of system
knowledge– Selection of software tools– Built initial prototype– Iterative process
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ES Development Life Cycles
4. Testing– Continual process throughout the project– Testing and modifying system knowledge– Study the acceptability of the system by end user– Work closely with domain expert that guide the
growth of the knowledge and end user that guide in user interface design
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ES Development Life Cycles
5. Documentation– Compile all the projects information into a document
for the user and developers of the system such as:• User manual• diagrams• Knowledge dictionary
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ES Development Life Cycles
6. Maintenance– Refined and update system knowledge to meet
current needs
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Some Concepts in Expert Systems and Conventional Systems
Expert Systems
Conventional Systems
Brief Comment
Inferencing Program Flow Inferencing is non-sequential
Knowledge Base Database Knowledge Base contains data and strategies
Object Class Relational Table Object structure is logical not physical
Object Instance Relational Table Record Represents data only, not procedures
Object Attribute Relational Table Field Object attributes are inherited, not redefined
Rule If.. Then Statement Rule execution is not sequential
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Advantages of Expert Systems
• Provide consistent answers for repetitive decisions, processes and tasks.
• Hold and maintain significant levels of information.
• Reduce employee training costs• Centralize the decision making process.• Create efficiencies and reduce the time
needed to solve problems.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Advantages (cont’d)
• Combine multiple human expert intelligences
• Reduce the amount of human errors.• Give strategic and comparative
advantages creating entry barriers to competitors
• Review transactions that human experts may overlook.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
LIMITATIONS
• NARROW DOMAIN• LIMITED FOCUS• INABILITY TO LEARN• MAINTENANCE PROBLEMS• DEVELOPMENTAL COST
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Applications of Expert Systems
• Credit granting• Information management and retrieval• Plant layout• Hospitals and medical facilities• Help desks and assistance• Employee performance evaluation• Loan analysis• Virus detection• Repair and maintenance• Shipping• Marketing• Warehouse optimization
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Applications of Expert Systems
DENDRAL: Used to identify the structure of chemical compounds.
First used in 1965
LITHIAN: Gives advice to archaeologists
examining stone tools
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Applications of Expert Systems
DESIGN ADVISOR:Gives advice to
designers of processor chips
MYCIN:Medical system for
diagnosing blood disorders. First used in 1979
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Applications of Expert Systems
PROSPECTOR:Used by geologists to identify sites for drilling or mining
PUFF:Medical system for diagnosis of
respiratory conditions
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Conclusions
• Very interesting field of AI.• Expert Systems are extremely useful in
the right domain.• They are inflexible and require a lot of
collaboration between a knowledge engineer and a domain expert.
• When implemented correctly, expert systems remove human error from the equation.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
References
• Giarratano, Riley.1994. Expert Systems: Principles and Programming, PWS Publishing Company, Boston. (UBE - 325)
• Gonzales & Dankel, The Engineering of Knowledge Based Systems, Prentice Hall, 1993
• Luger, G., Stubblefield, W.A., Artificial Intelligence: Structures and Strategies for Complex Problem Solving, The Benjamin/Cummings Publishing Company, inc., 1993. (UBE - 34 )
• Awad Elias M.Building Expert Systems: Principals, Procedures and Applications 1996. (UBE- 334)
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
References
• “Expert Systems and Artificial Intelligence”. Engelmore, R., Feigenbaum, E., Chapter 1. http://www.wtec.org/loyola/kb/c1_s1.htm
• “The Origin of Rule-Based Systems in AI”, Davis, R., King, J.
• “Expert System – Wikipedia”, http://en.wikipedia.org/wiki/Expert_system