chp02_3_ExpertSystem

Embed Size (px)

Citation preview

  • 8/7/2019 chp02_3_ExpertSystem

    1/44

    1

    Introduction to Artificial

    Intelligence

    EXPERT SYSTEM

  • 8/7/2019 chp02_3_ExpertSystem

    2/44

    From the Father of Expert System:

    An intelligent program that usesknowledge and reasoning procedureto solve problems that requiresignificant human expertise for their

    solutions.

    - Edward Feigenbaum

    Definition

  • 8/7/2019 chp02_3_ExpertSystem

    3/44

    Definition

    A syste m th at u se s h u m an K cap tu red in aco m p u te r to so lv e p ro b le m s th a t o rd in a rily

    re q u ire h u m a n e xp e rtise

    &T u rb a n A ro n so n( )2001

    A com p u te r p rog ra m th at re p re se n ts an dre a so n s w ith K o f so m e sp e cia list su b je ct

    w ith a v ie w to so lvin g p ro b le m o r g iv in ga d v ice

    ( )Jackson 1 99 9

    A com p u ter p rog ram d esig n ed to m od el th e-

    p ro b le m solvin g a b ility o f a h u m a n e x p e rt

    ( )D u rkin 1 9 9 4

    A com p u te r p rog ra m th at e m u la te s th ere a so n in g o f h u m a n e xp e rts in a p ro b le m

    d o m a in

    ( )A w a d 1 9 9 6

    :Fro m o th e rs

  • 8/7/2019 chp02_3_ExpertSystem

    4/44

    As a field, It is a branch of AI

    As a technology,

    It is the most widely applied AI technology Among the first to be commercialized

    As an application, It is a computer program It transfers (i.e. it acquires and represents)

    practical knowledge (i.e. expertise/rules ofthumb/heuristic) from human expert tocomputer

    Some facts about ES

  • 8/7/2019 chp02_3_ExpertSystem

    5/44

    It reasons (or it thinks) with what ittransfers

    It can either support decision makers (by

    recommending decisions) or

    replace them (by making decisionson behalf of experts, releasingthem from routine tasks).

    3.

    Some other facts aboutES

  • 8/7/2019 chp02_3_ExpertSystem

    6/44

    After all,3.

    Some other facts aboutES

    A n is o n e w h o

    ,p o sse sse s sp e cia lize d skill,exp e rie n ce a n d kn ow le d g e

    th a t m o st p e o p le d o n o th a v e a lo n g w ith th e a b ility

    to a p p ly th is k n o w le d g e, ,u sin g tricks sh o rtcu ts a n d

    - -ru le s o f th u m b to re solve a.p ro b le m e fficie n tly

    & ( )H a rm o n K in g 1 9 8 5

    S replicates a humanexpert .expert

  • 8/7/2019 chp02_3_ExpertSystem

    7/44

    Therefore, ES possess expertise is

    an extensive, task-specific knowledge held

    by experts hard to capture. Capturing it is a major

    issue in ES development, and became amajor concern of Knowledge Acquisitionresearchers.

    With the expertise stored in its knowledge base,ES can provide expertise-based solutionswhich are imaginative, accurate and efficient.

    o m e o th e r fa cts a b o u tE SE xp e rtise

  • 8/7/2019 chp02_3_ExpertSystem

    8/44

    E xp e rt p e rso n n e l is a va lu a b le a sse t fo r(a n y o rg a n iza tio n a s th e y a re g o o d a t

    ,so lv in g o rg a n iza tio n a l p ro b le m s p la n n in g.) e tc ye t th e y a re

    Pe rish a b le a n d irre p la ce a b le G e o g ra p h ica lly sta tic /N o t a v a ila b le 2 4 7 E m o tio n a lly a ffe cte d

    , fe e l fe a r stre ss e tc like o th e r h u m a n.b e in g s

    C o stly to tra in a n d to co n su lt

    .. and some facts about anexpert

  • 8/7/2019 chp02_3_ExpertSystem

    9/44

    So, we have good reasons to build an ES!!

    3 main reasons:To replace human expertTo assist human expert

    To gain competitive advantage

    Reasons for building ES

  • 8/7/2019 chp02_3_ExpertSystem

    10/44

    To replace to eliminate

    Reasons for replacing experts

    To preserve their expertise To disseminate their expertise in lessexpensive manner

    To make expertise available after hours To make expertise available at several

    locations To free experts from routine thus they canfocus on the other critical tasks

    To avoid experts from danger

    Reason 1: To replaceexpert

  • 8/7/2019 chp02_3_ExpertSystem

    11/44

    ES as an aided tool to improve human experts productivity

    maintain consistency in their

    decisions deal with the complexity of the tasks

    make available the information that is

    difficult for experts to recall

    Reason 2: To assistexperts

  • 8/7/2019 chp02_3_ExpertSystem

    12/44

    Due to the benefits this technologycan offer

    Exemplar:

    Digital Equipment Corporation R1/XCON

    American Express

    Authorizers Assistant

    Coopers & Lybrand

    ExperTax

    Reason 3: To gaincompetitive advantage

  • 8/7/2019 chp02_3_ExpertSystem

    13/44

    ES Component

    nowledge base

    orking memory

    nference engineUser

    Interface

  • 8/7/2019 chp02_3_ExpertSystem

    14/44

    -o n g te rm m e m o ry SENSO -h o rt te rm m e m o ry

    B ra in

    T h e co m p o n e n ts a ctu a lly m im ic w h a t is in.h u m a n s

    in comparison withhumans

    =

    K no w led ge ba se

    =

    in

    ter

    face

    = Inference engine

    =W o rkin g m e m o ry

    E n v iro n m e n t=

    /Pe o p le sen sor e tc

    th a t p ro vid e in p u tto o u r b ra in

  • 8/7/2019 chp02_3_ExpertSystem

    15/44

    Knowledge base contains the domainknowledge Facts

    Heuristics or rules that direct use ofknowledge to solve specific problems in aparticular domain.

    Typical representation: Rules (IF x AND y THEN z @ x y z )

    Example (for predicting weather): IF cloudy = yes AND temperature = low AND

    humidity = high THEN it will rain.

    IF cloudy = no AND temperature = high AND

    humidity = lowTHEN it will sunny

    Component 1:Knowledge Base

  • 8/7/2019 chp02_3_ExpertSystem

    16/44

    A storage area for current data i.e. facts entered by user during consultation

    with ES (e.g. symptoms of a disease)

    Input data can also be loaded fromexternal storage such as databases,spreadsheets or sensors.

    Also a place where intermediate

    conclusions or the new facts inferred byES are stored

    Non-permanent content will be deleted

    when the session ends.

    Component 2: WorkingMemory

  • 8/7/2019 chp02_3_ExpertSystem

    17/44

    Known as rule interpreter in rule-basedES.

    Is modelled after human experts

    reasoning.Typically, inference engine utilized 2

    control strategies: Backward Chaining (goal driven)

    determine fact in the conclusion to prove theconclusion is true.

    Forward Chaining (data driven) premise clause match situation then assert

    conclusion.

    Component 3: InferenceEngine

  • 8/7/2019 chp02_3_ExpertSystem

    18/44

    Facilitates all communication between user and ES.

    Communication are in natural language style, interactiveand follow closely the conversation between humans.

    Two types of interaction: ES ask for information through questions, provide

    the results and display the explanation.

    User supply answers, receive the results or query

    the system (i.e. getting explanation)

    Component 4: UserInterface

  • 8/7/2019 chp02_3_ExpertSystem

    19/44

    Two types of explanation:

    WHY Explain why the system asked the question.

    HOW Explain how ES arrived at the conclusion.

    Justify the validity of the systems findings

    increase user confidence and trust

    Component 5: Explanationsub-system

  • 8/7/2019 chp02_3_ExpertSystem

    20/44

    ES Development Process

    EXPERT PROJECTMANAGER

    K SYSTEMDEVELOPER

    ENGINEER/ANALYST

    K MANAGER

    USER

    KS

    manages

    managesuses

    designs &

    implements

    validates

    elicits knowledge from

    elicitsrequirements

    from

    deliversanalysis models to

    defines K strategyinitiates K development projects

    facilitates K distribution

    :ou rc e S ch re ib er t a l . ( )000

  • 8/7/2019 chp02_3_ExpertSystem

    21/44

    Knowledge engineering Methodology for building an ES

    6 phases of knowledge engineering: Problem assessment

    Knowledge acquisition

    Design

    Testing Documentation

    Maintenance

    ES Development Process

  • 8/7/2019 chp02_3_ExpertSystem

    22/44

    ES Development Process

  • 8/7/2019 chp02_3_ExpertSystem

    23/44

    Choice oftools and approaches for developingES includes: Programming languages Support aids and tools Ready-to-use customized packages for

    industry and government

    ES shells

    Which tools to adopt depends on: The nature of the problem The skill of the builder The function ES is expected to perform

    (either diagnoses or monitoring)

    ES Development Tool

  • 8/7/2019 chp02_3_ExpertSystem

    24/44

    Main player in ESDevelopment

    D o m a in ex p e rt Pro v id e kn o w le d g e o r m e th o d to solve

    p ro b le m

    K n ow led g e E n g in ee r G a in kn o w le d g e fro m ex p e rt /Tra n sfe r re p re sen t kn o w le d g e

    in to a co m p u te r

    U se r C an b e the en d

    u se r or exp e rth im se lf

  • 8/7/2019 chp02_3_ExpertSystem

    25/44

    ES has been applied to perform/solve thefollowing task/problem Control meeting certain

    standards/specifications

    Design configuring objects under specificconstraints

    Diagnosis inferring malfunction/diseaseand recommend solutions/treatment

    Planning designing actions

    Monitoring comparing observation toexpectation

    Selection identifying the best choice(s)from a list of actions

    Task/Paradigm

  • 8/7/2019 chp02_3_ExpertSystem

    26/44

    ES has been applied to perform/solve thefollowing task/problem Interpretation infer situation description

    from observation

    Prediction infer likely consequences of thegiven situation

    Debugging prescribe remedies formalfunction

    Repair execute a plan to administer aprescribed remedy

    Instruction diagnose, debug and correctstudents misconception

    Task/Paradigm

  • 8/7/2019 chp02_3_ExpertSystem

    27/44

    Benefits & Limitations

    B E N EFITS LIM IT A T IO N S

    R e d u ce d e cisio n m a kin g tim e W o rk w e llo n ly w ith in a n a rro wd om ain of kn ow led g eIm p ro v e p ro d u ctio n o p e ra tio n s C a n m a ke m ista ke s

    In cre a se o u tp u t a n dp ro d u ctiv ity

    R isk o f kn o w le d g e q u icklyb e com e o b sole teC a n b e u se d a s to o ls fo r sta fftra in in g

    O n g o in g re lia n ce o n e x p e rts

    R e te n tio n o f sca rce e xp e rtise K n o w le d g e is n o t a lw a ysa v a ila b leU p g rad e p e rfo rm an ce D ifficu lt to e xtra ct e x p e rtise

    from h u m a n e xp e rtsR ela tiv e ly a ffo rd a b le e x p e rtise U ser la ck o f tru st ca n im p e d eu seIm p ro v e q u a lity o f

    /p ro d u cts se rvice s

  • 8/7/2019 chp02_3_ExpertSystem

    28/44

    In general, ES works by matching thefacts with its knowledge base content,and display the output to user

    ES .. How it works?

    nowledge base

    orkingmemory

    nference engineUser

    Int

    er

    face

    A

    :12 A BModus !onens

    B

  • 8/7/2019 chp02_3_ExpertSystem

    29/44

    In detail, it depends on what controlstrategy each ESs inference engineutilizes, either forward chaining or

    backward chaining or both The principle of chaining is governed bymodus ponens.

    A B C

    A B C

    Chaining signifies linking of a set of

    pertinent rules.

    ES .. How it works?

    S i

  • 8/7/2019 chp02_3_ExpertSystem

    30/44

    Goal rule A rule in which its conclusion is not a

    premise of any other rules in theknowledge base

    E.g. R1: (A B) C D R2: D G T

    R3: P Q B

    R2 is the goal rule as its conclusion,T, isNOT one of the premises of the other rule

    (i.e. R1 and R3)

    Some importantconcepts

    S i

  • 8/7/2019 chp02_3_ExpertSystem

    31/44

    Sub-goal rule A rule in which its conclusion is also a

    premise of the other rules or in the goalrule.

    E.g. R1: (A B) C D R2: D G T R3: P Q B

    R1 and R3are sub-goal rule as theirconclusions are premises of the other rules

    Conclusion of R1, i.e. D, is a premise ofR2

    Conclusion of R3, i.e. B, is a premise of

    Some importantconcepts

    S i t t

  • 8/7/2019 chp02_3_ExpertSystem

    32/44

    Primitive premise A premise that is not a conclusion of any

    other rules

    E.g.

    R1: (A B) C D R2: D G T R3: P Q B

    A, C, G, P and Qare primitive premises.WHY? Look at the THEN part of R1, R2and R3

    None of these rules has either A or C or G or P orQ as a conclusion.

    Some importantconcepts

    S i t t

  • 8/7/2019 chp02_3_ExpertSystem

    33/44

    Non-primitive premise A premise that is also a conclusion of the

    other rule(s)

    E.g. R1: (A B) C D

    R2: D G T R3: P Q B

    B and D are non-primitive premises. WHY? Look at the IF part of R1 and R3. R1 has D as a conclusion while R3 has B as a

    conclusion.

    Both B and D are premises, at the same time

    they also are conclusions, thus they are non-

    Some importantconcepts

    S i t t

  • 8/7/2019 chp02_3_ExpertSystem

    34/44

    Rule fire A rule fire means rule is concluded. In

    other words, it refers to a state where theconclusion of that rule is proved as true,because its premise(s) is true

    E.g. R1: (A B) C D

    If A and B are true, or if C is true, thenwe say R1 fire with a conclusion Dtrue.

    Rule not fire Is a vice versa of rule fire due to its

    Some importantconcepts

  • 8/7/2019 chp02_3_ExpertSystem

    35/44

    Backward chaining overview An Inference strategy that attempts to prove

    a hypothesis by gathering supportinginformation

    The system works from the goal by chainingrules together to reach a conclusion orachieve a goal

    In other words, it start with the goal, andthen looks for all relevant, supportingpremises that lead to achieving the goal.

    Backward Chaining

  • 8/7/2019 chp02_3_ExpertSystem

    36/44

    B k d Ch i i

  • 8/7/2019 chp02_3_ExpertSystem

    37/44

    With example: R1: (A and B) or C implies D R2: D and G implies T .. goal rule

    1.2.Identify the goal . T.

    3.Identify the goal rule .. R2.

    4.Check R2s first premise, i.e. D

    D is non-primitive . it belongs to R1 asconclusion, so jump to R1.

    Check R1s premises.

    A is primitive. If it is in working memory,continue checking B. If not, ASK user a

    question. If the answer is yes, continuechecking B. If no, check C.

    Backward ChainingSteps

    B k d Ch i i

  • 8/7/2019 chp02_3_ExpertSystem

    38/44

    4.Either A and B are true or C is true, fire R1.

    5.Jump back to R2.

    6.Repeat 3 with R2s second premise, i.e. G.

    G is primitive. If it is in working memory,fire R2. Otherwise, R2 fail to fire andtherefore, the goal cannot be proven.

    7.End of step.

    Backward ChainingSteps

  • 8/7/2019 chp02_3_ExpertSystem

    39/44

    Forward Chaining overview An Inference strategy that begins with a set of

    known facts, derives new facts using ruleswhich premises match the known facts,

    continues until goal reached or no morerules matches.

    Begins with known data and works forward to

    see if any conclusions (new information)can be drawn.

    Forward Chaining

  • 8/7/2019 chp02_3_ExpertSystem

    40/44

    1.Get initial data and place it in working memory.2.Scan the rules searching for matched premises.3.If found

    fire the rule add its conclusion to working memory.

    4.Repeat Steps 2 & 3 until no more match or goal isachieved.

    Forward Chaining Steps

  • 8/7/2019 chp02_3_ExpertSystem

    41/44

    With example: R1: (A and B) or C implies D

    R2: D or G implies T

    1.Get initial data.

    2.Scan the rules in sequence. If A and B are true, or C is true, R1 fires and D is

    inserted into working memory. D will cause R2to fire when R2 is scanned. Process is then

    terminated as all rules have been scanned, andno more match can be done.

    If none of A, B and C true, continue scan the nextrule, i.e. R2. If G is true, R2 fires and T isinserted into working memory. Process is thenterminated as all rules have been scanned, and

    no more match can be done.

    Forward Chaining Steps

  • 8/7/2019 chp02_3_ExpertSystem

    42/44

    What if T is in R1? R1: (A and B) or T implies D

    R2: H or G implies T

    1.Get initial data.

    2.Scan the rules in sequence. If none of A, B andT is true, scanning is continued

    with R2.

    If H or G is true, R2 fires andT is inserted into

    working memory. End of 1st

    cycle withconclusionT.

    The 2ndcycle of scanning and firing rules begins. Tis now in working memory, therefore R1 fires. Dis concluded and inserted into working memory.

    End of 2

    nd

    cycle with conclusions T and D. Themost recent, i.e. D, becomes the final

    Forward Chaining Steps

  • 8/7/2019 chp02_3_ExpertSystem

    43/44

    Conflict resolution A process to determine which rule to fire

    (when the contents of the WM can cause>1 rule to fire)

    Resolution strategy: Establish the goal and stop the system when the

    goal is attained

    The order of the rules that conclude the goal is

    important (the engine will fire the first onelocated).

    Assign rules with the priority values (reflect rulepreferences)

    The system scans the rules, determines the rulesto fire, and fire the ones with highest priority.

    Conflict Resolution

    Backward vs Forward

  • 8/7/2019 chp02_3_ExpertSystem

    44/44

    Attribute Backward Chaining Forward Chaining

    Also known as Goal-driven Data-driven

    Starts from Possible conclusion New data

    Processing Efficient Somewhat wasteful

    Aims for Necessary data Any conclusion (s)

    Approach Conservative/cautious Opportunistic

    Practical if Number of possible finalanswers is reasonable or aset of known alternatives is

    available

    Combinatorial explosioncreates an infinite number ofpossible right answers

    Appropriate for Diagnostic application Scheduling and monitoring

    Example ofapplication

    Selecting a specific type ofinvestment

    Making changes to corporatepension fund

    Backward vs ForwardChaining