AI Ch8

Embed Size (px)

Citation preview

  • 7/21/2019 AI Ch8

    1/59

    Ch8Expert System

    Dr. Bernard Chen Ph.D.University of Central Arkansas

    Spring 2!!

  • 7/21/2019 AI Ch8

    2/59

    "#tline Expert System introd#$tion

    %#le&Based Expert System 'oal Driven Approa$h

    Data Driven Approa$h

    (odel&Based Expert System

  • 7/21/2019 AI Ch8

    3/59

    Expert System

    )ntrod#$tion *#man experts are a+le to perform at a

    s#$$essf#l level +e$a#se they kno, a lot a+o#ttheir areas of expertise

    An Expert System#se kno,ledge spe$i-$ toa pro+lem domain to provide expert /#ality0performan$e in that appli$ation area

    As ,ith skilled h#mans1 expert systems tend to+e spe$ialists1 fo$#sing on a narro, set ofpro+lems

  • 7/21/2019 AI Ch8

    4/59

    Expert System

    )ntrod#$tion Be$a#se of their he#risti$1

    kno,ledge intensive nat#re1 expert

    systems generally S#pport inspe$tion of their reasoning

    pro$esses Allo, easy modi-$ation in adding and

    deleting skills from kno,ledge +ase %eason he#risti$ally1 #sing kno,ledge

    to get #sef#l sol#tions

  • 7/21/2019 AI Ch8

    5/59

    Expert System

    )ntrod#$tion Expert systems are +#ilt to solve a ,ide

    range of pro+lems in domain s#$h as

    medi$ine1 math1 engineering1 $hemistry1geology1 $omp#ter s$ien$e1 +#siness1 lo,1defense and ed#$ation

    3hese programs address a variety ofpro+lems1 the follo,ing list is a s#mmary ofgeneral expert system pro+lem $ategories

  • 7/21/2019 AI Ch8

    6/59

    Expert System

    )ntrod#$tion )nterpretation &&& forming high&level

    $on$l#sions from $olle$tions of ra, data

    Predi$tion &&& pro4e$ting pro+a+le$onse/#en$es of given sit#ations

    Diagnosis &&& determining the $a#se ofmalf#n$tions +ased on o+serva+lesymptoms

  • 7/21/2019 AI Ch8

    7/59

    Expert System

    )ntrod#$tion Design &&& -nding a $on-g#ration of

    system $omponents that meets

    performan$e goals ,hile satisfying a setof design $onstrains

    Planning &&& devising a se/#en$e ofa$tions that ,ill a$hieve a set of goalsgiven starting $onditions and r#ntime$onstrains

  • 7/21/2019 AI Ch8

    8/59

    3he Design of %#le&Based

    Expert System5 ar$hite$t#re of a typi$al expert

    system for a parti$#lar pro+lem

    domain.

  • 7/21/2019 AI Ch8

    9/59

    3he Design of %#le&Based

    Expert System 3he hear of the expert system is the

    kno,ledge +ase1 ,hi$h $ontains thekno,ledge of a parti$#lar appli$ation

    domain

    )n a r#le&+ased expert system1 thiskno,ledge is most often represented in

    the form of ifthen

    )n the -g#re1 the kno,ledge +ase $ontains+oth general and $ase&spe$i-$ information

  • 7/21/2019 AI Ch8

    10/59

    3he Design of %#le&Based

    Expert System 3he inferen$e engine applies the kno,ledge to

    the sol#tion of a$t#al pro+lems

    )t is important to maintain this separation ofthe kno,ledge and inferen$e engine +e$a#se (akes it possi+le to represent kno,ledge in a more

    nat#ral fashion Expert system +#ilder $an fo$#s on $apt#ring and

    organi6ing pro+lem&solving kno,ledge than thedetails of $ode implementation Allo, $hange to +e made easily Allo,s the same $ontrol and interfa$e soft,are to +e

    #sed in di7erent systems

  • 7/21/2019 AI Ch8

    11/59

    Sele$ting a pro+lem Expert System involve a $onsidera+le

    investment of money and h#man e7ort

    %esear$hers have developed g#idelinesto determine ,hether a pro+lem isappropriate for expert system sol#tion

    3he need for the sol#tion 4#sti-es the $ostand e7orts of +#ilding an expert system

    *#man expertise is not availa+le in allsit#ation ,here it is needed

  • 7/21/2019 AI Ch8

    12/59

    Sele$ting a pro+lem3he pro+lem domain is ,ell

    str#$t#red and does not re/#ire

    $ommon sense reasoning3he pro+lem may not +e solved #sing

    traditional $omp#ting methods

    Cooperative and arti$#late expertsexist

    3he pro+lem is proper si6e and s$ope

  • 7/21/2019 AI Ch8

    13/59

    ASA Example ASA has s#pported its presen$e in spa$e +y

    developing a 9eet of intelligent spa$e pro+esthat a#tonomo#sly explore the solar system

    3o a$hieve s#$$ess thro#gh years in theharsh $onditions of spa$e travel1 a $raftneeds to +e a+le to radi$ally re$on-g#re its

    $ontrol regimein response to fail#res andthen plan aro#nd these fail#res d#ring itremaining 9ight

  • 7/21/2019 AI Ch8

    14/59

    ASA Example :inally1 ASA expe$ts that the set of

    potential fail#re s$enarios and possi+le

    responses ,ill +e m#$h too large to#sesoft,are that s#pports pre9ighten#meration of all $ontingen$ies

    Livingstone is an implemented kernel fora model&+ased rea$tive self&$on-g#ringa#tonomo#s system

  • 7/21/2019 AI Ch8

    15/59

    ASA Example A long&held vision of model&+ased reasoning

    has +een to #se a single $entrali6ed model tos#pport a variety of engineering tasks

    3he tasks in$l#de keeping&tra$k of developing plans Con-rming hard,are modes

    %e$on-g#ring hard,are Dete$ting anomalies Diagnosis :a#lt re$overy

  • 7/21/2019 AI Ch8

    16/59

    ASA Example

  • 7/21/2019 AI Ch8

    17/59

    ASA Example

    )t $onsist of a heli#m tank

    %eg#lators

    Propellant tanks

    A pair of main engine

    ;at$h valves Pyro valves

  • 7/21/2019 AI Ch8

    18/59

    ASA Example

    3he heli#m tank press#ri6es the t,o propellant tanks1,ith the reg#lators a$ting to red#$e the high heli#mpress#re

  • 7/21/2019 AI Ch8

    19/59

    ASA Example

    3hr#st $an +e provided +y either ofthe main engines and there are a

    n#m+er of ,ays of openingpropellant paths to either mainengine

  • 7/21/2019 AI Ch8

    20/59

    ASA Example

    S#ppose the main engine s#+system has +een$on-g#red to provide thr#st from the leftengine +y opening the lat$h valves leading to it

    And s#ppose this engine fails =overheating>1 sothat is fails to provide the re/#ired thr#st

    3o ens#re that the desire thr#st is provided1 thespa$e$raft m#st +e transitioned to a ne,$on-g#ration in ,hi$h thr#st is no, provided+y the main engine on the right side

  • 7/21/2019 AI Ch8

    21/59

    Sele$ting a pro+lem

    3he primary people involved in +#ilding anexpert system are the knowledge

    engineer1domain expert1 andend user

    3he domain expert is primarily responsi+lefor spelling o#t skills to kno,ledge

    engineer )t is often #sef#l for kno,ledge engineer to

    +e a novi$e in the pro+lem domain

  • 7/21/2019 AI Ch8

    22/59

    Exploratory development$y$le

  • 7/21/2019 AI Ch8

    23/59

    Exploratory development$y$le

    )t is also #nderstood that the prototypemay +e thro,n a,ay if it +e$omes to

    $#m+ersome or if the designers de$ideto $hange their +asi$ approa$h to thepro+lem

    Another ma4or feat#re of expert systemis that the program need never +e$onsidered -nished0

  • 7/21/2019 AI Ch8

    24/59

    "#tline

    Expert System introd#$tion

    %#le&Based Expert System 'oal Driven Approa$h

    Data Driven Approa$h

    (odel&Based Expert System

  • 7/21/2019 AI Ch8

    25/59

    Strategies for state spa$esear$h

    )n data drivensear$h1 also $alled forward$haining1 the pro+lem solver +egins ,ith thegiven fa$ts of the pro+lem and set of legal

    moves for $hanging state 3his pro$ess $ontin#es #ntil =,e hope??> it

    generates a path that satis-es the goal$ondition

  • 7/21/2019 AI Ch8

    26/59

    ti$&ta$&toe0state spa$egraph

  • 7/21/2019 AI Ch8

    27/59

    Strategies for state spa$esear$h

    An alternative approa$h (Goal Driven)is start ,ith thegoal that ,e ,ant to solve

    See ,hat r#les $an generate this goal and determine,hat $onditions m#st +e tr#e to #se them

    3hese $onditions +e$ome the ne, goals it ,ork +a$k to

  • 7/21/2019 AI Ch8

    28/59

    %#le&Based Expert System

    %#le +ased expert system representpro+lem&solving kno,ledge as ifthen

    )t is one of the oldest te$hni/#es forrepresenting domain kno,ledge in anexpert system

    )t is also one of the most nat#ral and,idely #sed in pra$ti$al andexperimental expert system

  • 7/21/2019 AI Ch8

    29/59

  • 7/21/2019 AI Ch8

    30/59

    A #nreal Expert SystemExample%#le ! if

    the engine is getting gas1 andthe engine ,ill t#rn over1then

    the pro+lem is spark pl#gs.%#le 2 if

    the engine does not t#rn over1 andthe lights do not $ome onthenthe pro+lem is +attery or $a+les.

    %#le if the engine does not t#rn over1 andthe lights do $ome on

    then

    the pro+lem is the starter motor.%#le if

    there is gas in the f#el tank1 and

    there is gas in the $ar+#retorthenthe engine is getting gas.

  • 7/21/2019 AI Ch8

    31/59

    3he prod#$tion system at the start of a$ons#ltation in the $ar diagnosti$example.

  • 7/21/2019 AI Ch8

    32/59

    3he prod#$tion system at the start of a$ons#ltation in the $ar diagnosti$example.

    3hree r#les mat$h ,ith this expression in,orking memory r#le !1 21 and

    )f ,e resolve $on9i$ts in favor of thelo,est&n#m+ered r#le1 then r#le ! ,ill -re

    3his $a#se to +e +o#nd to the val#espark pl#gs and the premises of r#le ! to+e pla$ed in the ,orking memory

  • 7/21/2019 AI Ch8

    33/59

    3he prod#$tion systemafter %#le ! has -red.

  • 7/21/2019 AI Ch8

    34/59

    3he prod#$tion systemafter %#le ! has -red.

    ote that there are t,o premises to r#le!1 +oth of ,hi$h m#st +e satis-ed toprove the $on$l#sion tr#e

    So no, ,e need to -nd o#t ,hether 3he engine is getting gas1 and 3he engine ,ill t#rn over

  • 7/21/2019 AI Ch8

    35/59

    3he system after %#le has -red. otethe sta$k&+ased approa$h to goalred#$tion.

  • 7/21/2019 AI Ch8

    36/59

    3he andor graph sear$hed in the$ardiagnosis example1 ,ith the $on$l#sion of

    %#le mat$hing the -rst premise of %#le!.

  • 7/21/2019 AI Ch8

    37/59

    Explanation and3ransparen$y in 'oal&Driven %easoning 3he follo,ing dialog#e +egins ,ith the

    $omp#ter asking the #ser a+o#t the

    goals present in the ,orking memory 'as in f#el tank

    YES

    'as in $ar+#retor

    YES Engine ,ill t#rn over

    WHY

  • 7/21/2019 AI Ch8

    38/59

    Explanation and3ransparen$y in 'oal&Driven %easoning )n general1 the t,o /#estions ans,ered +y

    r#le&+ased expert system are

  • 7/21/2019 AI Ch8

    39/59

    Explanation and3ransparen$y in 'oal&Driven %easoning 3he follo,ing dialog#e +egins ,ith the $omp#ter asking the #ser a+o#t

    the goals present in the ,orking memory 'as in f#el tank

    YES 'as in $ar+#retor

    YES Engine ,ill t#rn over

    WHY

    )t has +een esta+lished that!. 3he engine is getting gas12. 3he engine ,ill t#rn over1 =,e need to kno,>

    So that ,e $an make the $on$l#sion that3hen the pro+lem is the spark pl#gs.0

  • 7/21/2019 AI Ch8

    40/59

    Explanation and3ransparen$y in 'oal&Driven %easoning'as in f#el tankYes'as in $ar+#retor

    YesEngine ,ill t#rn over

    Wy

    )t has +een esta+lished that!. 3he engine is getting gas1

    2. 3he engine ,ill t#rn over13hen the pro+lem is the spark pl#gs.

    How te engine is getting gas

    3his follo,s from r#le

    ifgas in f#el tank1 andgas in $ar+#retor

    tenengine is getting gas.gas in f#el tank ,as given +y the #ser

    gas in $ar+#retor ,as given +y the #ser

  • 7/21/2019 AI Ch8

    41/59

    "#tline

    Expert System introd#$tion

    %#le&Based Expert System 'oal Driven Approa$h

    Data Driven Approa$h

    (odel&Based Expert System

  • 7/21/2019 AI Ch8

    42/59

    Data&Driven %easoning

    3he previo#s example exhi+its goal&driven sear$h. 3he sear$h ,as alsodepth&-rst sear$h

    Breadth&-rst sear$h is more $ommon inData Driven reasoning

    3he algorithm for this $ategory is simple

    $ompare the $ontents of ,orkingmemory ,ith the $onditions of ea$h r#lein the r#le +ase a$$ording to the order ofthe r#les

  • 7/21/2019 AI Ch8

    43/59

    Data&Driven %easoning

    )f a pie$e of information that makes #pthe premise of a r#le is not the

    $on$l#sion of some other r#le1 then that fa$t ,ill +e deemed

    aska+le0

    :or example the engine is getting gasis not aska+le in the premise of r#le !

  • 7/21/2019 AI Ch8

    44/59

    A #nreal Expert SystemExample%#le ! if

    =not aska+le> the engine is getting gas1 andthe engine ,ill t#rn over1then

    the pro+lem is spark pl#gs.%#le 2 if

    the engine does not t#rn over1 and

    the lights do not $ome onthenthe pro+lem is +attery or $a+les.

    %#le if the engine does not t#rn over1 andthe lights do $ome on

    then

    the pro+lem is the starter motor.%#le if

    there is gas in the f#el tank1 and

    there is gas in the $ar+#retorthenthe engine is getting gas.

  • 7/21/2019 AI Ch8

    45/59

    Data&Driven %easoning

  • 7/21/2019 AI Ch8

    46/59

    Data&Driven %easoning

    3he premise1 the engine is getting gas is"3 aska+le1 so r#le ! fails and $ontin#e

    to r#le 2

    3he engine does not t#rn over is aska+le

    S#ppose the ans,er to this /#ery isfalse1 so the engine ,ill t#rn over0 ispla$ed in ,orking memory

  • 7/21/2019 AI Ch8

    47/59

    3he prod#$tion system after eval#atingthe -rst premise of %#le 21 ,hi$h thenfails.

  • 7/21/2019 AI Ch8

    48/59

    3he prod#$tion system after eval#atingthe -rst premise of %#le 21 ,hi$h thenfails.

    %#le 2 fails1 sin$e the -rst of t,oAD premises is false1 ,e move to

    r#le

  • 7/21/2019 AI Ch8

    49/59

    3he data&driven prod#$tion system after$onsidering %#le 1 +eginning its se$ondpass thro#gh the r#les.

  • 7/21/2019 AI Ch8

    50/59

    3he data&driven prod#$tion system after$onsidering %#le 1 +eginning its se$ondpass thro#gh the r#les.

    At this point1 all the r#les have+een $onsidered

  • 7/21/2019 AI Ch8

    51/59

    "#tline

    Expert System introd#$tion

    %#le&Based Expert System 'oal Driven Approa$h

    Data Driven Approa$h

    (odel&Based Expert System

    d l d

  • 7/21/2019 AI Ch8

    52/59

    (odel&Based ExpertSystem

    *#man expertise is an extremely $omplex$om+ination of 3heoreti$al kno,ledge

    Experien$ed +ased pro+lem solving he#risti$s Example of past pro+lems and their sol#tions )nterpretive skills

    3hro#gh years of experien$e1 h#man expert

    develop very po,erf#l r#les for dealing ,ith$ommonly en$o#ntered sit#ations

    3hese r#les are often highly $omplied0

    d l d

  • 7/21/2019 AI Ch8

    53/59

    (odel&Based ExpertSystem

    )n a r#le&+ased expert system example forsemi$ond#$tor fail#re analysis1 a des$riptiveapproa$h might +ase on

    Dis$oloration of $omponents =+#rned&o#t> *istory of fa#lts in similar devi$es "+servation of $omponent +y ele$tron mi$ros$ope

    *o,ever1 approa$hes that #se r#les to linko+servations and diagnosis do not o7er the+ene-ts of a deeper analysis of devi$e@sstr#$t#re and f#n$tion

    ( d l B d E

  • 7/21/2019 AI Ch8

    54/59

    (odel&Based ExpertSystem

    A more ro+#st1 deeply explanatory approa$h,o#ld +egin ,ith a detailed model of thephysi$al str#$t#re of the $ir$#it and

    e/#ations des$ri+ing the expe$ted +ehaviorof ea$h $omponent and their intera$tions.

    A kno,ledge +ased reasoner ,hose analysis

    is fo#nded dire$tly on the spe$i-$ation andf#n$tionality of a physi$al system is $alled a!"DE#-$%SED System

    ( d l B d E

  • 7/21/2019 AI Ch8

    55/59

    (odel&Based ExpertSystem

    3he model +ased system tells its #ser,hat to expe$t1 and ,hen o+servationsdi7er from these expe$tations1 it ,ill lead

    to identi-$ation of fa#lts

    H#alitative model&+ased reasoningin$l#des A des$ription of ea$h $omponent in the devi$e A des$ription of the devi$es@ internal str#$t#re "+servation of the devi$es@ a$t#al performan$e

  • 7/21/2019 AI Ch8

    56/59

    (odel&Based Expert SystemExample

    3he expe$ted o#tp#t val#e are given in => and the a$t#alo#tp#ts in I J

  • 7/21/2019 AI Ch8

    57/59

    (odel&Based Expert SystemExample

    At :1 ,e have a $on9i$t

  • 7/21/2019 AI Ch8

    58/59

  • 7/21/2019 AI Ch8

    59/59

    (odel&Based Expert SystemExample

    :inally1 ,e sho#ld note that in theexample1 there ,as ass#med to +e

    a single fa#lty devi$e.3he ,orld is not al,ays this perfe$t (any other possi+le pro+lems may

    o$$#r