Professional Documents
Culture Documents
GIO TRNH
H CHUYN GIA
PGS.TS. PHAN HUY KHNH
NNG 9-2004
Mc lc
CHNG 1
M U
........................................................................................................................7
I.
GII THIU H CHUYN GIA ............................................................................................7
I.1.
H chuyn gia l g ?......................................................................................7
I.2.
c trng v u im ca h chuyn gia.......................................................9
I.3.
S pht trin ca cng ngh h chuyn gia....................................................9
I.4.
Cc lnh vc ng dng ca h chuyn gia ...................................................10
II. KIN TRC TNG QUT CA CC H CHUYN GIA .........................................................12
II.1.
Nhng thnh phn c bn ca mt h chuyn gia .......................................12
II.2.
Mt s m hnh kin trc h chuyn gia.......................................................14
a.
M hnh J. L. Ermine ...................................................................................14
b.
M hnh C. Ernest ........................................................................................14
c.
M hnh E. V. Popov....................................................................................15
II.3.
Biu din tri thc trong cc h chuyn gia ..................................................15
II.3.1.
Biu din tri thc bi cc lut sn xut ........................................................15
II.3.2.
B sinh ca h chuyn gia............................................................................17
II.3.3.
Son tho kt hp cc lut........................................................................18
II.3.4.
Cc phng php biu din tri thc khc.....................................................19
a.
Biu din tri thc nh mnh logic ...........................................................19
b.
Biu din tri thc nh mng ng ngha........................................................20
c.
Biu din tri thc nh ngn ng nhn to ....................................................21
II.4.
K thut suy lun trong cc h chuyn gia ..................................................21
II.4.1.
Phng php suy din tin ...........................................................................22
II.4.2.
Phng php suy din li .............................................................................22
II.4.3.
Cc h thng sn xut (production systems) ................................................23
a.
Cc h thng sn xut Post...........................................................................23
b.
Cc thut ton Markov .................................................................................24
c.
Thut ton mng li (rete algorithm) .........................................................25
III. THIT K H CHUYN GIA .............................................................................................25
III.1.
Thut ton tng qut ....................................................................................25
III.2.
Cc bc pht trin h chuyn gia ..............................................................26
a.
Qun l d n (Project Management) ..........................................................26
b.
Tip nhn tri thc .........................................................................................28
c.
Vn phn phi (The Delivery Problem) ..................................................28
d.
Bo tr v pht trin ......................................................................................28
III.3.
Sai st trong qu trnh pht trin h chuyn gia..........................................29
BI TP CHNG 1 ..............................................................................................................31
BIU DIN TRI THC NH LOGIC V T BC MT ........................................................33
I.
NGN NG V T BC MT .............................................................................................33
I.1.
Cc khi nim...............................................................................................33
I.1.1.
C php ca ngn ng v t bc mt............................................................33
I.1.2.
Cc lut suy din (inference rule) ................................................................35
I.1.3.
Ng ngha ca ngn ng v t bc mt ........................................................36
a.
Din gii (Interpretation)..............................................................................36
Mc lc
b.
a.
b.
c.
I.2.
II.
II.1.
II.2.
II.3.
II.4.
II.5.
Bc thu hp (RESTRICTION)...................................................................72
Bc so khp (PATTERNMATCHING) ..................................................73
Gii quyt xung t (CONFLICT-RESOLUTION) ....................................73
Giai on thc hin EXECUTION...............................................................73
MT S S C BN XY DNG MY SUY DIN ......................................................74
Mt v d v c s tri thc............................................................................74
Tm lut nh suy din tin vi ch bt buc n iu.............................76
a.
S PREDIAGRAM1 : ly ngay kt lun ca mi lut..........................76
b.
S PREDIAGRAM : to sinh v tch lu s kin theo chiu rng ......77
Tm lut nh suy din li vi ch thm d n iu ...............................79
a.
S BACKDIAGRAM 1 : sn sinh cc bi ton con theo chiu su .....79
b.
Mt vi bin dng ca BACKDIAGRAM1...............................................81
c.
S BACKDIAGRAM 2 : to sinh cc bi ton con theo chiu su tr
khi c mt lut c kt lun ngay ............................................................................82
Tm cc lut nh lin kt hn hp, vi ch thm d khng n iu......83
a.
Lin kt hn hp...........................................................................................84
b.
Lp hay to sinh k hoch ........................................................................84
c.
Khng n iu ............................................................................................85
d.
Khi ng u tin theo su .....................................................................86
e.
Gii thch s MIXEDIAGRAM ..............................................................88
f.
Mt vi bin tu n gin khc ca MIXEDIAGRAM ...............................89
S my s dng bin ...............................................................................90
a.
Hot ng ca BACKDIAGRAM3 ...........................................................90
b.
BACKDIAGRAM3 : s my suy din kiu Prolog..............................93
c.
Gii thch s my BACKDIAGRAM3 .................................................94
BI TP CHNG 3 ..............................................................................................................95
H CHUYN GIA MYCIN V NGN NG OPS5 .............................................................97
I.
H CHUYN GIA MYCIN.............................................................................................97
I.1.
Gii thiu MYCIN ........................................................................................97
I.2.
Biu din tri thc trong MYCIN ...................................................................99
a.
Ng cnh ......................................................................................................99
b.
Cc tham bin...............................................................................................99
c.
tin cy (Certain Factor).........................................................................100
d.
Biu din lut .............................................................................................100
I.3.
K thut suy din ca MYCIN ....................................................................101
a.
Th tc MONITOR....................................................................................101
b.
Th tc FINDOUT .....................................................................................101
c.
H thng giao tip ca MYCIN .................................................................101
II. H SN XUT OPS5 ....................................................................................................103
II.1.
Gii thiu OPS5 .........................................................................................103
II.2.
Cc thnh phn ca OPS5 .........................................................................104
II.2.1.
Cc c trng chnh ca ngn ng .............................................................104
II.2.2.
Kiu d liu OPS5......................................................................................105
II.2.3.
C s lut (rb) ............................................................................................106
a.
Thnh phn bn tri lut : left-member ......................................................107
b.
Thnh phn bn phi lut right-member ....................................................108
II.2.4.
C s s kin (fb).......................................................................................109
II.2.5.
B nh lm vic .........................................................................................110
a.
Cu trc b nh lm vic ...........................................................................110
b.
Khi to b nh lm vic ...........................................................................110
Mc lc
II.3.
II.3.1.
II.3.2.
a.
b.
c.
II.3.3.
a.
b.
c.
II.4.
II.4.1.
II.4.2.
PH LC A
5
Lm vic vi OPS5..................................................................................... 111
Hot ng ca my suy din...................................................................... 111
Tp xung t v cch gii quyt xung t ................................................. 112
Chin lc gii quyt xung t LEX ......................................................... 112
Chin lc gii quyt xung t MEA ........................................................ 113
La chn chin lc gii quyt xung t................................................... 113
Lnh v php ton ca OPS5 ..................................................................... 114
Mt s lnh OPS5 ...................................................................................... 114
Cc php ton ca OPS5............................................................................ 114
Yu t chc chn........................................................................................ 114
nh gi v pht trin ca OPS5 .............................................................. 115
nh gi ..................................................................................................... 115
Pht trin ca ngn ng OPS5 ................................................................... 115
HNG DN S DNG OPS5................................................................ 117
CHNG 1
M u
When I examine myself and my methods of thought,
I come to the conclusion that the gift of fantasy has meant more
to me than my talent for absorbing positive knowledge .
Albert Einstein
I.
I.1.
Vision
Natural
Language
Understanding
interface). C s tri thc cha cc tri thc t , my suy din to ra cu tr li cho ngi
s dng qua h thng giao tip.
Ngi s dng (user) cung cp s kin (facts) l nhng g bit, c tht hay nhng
thng tin c ch cho h chuyn gia, v nhn c nhng cu tr li l nhng li khuyn hay
nhng gi ng n (expertise).
Hot ng ca mt h chuyn gia da trn tri thc c minh ha nh sau :
Ngi s dng
(User)
H
thng
giao
tip
(User
interface)
C s tri thc
(Knowledge Base)
My suy din
(Inference Engine)
Lnh vc vn
(Problem Domain)
Vn t ra
Ngi qun tr
Ti c th dng n lm g ?
K thut vin
M u
Nh nghin cu
Lm sao ti c th m rng n ?
N s gip ti ci g y ?
N c rc ri v tn km khng ?
N c ng tin cy khng ?
I.2.
D hiu (understandable). H chuyn gia gii thch cc bc suy lun mt cch d hiu
v nht qun, khng ging nh cch tr li b n ca cc hp en (black box).
Nhng u im ca h chuyn gia :
Ph cp (increased availability).
L sn phm chuyn gia, c pht trin khng
ngng vi hiu qu s dng khng th ph nhn.
I.3.
Sau y l mt s s kin quan trng trong lch s pht trin ca cng ngh h chuyn gia
(expert system technology).
Nm
1943
1954
1956
Cc s kin
Dch v bu in ; m hnh Neuron ca (Mc Culloch and Pitts Model)
Thut ton Markov (Markov Algorithm) iu khin thc thi cc lut
Hi tho Dartmouth ; l lun logic ; tm kim nghim suy (heuristic search) ; thng
1957
1958
1962
1965
1968
1969
1970
1971
1973
1975
1976
1977
1978
1979
1980
1982
1983
1985
I.4.
M u
11
(Instruction)
Gii thch
(Interpretation)
Lp k hoch
(Planning)
D on (Prognosis)
Cha tr (Remedy)
iu khin (Control)
AI/ RHEUM
CADUCEUS
ANNA
BLUE BOX
MYCIN
ONCOCIN
ATTENDING
GUIDON
II.
II.1.
C s tri thc
Cc lut
B nh lm vic
Lch cng vic
Kh nng
thu nhn tri thc
C s tri thc (knowledge base). Gm cc phn t (hay n v) tri thc, thng thng
c gi l lut (rule), c t chc nh mt c s d liu.
My duy din (inference engine). Cng c (chng trnh, hay b x l) to ra s suy
lun bng cch quyt nh xem nhng lut no s lm tha mn cc s kin, cc i
tng. , chn u tin cc lut tha mn, thc hin cc lut c tnh u tin cao nht.
Lch cng vic (agenda). Danh sch cc lut u tin do my suy din to ra tho mn
cc s kin, cc i tng c mt trong b nh lm vic.
M u
13
My
suy din
C s tri thc
Hnh 1.5. Quan h gia my suy din v c s tri thc
T vic phn bit hai loi tri thc, ngi ta ni my suy din l cng c trin khai cc c ch
(hay k thut) tng qut t hp cc tri thc phn on v cc tri thc thc hnh. Hnh trn y
m t quan h hu c gia my suy din v c s tri thc.
II.2.
C nhiu m hnh kin trc h chuyn gia theo cc tc gi khc nhau. Sau y l mt s
m hnh.
a. M hnh J. L. Ermine
C s tri thc
Ngi s dng
yu cu
H thng
thu nhn
tri thc
Giao din
D liu vn
cn gii quyt
Tri thc mi
B nh lm vic
b. M hnh C. Ernest
Tri thc
C s
tri thc
Chuyn
gia
Cu trc
my suy din
D liu
Ngi
s
dng
Li gii
Gii thch
Theo di
My
suy din
M u
15
c. M hnh E. V. Popov
Kh nng
gii thch
Chuyn
gia
Ngi
s dng
Giao din
ngi
s dng
B nh
lm vic
Din dch
C s
tri thc
S hu
tri thc
II.3.
Tri thc ca mt h chuyn gia c th c biu din theo nhiu cch khc nhau. Thng
thng ngi ta s dng cc cch sau y :
Biu din tri thc bi cc lut sn xut
Biu din tri thc nh mnh logic
Biu din tri thc nh mng ng ngha
Biu din tri thc nh ngn ng nhn to
Ngoi ra, ngi ta cn s dng cch biu din tri thc nh cc s kin khng chc chn,
nh b ba : i tng, thuc tnh v gi tr (O-A-V: Object-Attribute-Value), nh khung
(frame), v.v... Tu theo tng h chuyn gia, ngi ta c th s dng mt cch hoc ng thi
c nhiu cch.
M u
17
OPS
R1/XCON cu hnh my tnh
ACE bo v ng dy in thoi
AIRPLAN ct cnh v h cnh my bay
AI-SPEAR theo di my tnh
YES / MVS iu khin my tnh
...
Nh b sinh, mi h h chuyn gia c th cha t hng trm n hng ngn lut. Bng
di y thng k s lut ca mt s h chuyn gia :
H chuyn gia
MYCIN
PROSPECTOR
R1/XCON
LITHO
SPHINX
TOM
Lnh vc
Y hc
a cht
Tin hc
a cht
Y hc
Nng hc
Nm xut hin
1974
1979
1980
1982
1984
1984
S lut
500
1 600
> 7 000
500
400
200
M u
19
V t
Tom l n ng
MAN(tom)
FATHER(tom, mary)
Tt c mi ngi u cht
MAN(X) MORTAL(X)
vi quy c MAN(X) c ngha X l mt ngi v
MORTAL(X) c ngha X cht. MAN v MORTAL c
gi l cc v t i vi bin X.
Cc v t thng c cha hng, bin hay hm. Ngi ta gi cc v t khng cha bin (c
th cha hng) l cc mnh (preposition). Mi v t c th l mt s kin (fact) hay mt
lut. Lut l v t gm hai v tri v phi c ni nhau bi mt du mi tn (). Cc v t
cn li (khng cha mi tn) c gi l cc s kin. Trong v d trn y, MAN v
FATHER l cc mnh v l cc s kin. Cn MAN(X) MORTAL(X) l mt lut.
V d : T cc tri thc sau :
Marc c tc vng hoe, cn Jean c tc mu nu. Pierre l cha ca Jean. Marc l cha ca
Pierre. Jean l cha ca Ren. Marc l con ca Georges.
cnh
loi
chim
bit
bay
c
s
l
l
cnh
ct
loi
chim
bit
ng
vt
bay
bit
ln
trng
M u
21
1) Mu ca c th l gram dng
2) Hnh thi ca c th l b
nhim trng
3) Kiu pht trin ca c th
l khun lc
tn ti mt kh nng (0.7) l c th b
nhim khun cu chm
Hnh 1.11. Biu din tri thc nh ngn ng nhn to trong MYCIN
II.4.
C nhiu phng php tng qut suy lun trong cc chin lc gii quyt vn ca
h chuyn gia. Nhng phng php hay gp l suy din tin (foward chaining), suy din li
(backward chaining) v phi hp hai phng php ny (mixed chaining). Nhng phng
php khc l phn tch phng tin (means-end analysis), rt gn vn (problem
reduction), quay lui (backtracking), kim tra lp k hoch (plan-generate-test), lp k hoch
phn cp (hierachical planning)...
Di y l nn tng ca cng ngh h chuyn gia hin i (foundation of modern relebased expert system).
H chuyn gia da trn lut
Lut
My suy din
So khp
hiu qu
S kin
Hp gii
xung t
Suy din
bn phi lut (RHS)
Hnh 1.12. Nn tng ca cng ngh h chuyn gia da trn lut hin i
Nu thuc tnh l trung gian, xut hin ng thi nh l tin v nh l kt lun, khi
ngun c th l cc lut, hoc c th l cc cu hi m cha c nu ra.
Nu mi ln vi cu hi cho, ngi s dng tr li hp l, gi tr tr li ny s c
gn cho thuc tnh v xem nh thnh cng. Nu ngun l cc lut, h thng s ly ln lt
cc lut m thuc tnh ch xut hin nh kt lun, c th tm gi tr cc thuc tnh thuc
tin . Nu cc lut tho mn, thuc tnh kt lun s c ghi nhn.
M u
23
Bnh nhn st
Dng
i
Cho ung thuc Aspirin
i khm bc s
Bnh nhn st AND St trn 39 0C
Ch php AND khng phi l mt phn ca xu m cho php ni kt nhiu tin li
vi nhau.
Mt h thng sn xut Post gm mt nhm cc lut sn xut, chng hn (ch cc s th
t t trong du ngoc ch dng trnh by) :
(1) Car wont start
Check battery
(2) Car wont start
Check gas
(3) Check battery AND Battery bad
Replace battery
(4) Check gas AND No gas
Fill gas tank
Nu a vo xu Car wont start, th cc lut (1) v (2) c th c p dng sinh ra
cc xu Check battery v Check gas. Tuy nhin, khng tn ti c ch c th p dng ng
thi c hai cho xu vo ny. Ch c th p dng c mt lut trong hai, hoc khng. Nu
a vo xu Battery bad v Check battery th lut 3 c th c p dng sinh ra xu
Replace battery.
Khng t ra th t cc lut trong h thng. Sau khi o th t, chng hn (4) (2) (1) (3)
th h thng gi nguyn gi tr :
(4)
(2)
(1)
(3)
Mc d cc sn xut Post c s dng trong h chuyn gia nhng chng khng thun
tin cho vic vit cc trnh ng dng. Hn ch ch yu ca cc sn xut Post khi lp trnh l
khng c cc chin lc iu khin (control strategy) nh hng s dng lut... Mt h
thng Post cho php p dng lut cho mt xu vo theo cch tu m khng ch ra c th
xy y x
(2)
(3)
Xu kt qu
ABC
ABC
ABC
B AC
BC A
BC A
BCA
Ch rng k hiu hot ng nh l mt bin trung gian trong ngn ng lp trnh. Tuy
nhin, thay v nhn mt gi tr, bin ng vai tr gi v tr nh du qu trnh thay i xu
vo. Mt khi cng vic kt thc, b loi b bi lut 2.
M u
25
Thit k bn mu
Biu din tri thc
Tip nhn tri thc
Pht trin hon thin bn mu
End
Hp thc ho bn mu
Trin khai ci t
Hng dn s dng
Vn hnh
Bo tr v pht trin
Else
Kt thc
End
- n nh im bt u v im kt thc d n
- gii quyt xung t khi gp cc vic cng mc u tin
M u
27
Phn tch
(analysis)
Qun l cu hnh sn
phm
Qun l hot ng
Lp
k
hoch
Ln
lch
cng
tc
Ghi
chp
s
kin
Phn
tch
Qun
l
sn
phm
Qun
l
thay
i
Qun l ti nguyn
Gim
thiu
tr
tr
ti
nguyn
Tip
nhn
ti
nguyn
Phn
cng
trch
nhim
ti
nguyn
D
bo
ti
nguyn
cn
thit
d. Bo tr v pht trin
H thng c bo tr (maintenance) v tin trin (evolve) nh th no ?
Cc h chuyn gia i hi cc hot ng bo tr v pht trin khng hn ch (open-ended)
so vi cc chng trnh thng thng. Bi v cc h chuyn gia khng da trn cc thut
ton, m thnh tch (performance) ca chng ph thuc vo tri thc. Vn l phi thng
xuyn b sung tip nhn cc tri thc mi v thay i cc tri thc c i mi h thng
(system improves).
Trong mt sn phm c cht lng thng mi (commercial quality product), cn phi
thu thp mt cch c h thng v c hiu qu cc bo co sai st h thng do ngi s dng
pht hin. Nu vic thu thp v khc phc li khng c u tin trong qu trnh nghin cu
th phi c u tin trong h thng cht lng thng mi. Vic bo tr ch c thc hin
tt khi thu thp y cc bo co sai st.
Hnh 1.16. trnh by cc giai on c bn pht trin mt h chuyn gia.
M u
29
Nghin cu kh thi
(feasibility study)
Phc tho nhanh bn mu
(rapid prototype)
Lm mn h thng
(Refined system : a-test)
Kim th ( -test)
(field testable)
Cht lng sn phm
(commercial quality)
Bo tr v pht trin
(maintenance&evolution)
Chuyn gia
(expert)
C s tri thc
(knowledge base)
My suy din
(inference engine)
M u
Bi tp chng 1
1. c k gio trnh v ti liu tham kho hiu cac khi nim trnh by.
2. T cho mt s v d v cc phng php biu din tri thc. Nhn xt.
31
CHNG 2
I.
I.1.
Ngn ng v t bc mt
Cc khi nim
33
V d :
Cc hm successor(X, Y) hay weight(b) hay successor(b, wight(Z)) u l cc hng,
nhng P(X, blue) khng phi l hng v P l mt v t hay weight (P(b)) cng khng phi l
hng v P(b) khng phi l mt hng (khng th lm i cho mt hm).
3. Nguyn t (atom)
Nguyn t c to thnh t hai lut sau :
Cc mnh (v t bc 0) l cc nguyn t.
Nu P l mt v t bc n (n 1) v nu t1,..., tn u l cc hng,
th P(t1,..., tn) cng l mt nguyn t.
V d :
P(X, blue), EMPTY, BETWEEN(table, X, sill(window)) l cc nguyn t.
Cn successor (X, Y), sill (window) y th khng phi nguyn t.
4. Cc cng thc chnh
Cc cng thc chnh (vit tt CTC) c to thnh t ba lut sau :
Cc nguyn t l cc CTC.
Nu G v H biu din cc CTC,
th (G), (G H), (G H), (G H) v (G H) cng l cc CTC do c to thnh
t cc php ni lgich gia G v H.
Nu G l mt CTC v X l mt bin,
th (X)G v (X)G cng l cc CTC.
(X)G c c l tn ti mt bin X sao cho G c tho mn.
(X)G c c l vi mi bin X th G u c tho mn.
V d :
Cc cng thc sau y l chnh :
(X) (Y) ((P(X, Y) Q(X, Y) R(X))
(((P(a) P(b))) P(b))
cn ((f(a)) : ph nh ca mt hm,
v f (P(a)) : hm c i l mt v t, u khng phi l CTC.
Ch :
Mt CTC c gi l mt trc kin (literal) hay mt tr ng nu n l mt nguyn t
hay c dng (G), vi G l mt nguyn t.
Trong mt CTC, trc hoc sau cc k t ni, k t phn cch, cc hng, cc bin, cc
hm, cc v t, ngi ta c th t ty cc du cch (space hay blank).
35
T nay v sau ta quy c rng, trong mt cng thc, nu c mt bin c lng t ha,
tc l bin xut hin ngay theo sau k hiu hay th t tr i, tt c cc v tr ng sau
ca cng bin ny cng c lng t ha.
Mt CTC c th cha cc bin khng c lng t ha, chng c gi l nhng bin
t do (free variable). V d : P(X) v (Y) Q(X, Y) l cc CTC c cha bin t do X.
Logic v t c gi l bc mt (firstorder) v trong nh ngha cc CTC khng
cha cc lng t cho v t hay cho hm.
V d : (P)P(a) v (f) (f) (X) P(f (X), b)
khng phi l nhng CTC logic v t bc mt, m c bc cao hn (higher-order).
5. Biu din v s dng tri thc (knowledge)
Thc t, cc CTC dng din t cc ngha. V d CTC di y :
Gn cho mi hm bc n (n 1) mt nh x t Dn ln D :
P( X1,... Xn ) : Dn D.
Ngi ta ni rng c mt din gii I t G ln D :
I
G D, D
V d : Cho cc min din gii D1, D2, D3 v cc CTC
G1 : (X) P(X)
G2 : (X) (Y) Q(X, Y)
G3 : (X) (R(X) T (f (X), a))
Ta xy dng cc din gii Ii ca Gi ln Di, i = 1.. 3, nh sau :
I1 :
D1 = {1, 2}
P(1)
F
P(2)
T
I2 :
D2 = {1, 3}
Q(1, 1)
F
Q(1, 3)
T
I3 :
D3 = {4, 5}
a
4
Ch :
Q(3, 1)
F
f(4)
5
Q(3, 3)
F
f(5)
4
R(4) R(5)
T(4, 4) T(4, 5) T(5, 4) T(5, 5)
T
F
T
F
T
T
i khi, ngi ta ni mt din gii l khng y nu trong , cc php gn
cn thit ch c c t tng phn.
37
C cc gi tr ca cc bin.
Chng hn, trong cng thc G3 trn c din gii theo I3, nguyn t T(f(X), a) nhn
gi tr T nu X c gn phn t 4 ca D3, v cng nhn gi tr T nu X nhn mt gi tr khc
(gi s 5) ca D3.
G
F
F
T
T
G
F
T
F
T
(G G)
T
T
F
T
G
F
F
T
T
G (G G)
F
T
T
F
F
F
T
T
I.2.
Cc tnh cht
I.2.1. Tnh hp thc / khng hp thc, tnh nht qun / khng nht qun
Mt cng thc c gi l hp thc (valid) nu v ch nu mi din gii u cho gi tr T.
Nu khng, n c gi l khng hp thc (nonvalid).
Mt cng thc c gi l khng nht qun (inconsistent) nu v ch nu vi mi din
gii u cho gi tr F. Nu khng, n c gi l nht qun (inconsistent).
V d :
Cho G1 : (X) (P(X) (Q(X)))
G2 : (X) (P(X) (P(X)))
G3 : ((X) (P(X)) ((Y) (P(Y)))
Cng thc G1 l nht qun v din gii I1 sau y tr v cho n gi tr T :
I1 : D = {1}
P(1)
Q(1)
P(1)
Q(1)
39
c gi l
(G H)
((G) H)
(G H)
((G H) (H G))
( (G))
((G H))
((G) (H))
((G H))
((G) (H))
((G (H K))
((G H) (G K))
((G (H K))
((G H) (G K))
(G H)
(H G)
(G H)
(H G)
((G H) K)
(G (H K))
((G H) K))
(G (H K))
(G H)
((H) (G))
Lut De Morgan
Lut phn phi
Lut giao hon
Lut kt hp cho php loi b du
ngoc
Lut i v
c gi l
(G )
(G )
(G )
(G )
(G (G))
(G (G))
(X)(G(X))
(Y)(G(Y))
(X)(G(X))
(Y)(G(Y))
((X)G(X))
(Y)(G(Y))
((X)G(X))
(Y)(G(Y))
(X)(G(X) H(X))
((X)G(X) (Y)H(Y))
(X)(G(X)) H(X))
((X)G(X) (Y)H(Y))
I.2.4. Hu qu logic
Cng thc G c gi l hu qu logic t cc cng thc H1,..., Hn nu v ch nu mi m
hnh ca H1,..., Hn l mt m hnh ca G.
V d :
P(a)
l hu qu logic ca (X) P(X)
(X) Q(X) l hu qu logic ca (X) ((P(X)) Q(X)) v (X) P(X)
D dng ch ra rng G l hu qu logic ca H1,..., Hn nu v ch nu :
((H1 ... Hn) G) l hp thc, hay nu v ch nu (H1 ... Hn) (G)) l khng
nht qun.
I.3.
41
II.
Php hp gii
II.1.
Bin i cc mnh
a. Loi b cc php ni v
S dng cc lut tng ng :
(G H) v ((G) H)
(G H) v ((G H) (H G))
v
v
v
v
v
G
((G) (H))
((G) (H))
(X) (P(X))
(X) (P(X))
Lut De Morgan
(X) P(X)
v
(Y) P(Y)
Lut dng chung cc bin
Ch :
Cc php bin i a, b, c dn CTC cho thnh mt CTC mi tng ng.
a. Loi bi cc du lng t tn ti
Cho cng thc dng (X) G(X) v gi s G(X) c to thnh t mt hoc nhiu cng
thc ch c lng t ho ton th () i vi cc bin Y1,..., Yn m thi. Ta s loi b
lng t tn ti (X), sau thay th mi v tr ca X trong G(X) bi mt hm c dng
f(Y1,..., Yn).
Ch rng hm ny phi cha tt c cc bin c lng t ho ton th nm bn tri
lng t tn ti trong cng thc (X) G(X). y l mt hm cho bit c s tng ng gia
43
tn ti .
Nhng hm nh vy c gi l cc hm Skolem (Skolem functions). V rng ta khng
bit g khc ngoi cc tham bin ca cc hm ny, ta phi s dng mt k hiu gc biu
din chng mi ln cn thay th mt lng t ton th khi n xut hin.
Khi khng c du no bn tri ca cho, hm Skolem s khng c tham bin,
v c gi l mt hng Skolem (Skolem constant).
V d :
(X) P(X)
tr thnh
P(a)
(X) (Y) FOLLOW(Y, X)
tr thnh
(X) FOLLOW(f(X), X)
Dng chun trc ca cng thc cho trong v d mc II.1.1 tr thnh :
((X) (Y) (U)
(P(X) Q(X, a) (R(X, b) (R(Y, g(X, Y)) T(X, Y))) (S(U))
b. Loi b tt c cc du lng t
Sau bc a trn y, cng thc ch cn cc du lng t ton th. Vi gi thit rng tt c
cc bin u c lng t ho ton th, ta c th loi b chng.
V d sau cng mc trn y tr thnh :
(P(X) Q(X, a) (R(X, b) (R(Y, g(X, Y)) T(X, Y))) (S(U))
V d :
P(X) Q(X, a) R(Y, f(X), b)
tr thnh
(P(X) Q(X, a)) (P(X) R(Y, f(X), b))
V d mc trn y tr thnh :
(P(X) Q(X, a) R(X, b) S(U))
(P(X) Q(X, a) R(Y, g(X, Y)) T(X, Y) (S(U))
Gi = { C1,..., Ci i }
Ta thy rng { G1,..., Gp } l khng nht qun nu v ch nu :
U G "i
i = 1, p
U G "i .
i = 1, p
45
Ch :
1) Trong trng hp tng qut, ngi ta c th bin i mt CTC cho thnh nhiu dng
mnh khc nhau. Ngi ta c th loi b mt ln cc lng t tn ti (bc II.1.2.a)
trc khi chuyn qua tri tt c cc lng t (bc II.1.1.d). Cch ny c th lm gim s
lng tham i ca cc hm Skolem xut hin.
Chng hn, gi s sau bc II.1.1.c, ta c CTC :
H = G1 H2 ... Hm
vi Gi v Hi l cc trc kin c th. Cc trc kin G1 v G1 c mt trong G v H tng ng,
c gi l cc trc kin b nhau (complementary literals).
Xut pht t cc mnh cha (parent clauses) l G v H, lut suy din, hay php hp
gii, s to ra mt mnh :
K = G2 ... Gn H2 ... Hm
K c gi l mnh kt qu (resolvent clause) hay kt qu hp gii (resolvent) ca G
v H. Ngi ta cng ni rng G v H c hp gii vi nhau (resolved) to thnh K. Mt
kt qu hp gii l s loi b cc trc kin b nhau v tuyn vi tt c cc trc kin khc ca
cc mnh cha.
Mt s trng hp c bit :
II.2.
47
hp nht cho php bin i cc mnh sao cho c dng trc kin b nhau bng cch p
dng cc php th (substitutions).
a. Php th
Php th l mt tp hp hu hn cc cp ti Vi, trong ti l cc hng, cn Vi l cc bin
phn bit. Nu I = 0, ta ni php th l rng.
Ngi ta ni p dng mt php th s = { ti Vi } cho mt biu thc bt k E (E l mt
hng hoc mt CTC) cho trc l xc nh mt trng hp ca E theo s. l vic thay th
tt c cc v tr ban u ca mi bin Vi trong E bi ti.
V d :
Cho E = G(f(X), a, Y) v cc php th :
s2 = { b|X }
s1 = { Z|X, U|Y }
s3 = { Y|X, g(X)|Y }
s4 = { a|X, k(c) Y }
Ta c :
Es1 = G(f(Z), a, U)
Es3 = G(f(Y), a, g(X))
Es2 = G(f(b), a, Y)
Es4 = G(f(a), a, k(c))
Ch :
chuyn E thnh Es3, ch c cc v tr ban u ca X v Y trong E l c thay th
(khng phi cc v tr xut hin trong khi p dng s3). Kt qu ca php th ny l c
lp vi th t p dng cc phn t ca php th.
Es4 l mt trng hp c th ca E bi php th s4.
Cc hng ti v cc bin Vi c gi ln lt l hng v bin ca php th.
Php t hp hai php th s1v s2, ngi ta vit quy c s1s2, l php th nhn c bng
cch nh sau :
a) Ap dng s2 cho cc hng ca s1.
b) Loi b khi s2 cc cp tj
(hay sao cho ti vi ti
Vj s1).
X, g(c, f(X), U)
V, c
Y, f(X)
Z, f(X)
W}
b. B hp nht (unifier)
W}
Ngi ta ni rng mt tp hp {Ei}i cc biu thc (hng hay cng thc) l hp nht c
(unifiable) bi s hay ni rng s l b hp nht ca {Ei}i nu v ch nu mi php th s cho Ei,
k hiu Eis, l ging nhau. Khi , ta k hiu biu thc (duy nht) sinh ra bi b hp nht s l
{Ei}s.
V d :
s = { a X, c Y, c V, b Z, b U, g(b) W }
l mt hp nht ca :
{Ei}i = { G(X, f(Y), g(b)), G(X, f(c), g(Z)), G(X, f(c), g(U)), G(X, f(V), W) }
r = { c Y, c V, b Z, b
Ch rng s = r{ a X }.
U, g(b)
W}
49
gia cc phn t ny. Sau , bng cch trch mi phn t ca mt biu thc (cn phi l
hng hay cng thc ngay khi tt c cc hm v tt c cc v t c vit bi cc k hiu phn
bit). Biu thc ny bt u t v tr xung t ca k hiu. Tp hp cc biu thc nh vy to
thnh D.
Chng hn, cho = { G(X, f(a, Y), G(X, b), G(X, f(a, G(Z))) }
Mt xung t xut hin v tr k hiu th nm. Nh vy :
L = { Gi} { Hj }
l hp nht c.
Gi s r l mt mgu ca L, mt kt qu hp gii ca G v H l mt tp hp cc trc kin
c xc nh nh sau :
({Gi} {Gi}) r ({Hj} {Hj}) r
V d : Ga s
T kt qu hp gii l
Mt mgu ca G2 = P(X, f(Y)) v H1 l
T kt qu hp gii l
51
T kt qu hp gii l
Mt mgu ca G1, G2 v H1 l
r3 = {Y Z }
P(X, f(a))P(X, f(Y))P(Y, f(a))
r4 = {X Z, a Y} = r2
T kt qu hp gii l
Q(a) Q(X).
Ta thy c bn kt qu hp gii khc nhau. Trong cc trng hp khc, khng tn ti kt
qu hp gii.
Tuy nhin, trc khi kt lun rng khng tn ti kt qu hp gii, t ra cng phi kim tra
cc mnh cho c cc bin phn bit nhau. Chng hn :
G(X, a) v G(f(X), X)
khng c kt qu hp gii. Nu vit li mnh th hai thnh G(f(Y), Y) th xut hin mt
mpu { f(X) X, a Y}, t c th suy ra tn ti mt kt qu hp gii l mnh rng.
Nh vy, s phn bit cc tn bin ca cc mnh cha ch hp php lc gi thut ton
hp nht. Vic tm mt kt qu hp gii gia G(X, X) v G(f(X), X) i hi phi vit li
mnh th hai thnh G(f(Y), Y). Lc ny, php th { f(X) X } dn n kt qu l hai
mnh G(f(Y), f(Y)) v G(f(Y), Y) khng hp nht c.
II.3.
a. Mt lut ng n
Ta c th chng minh d dng rng php hp gii l mt lut ng n. Ngha l mi kt
qu hp gii l hu qu logic ca hai mnh cha.
T suy ra rng, nu mt dy cc hp gii dn n mt mnh rng, th tp hp G
cho ban u l khng nht qun. Nu khng, s tn ti mt din gii I lm tho mn G v do
, cc mnh cha H1 v H2 l rng v va l hu qu logic. Nu r l mgu dng hp gii
H1 v H2, th din gii I phi tho mn H1r v H2r, v do H1r s l phn b ca H2r nn din
gii I khng th tn ti. Vy G l khng nht qun.
Ch :
Cho G l tp hp cc mnh v gi s dy G1,..., Gp l cc mnh phn bit sao cho :
Gp l mnh rng,
i = 1..p, hoc Githuc v G, hoc Gil mt kt qu hp gii ca hai mnh cha ng
trc trong dy.
nht qun cc mnh , n l mt s nguyn dng sao cho mnh rng thuc v R (G).
Ch :
Thng thng, ngi ta rt gn khi ni v tnh hon ton ca php hp gii. Ch rng
khng phi l tnh hon ton i vi s suy din m ta nh ngha trc y (nu H
l mt hu qu logic ca mt nhm G cc CTC, tnh cht c tho mn bi hp gii
53
if
then
end
p v q l cc kt qu hp gii
chn p hoc q de thm vo C
(3.2)
R c(G)
p 1
thuc R c (G) :
Ch :
Tnh hon ton ca mt chin lc hp gii (i vi php bc b) khng ng ngha
vi tnh hon ton ca mt nguyn l hp gii (i vi php bc b).
Cc chin lc khng y c th c ch li thc tin.
Mt chin lc l y khng c ngha l khi lm tho mn cc tiu chun la chn
hay th t tm thy mt cch tt yu, vi mt s hu hn cc mnh , mnh rng
xut pht t tt c tp hp G khng nht qun cc mnh . Sau y, khi mt chin
lc c tnh cht ny, ngi ta ni l y trc tip.
55
Q(f(b))
Q(f(b))
P(b)
R(a, Y)
R(a, Y)
R (a,
Q(f(b)) R(a, Y)
Q(f(b))
Hnh 2.5. th bc b
Q(f(b))
P(b)
P(X)
P(b)
Hnh 2.7. th bc b
57
Cn ch rng :
Chin lc ny khng cm vic to ra mt phn t no ca th nh hng ca
tp hp mnh G, nhng chi phi tnh r rng ca th nh hng bng cch lm
xut hin tp hp R p(G) trc R p1(G). Chin lc ny l y .
Mt khc, t G hu hn, ngi ta suy ra rng R p(G) l hu hn, p = 1..n. Nh vy,
chin lc hp gii bi bc b theo chiu rng l y trc tip : nu G khng nht
qun, th chin lc ny s lm xut hin mnh rng.
Ngi ta nhn c mt php bc b vi mnh rng c su su nht c th.
P(X)Q(f(X)) P(b)R(a, Y)
P(b)
P(X)
Q(f(b)
Hnh 2.8. th tm kim
Hnh 2.9. th bc b
P(X)
R5(a, b)
Q2 (f(b)) v R4(a, Y)
R4(a, Y)
59
C0
Gi
...
CC1 ..........
CCp
CCq
Mnh bin th
nht
(cng l mnh
vo)
Gj
mnh trung tm th
hai
th p+1
Gk
mnh bin
(hoc l mnh vo,
(hoc l t tin ca
CCp)
...
............
tng t i vi Gi
Hnh 2.11. S bc b
Hay, bng cch thay th tn cc mnh bin trn cc cung ni cc mnh trung tm, ta
nhn c th nh sau :
C0
CC1
CCp
CCq
Gi
Gj
Gk
Q(f(b))
R(a, Y)
Q(f(X)) P(b)
R(a, Y)
R(a, b)
R(a, Y)
Q(Z)
P(X)
R(a, Y)
Q(f(b))
th bc b ng vi ng k m
61
P(b)
Q(Z)
R(a, Y)
P(X)
P(b)
Q(f(b))
P(X)
Q(f(X)) P(b)
R(a, Y) R(a,
P(X)
R(a, Y)
P(b)
b)
R(a, Y) P(X)
R(a, Y)
Q(f(X))
Q(Z)
R(a,
Q(f(b))
R(a, Y)
Q(X), P(Y)
Q(Y), P(Z)
Q(Z), P(U)
Q(U)}
Q(Z)
P(U)
Q(U)
3
P(Y)
Q(Y)
Q(Z), ta nhn c
P(a)
5 P(Z)
2
(vi nhn t ho)
6 Q(Y)
P(Z)
P(a)
Q(X)
(t tin)
hoc :
f
3
g
h
i
2
1
63
a'2
EQUAL (b, V)
V)
a'1
EQUAL (a,
EQUAL (a, b)
c'1
65
C(s(X)) C(l(X))
C(s(X)) C(l(X))
C(s(X)) C(say(X, Y)) C(Y)
C(l(X))
C(say(X, Y)) C(Y)
C(Y) C(say(X, Y)) C(s(X))
C(Y) C(say(X, Y))) C(l(X))
C(say(a, khng_th_hiu_c))
C(say(b, say(a, l(a))))
C(say(c, l(b)))
C(s(X))C(say(X, Y))(C(Y)
C(s(a))C(khng_th_hiu_c)
C(khng_th_hiu_c)
C(l(a))
C(s(X))C(l(X))
10
C(l(c))C(l(b))
C(s(X))C(l(X))
C(l(c))C(s(b))
C(s(X))C(l(X))
C(s(b)) C(s(c))
C(l(X))C(say(X, Y))C(Y)
1
1
11
3. Hp gii 8 vi 3, ly kt qu hp gii vi 1 :
C(say(b, say(a, l(a))))
C(s(X))C(l(X))
12
12
C(l(b))C(s(a)) C(l(a))
C(l(b))
C(l(a))
13
5. Hp gii 12 vi 4, ly kt qu hp gii vi 10 :
C(say(a, l(a)))C(l(b))
C(l(b))C(l(a))
10
C(l(b))
12
C(l(X))C(say(X, Y))C(Y)
C(khng_th_hiu_c) C(l(a))
C(khng_th_hiu_c)
14
67
C(l(a))
13
C(l(X))C(say(X, Y))C(Y)
14
15
69
Bi tp chng 2
3. Cho cc v d s dng c php ca ngn ng v t bc mt :
a. Bng k hiu
b. Hng (term)
c. Nguyn t (atom)
d. Cc cng thc chnh
4. Th no l tnh hp thc v khng hp thc, tnh nht qun v khng nht qun ca mt
cng thc ? Th no lt nh khng quyt nh c v tnh na quyt nh c ca logic
v t bc mt
5. Cho cc v d v cng thc chnh v php bin i mnh
6. T cc v d cho trong gio trnh, t cho cc v d v cc chin lc hp gii tm kim
v bc b.
7. Tm mt v d khc tng t bi ton tm ngi ni tht.
CHNG 3
My suy din
I am only one, but still I am one. I cannot do everything,
but still I can do something; and because I cannot do everything,
I will not refuse to do something I can do .
Edward Everett Hale
Chng trc, ta vn dng logic hnh thc hp gii bi ton cho, ngha l nghin
cu nhng phng php phn on v khng nh cc li gii, ng thi nh gi nhng tnh
cht v nhng hn ch ca cc phng php ny.
Trong chng ny, da trn cc khi nim cng thc, tin , lut suy din v cc mi
quan h gia chng, ta s nghin cu cc my suy din (inference engine) trong cc h thng
dng lut hay da trn lut (RulesBased Systems).
I.
Trong cc h thng dng lut, mi lut bao gm thng tin v b khi ng (starter), hay
iu kin khi ng ca lut, v thn (body) ca lut, hay thng tin v kt qu khi ng lut
:
Lut = <b khi ng> + <thn>
71
Giai on 1 : NH GI
THU HP
cung cp :
R1 bao gm trong RB
F1 bao gm trong FB
Cc quy tc ca R3
FB v c th RB c thay i
SO KHP
so snh gia R1 v F1
cung cp :
R2 bao gm trong R1
Cc kt qu khc c th
(hng v mi trng ca
h thng chng hn)
GII QUYT
XUNG T
cung cp :
R3 bao gm trong R2
Tu theo iu khin ca my :
dng hay quay li
Tu theo iu khin ca my :
dng hay quay li
I.1.
Giai on nh gi EVALUATION
a. Bc thu hp (RESTRICTION)
RESTRICTION (thu hp) l bc u tin ca giai on EVALUATION, xc nh t
mt trng thi hin hnh hay qu kh ca c s s kin (k hiu FB) v t mt trng thi hin
hnh hay qu kh ca c s lut (k hiu RB), mt tp hp con F1 ca FB v mt tp hp
con R1 ca RB sao cho c th tin hnh so snh c trong bc FILTERING tip theo.
Ngi ta thng dng k thut khai thc cc tri thc da trn s phn b cc s kin v
cc lut theo cc h ring bit. i khi, cc tri thc cho php phn bit cc s kin v cc lut
lin quan trc tip n lnh vc. V d, trong mt ng cnh chn on bnh, ngi ta c th
phn bit c ngay cc lut lin quan n cc bnh tr em vi cc lut khc, hay phn bit
c cc s kin lin quan n phn tch mu vi cc s kin khc.
Nh vy, bc RESTRICTION l u tin cho mt nhm no cc lut hay cc s kin
My suy din
73
i vi mt hoc nhiu chu k. Thng thng, nhng tri thc phn bit cc s kin v cc
lut l rt tng qut.
Chng hn, nhiu h thng phn bit c cc s kin thit lp (coi nh c xc
nhn) vi cc s kin s thit lp (biu din bi ton ban u hay ch, hay gi thuyt). Vic
thu hp s u tin cc s kinbi ton so vi cc s kinbi ton khc, hay u tin bi ton
xut hin gn y nht so vi cc bi ton trc . S phn bit theo h cc s kin hay theo
h cc lut thng c c th ho bi nh ngha cc cu trc phn bit.
b. Bc so khp (PATTERNMATCHING)
PATTERNMATCHING (so khp hay lc) l bc th hai ca giai on
EVALUATION. My suy din so snh phn khi ng ca mi quy tc ca R1 vi tp hp
cc s kin F1. Mt tp hp con R2 ca R1 nhm cc lut tng thch vi F1, ngha l nhng
lut c iu kin khi ng tho mn cc trng thi ca F1 (tu theo mi h thng m c
nhng tiu chun tho mn khc nhau). R2 c gi l tp hp xung t (conflict set).
I.2.
II.
II.1.
Mt v d v c s tri thc
75
My suy din
E *
C *
F *
C *
O * N *
P *
D *
B *
M *
* A
J * L *
* L
L *
=
* K
* H
=
J *
* R
* M
* I
*
Q
*
S
* A
=
* Q
77
My suy din
b. S PREDIAGRAM
A *
D *
E *
Lut 3 =
(khi ng 1)
ng 3)
Mc 1 :
* B
C *
H *
G *
K *
Lut 6
= Lut 9
(khi ng 2)
(khi
* R
* F
Lut 4 =
(khi ng 4)
Mc 2 :
* Q
My suy din
79
D *
C *
M *
L *
* K
Lut 3
Lut 1
=
(khi ng 4)
2)
* B
Lut 4
=
(khi ng
* A
* J
* L
* I
Lut 2
=
(khi ng 3)
=
(khi ng 1)
* Q
81
My suy din
A C D E G H K
Lut 1
(khi ng 1)
4)M J L A C D E G H K
Lut 4
(khi ng
A C D E G H K
Lut 3
(khi ng
A C D E G H K
f il
mi xut hin.
Trnh cc vng lp bng cch ring ra tt c nhng lut c khi ng mt
ln.
Cho php h thng c lng mt s s kin nh cc cu hi ca ngi dng, thay v
lin kt cc lut.
My suy din
1.
2.
3.
4.
1.
2.
3.
4.
83
II.4.
RULESBASE :
R1 :
R2 :
R3 :
R4 :
R5 :
R6 :
R7 :
P1
P1
P2
P3, F1
P3, F2
P3
P4, F2, F3
A1, A2
A3
P1, A4, P3
A5, P4
P5
A4, P6
A2
a. Lin kt hn hp
Cc lut c gi bng cch kim tra thnh phn bn tri ca chng. Mi phn t thuc
thnh phn bn tri lut l mt b l, rt gn thnh mt k hiu trong v d ang xt. R rng
rng b lc u tin da trn mt phn c bit ca c s s kin, ch cha cc s kin cn
thit lp (hay cc bi ton cn gii) c gi l PROBLEMSTACK (vit tt PRS). Cc b lc
khc, thng thng thuc thnh phn bn tri ca lut da trn mt phn ca c s s kin,
theo quy c, ch cha cc s kin thit lp, l FACTSBASE.
Thnh phn bn tri ca lut to nn b khi ng ca lut . Cc lut c gi theo lin
kt hn hp theo ngha rng cc b lc ca b khi ng c th quan h ng thi n cc s
kin thit lp v cc s kin cn thit lp. Khi khng c cc b lc lin quan n
FACTSBASE (cc b lc s kin), my hot ng theo kiu suy din li.
Thnh phn bn phi ca lut l thn ca lut . N xc nh cc hnh ng cn thc
hin trn PRS v sau l trn FACTSBASE. Chng hn, nu phn t u tin ca PRS l
P1, lut R1 c th c khi ng : A1 v A2 c t mt cch tng ng cc v tr u
tin v v tr th hai ca PRS, trong khi , P1 c ly ra.
My suy din
85
c. Khng n iu
S khc nhau c bn ca MIXEDIAGRAM so vi cc s my trc y l kh nng
iu khin, bi vic khi tho ra mt lut (cng vi nhng thng tin lin quan nh trong bng
cc hnh ng kt thc), vic ly ra cc kt lun trc c thit lp bi p dng cc
lut khc.
Khi mt my suy din xt li cc s kin c thit lp, ngi ta ni rng my l
khng n iu. Nh vy, MIXEDIAGRAM l my khng n iu.
1.
2.
3.
4.
5.
87
My suy din
P1 *
(2) R1 =
*
A1
* A4
= R2 (5)
*
A2
*
A3
* P3
R5 =
*
P5
*
A4
= R6
*
P6
= R4 (6)
*
A5
(7) R7
*
P4
=
* A2
Ta c :
Cc
bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Kt qu
hnh ng
Khi ng lut R3
Khi ng lut R1
Ly A1, A2, A4 t nh PRS
Khi ng lut R5
Khng cn lut no c khi
ng, quay li gii P3
Khi ng lut R6
Ly A4 t nh PRS
Khng cn lut no c khi
ng, quay li gii P3
Khng cn lut no c khi
ng, quay li gii P1
Khi ng lut R2
Ly A3 v A4 t nh PRS
Khi ng lut R4
Ly A5 t nh PRS
Khi ng lut R7
Ly A2 t nh PRS
My dng
Ni dung
Ni dung
Ni dung
PROBLEMSTACK
FACTSBASE
PLAN
(P1 A4 P3)
khng thay i
rng
(A1 A2 A4 P3)
khng thay i
rng
(P3)
{F2 F3 F4}
(A1 A2 A4)
(P5)
khng thay i
khng thay i
(P3)
{F2 F3 F4}
(A1 A2 A4)
RULES={R6 R7}
(A4 P6)
khng thay i
khng thay i
(P6)
khng thay i (A1 A2 A4 A4)
(P3)
{F2 F3 F4}
(A1 A2 A4)
RULES = {R7}
(P1 A4 P3)
{F3 F4}
rng
RULES = {R4 R3 R4 R5 R6 R7}
(A3 A4 P3)
khng thay i
rng
(P3)
{F1 F3 F4}
(A3 A4)
(A5 A4)
khng thay i
khng thay i
(P4)
{F1 F2 F3}
(A3 A4 A5)
(A2)
khng thay i
khng thay i
rng
{F1 F2 F3}
(A3 A4 A5 A2)
My suy din
89
if PROBLEMSTACK = then
begin
Son tho PLAN
Yu cu ngi s dng lp PLAN khc (Y/N?)
if ng (Y) then return failure
return success
end
II.5.
S my s dng bin
KNOWLEDGESBASE :
BLOND (marc)
BROWN (jean)
FATHER (pierre, jean)
FATHER (marc, pierre)
FATHER (jean, ren)
FATHER (x, y) SON (y, x)
GRANDFATHER (x, y) FATHER (x, z), FATHER (z, y)
SON (marc, georges)
a. Hot ng ca BACKDIAGRAM3
Hot ng ca my BACKDIAGRAM3 tm li gii cho v d 1 nh sau :
Chu k u tin :
My ln lt gii cc bi ton c sp xp trong PBS. Trc tin, my ghp i biu
thc GRANDFATHER (u, v) ln lt vi cc tri thc t C1 n C8 theo th t ny. Nu C1
l mt lut, th vic ghp i ch tc ng ln phn kt lun ca lut. Vic ghp i gia
GRANDFATHER (u, v) vi kt lun ca C7 thnh cng : tht vy, bng cch p dng cc
thay th u bi x v v bi y trong GRANDFATHER (u, v), ta nhn c hai biu thc
ging ht nhau.
91
My suy din
93
My suy din
khng c s dng n (khng quay lui) to thnh mt li gii cho bi ton ban u : tn ti
u (u = marc) v v (v = jean) sao cho u l ng ca jean v u c tc hoe.
Kt qu x l ca s my BACKDIAGRAM3 cho hnh 3.19 i vi bi ton trn
y chnh l dy cc php th nh sau :
UNIF = (x u ; y v ; marc x ; jean y)
V d 2 :
T cc tri thc cho hnh 3.16, ta mun tm kim u sao cho u l ng ca pierre. T
, ni dung ban u ca PROBLEMSTACK s l :
PBS = GRANDFATHER (u, pierre)
Bng cch nhi li (bt chc) y ht cc bc va trnh by trn y, ta nhn c kt
qu hp gii cho trong hnh 3.18 di y. Cu tr li c a ra nhnh th t : tn ti u,
u = georges, sao cho u l ng ca pierre.
Cc con s trong hnh tng ng vi th t ca cc hp nht.
(GRANDFATHER (u, pierre))
(1)
(FATHER (x, z) FATHER (z,pierre))
(2)
(4)
(FATHER(jean, pierre))
(3)
(6)
(FATHER (pierre, pierre))
(5)
(SON(pierre, jean))
tht bi
(7)
tht bi
tht bi
(8)
cc lut, m khng tha nhn cc bin trong cc s kin nh trong hai v d trn.
Vic to sinh cc kt qu hp gii u tin theo su c th dn n vng lp, nhng c
th trnh c trong chin lc u tin theo chiu rng. Chng hn, vng lp gy ra bi
chin lc u tin theo su : nu ta thm phn t C9 vo cui danh sch cc tri thc
KNOWLEDGESBASE nh sau :
C9 : SON (x, y) FATHER (y, x)
V nu xt li bi ton GRANDFATHER (u, pierre) v d 2, my s p dng v hn ln cc
lut C6C9C6C9...
1.
2.
3.
4.
5.
6.
7.
7.1
7.2
7.3
7.4
7.5
8.
9.
My suy din
95
nu :
AKNOWLEDGE = P(x, a) Q(x) v nu APROBLEM = P(b, x)
th ngi ta i tn bin x thnh mt bin gc, gi s y, trong AKNOWLEDGE, nhn
c : P(y, a) Q(y). S i tn bin l hp l v bin x (tng ng vi lng t ton th)
trong AKNOWLEDGE thc t l mt bin cm, c lp vi cc bin x c mt trong cc th
hin bi ton hay trong cc biu din tri thc khc. S i tn bin l cn thit P(x, a) v
P(b, x) c th hp nht c.
Trong chng trc, ta gii thiu chi tit thut ton hp nht hai trc kin. Th tc
UNIFICATION c s dng trn y c th c lp trnh da theo thut ton ny. Ta gi
thit rng li gi th tc cha ba tham i : hai tham i l hai biu thc cn hp nht, tham
i th ba l mt danh sch rng. Th tc tr v failure nu khng tn ti php hp nht
gia hai biu thc. Th tc tr v kt qu l php hp nht di dng mt danh sch (c th
rng) cc php th nu tn ti php hp nht.
Bi tp chng 3
1. Cho cc cu sau :
Jhon thch tt c cc loi thc n.
To l mt loi thc n.
Tht g l mt loi thc n.
Bt c th g m bt c ngi no n m khng cht u l thc n.
Bill n lc rang v anh ta vn sng.
Sue bt c th gi m Bill n.
Yu cu :
a. Chuyn cc cu trn thnh cc cng thc chnh (wff) theo v t bc mt.
b. Chuyn cc cng thc chnh cu a. thnh dng mnh .
c. S dng hp gii chng minh rng Jhon thch lc rang.
d. S dng hp gii tr li cu hi Sue n thc g ?
2. Cho cc s kin sau :
Cc thnh vin ca cu lc b ng hng l Joe, Sally, Bill v Ellen.
Joe l chng ca Sally.
Bill l anh trai ca Ellen.
V ca mi thnh vin lp gia nh trong cu lc b cng l thnh vin ca cu lc
b.
Bui hp mt cu lc b ng hng gn nht l ti nh Joe.
Yu cu :
a. Chuyn cc s kin trn thnh cc v t bc mt.
b. S dng hp gii chng minh tnh ng n ca hai mnh di y. Ch nu
khng th chng minh ng, th hy thm vo cc s kin mi c th chng minh :
Bui hp mt cu lc b ng hng gn nht l ti nh Sally.
Ellen cha lp gia nh.
3. Cho cc s kin sau :
Steve ch thch cc mn d hc.
Cc mn hc v lp trnh u kh.
Tt c nhng mn hc trong b mn th dc u d hc.
Bng chuyn l mt mn th dc
S dng hp gii tr li cu hi Steve thch hc mn g ?
R1. B, D, E
R2. D, G
R3. C, F
R4. B
R5. D
R6. A, X
R7. C
R8. X, C
R9. X, B
Yu cu :
a.
b.
c.
d.
F
A
A
X
E
H
D
A
D
CHNG 4
I.
I.1.
97
98
H chuyn gia
MYCIN c khong 500 lut v cc s kin rt tiu biu. Hot ng ca h thng nh sau
:
1.
2.
3.
4.
Phc ho
99
I.2.
Value
CF)
Ng cnh
Tham bin
Gi tr
H s
(Object
Attribute
Value
CF)
a. Ng cnh
C tt c 10 ng cnh dng suy lun lin quan n cc liu php (therapy) cha tr cc
bnh nhim khun trong MYCIN :
Person
Bnh nhn
1.
PERS
Nhng iu tr trc y
2.
CurCuls
Nhng xt nghim lm (cy khun)
3.
CurDrugs
Nhng loi thuc ung
4.
CurOrgs
Nhng c quan (b phn c th) c cy khun
5.
OpDrugs
Nhng loi thuc cho cha tr
6.
PosTher
Cc liu php c th
7.
PriorCuls
Nhng xt nghim tin hnh trc y
8.
PriorDrugs
Nhng loi thuc ung trc y
9.
PriorOrgs
Nhng c quan b nhim khun trc y
10.
C bn loi cu hi trong MYCIN :
1. C tn ti nhng quan trng khng ?
2. C phi vi khun l nguyn nhn gy ra nhim trng khng ?
3. Nhng loi thuc no l hiu qu ?
4. Nhng loi thuc no l hiu qu nht ?
Cc cu hi trn dn n vic to ra mt cy ng cnh ng bao gm cc tnh hung
ng cnh. Chng hn di y l mt cy ng cnh :
Bnh-nhn-1
Cy-vi-khun-1
Cy-vi-khun-2
C-quan-1
C-quan-2
Cy-vi-khun-3
Thuc-1
Thuc-2
Thuc-3
Mt cch tng qut, MYCIN cn c trn nhng gi thuyt (hypothesis) chc chn nht
suy lun v s dng cc siu lut (meta-rule) hi t (focalize) vic tm kim nguyn nhn.
b. Cc tham bin
Cc tham bin trong MYCIN u c nh kiu v c gn nhn vi :
H thng : Y/N, NUMB, ONE_OF, ANY_OF
PROMPT (Du nhc) : cu hi yu cu ngi s dng g vo mt gi tr.
100
H chuyn gia
CFR
Cc lut :
AB
CFR
A (B
C)
T hp cc gi thit :
C
CFR
101
Combine(CF1, CF2 ) =
nu CF1 0 v CF2 0
CF1 + CF2
1 - min{CF1, CF2}
nu CF1 0 v CF2 0
I.3.
a. Th tc MONITOR
Begin { Monitor }
OK = True
While Cha ht iu kin And OK Do Begin
Ly mt iu kin
If Cc d liu ca iu kin tho mn Then Gi th tc FindOut
If iu kin sai Then OK = False
Else Ly iu kin tip theo
End
If OK Then a ra kt lun
b. Th tc FINDOUT
Begin { FindOut }
If C d liu Lab Then Begin
Yu cu ngi s dng tr li
If Not Tm thy kt qu Then Begin
Tm gi cc lut lin quan n d liu
Gi th tc Monitor
End
End
Else Begin
102
H chuyn gia
II.
103
H sn xut OPS5
II.1.
104
H chuyn gia
Ti mi thi im, ngi s dng nhn phm F1 hoc gi lnh Help gi hng dn ca
OPS5.
Mn hnh hng dn xut hin nh sau :
II.2.
OPS5
B nh lm vic
C s lut v s kin
Mt suy din
105
Lnh ny khai bo kiu d liu h-s-xin-vic gm cc thuc tnh lin quan n ngi xin
vic nh h-lt, tn, phi, tui, a-ch, ngh-nghip. Ch trong OPS5, du dash (-), nh trong
h-s-xin-vic, l thay cho du cch (whitespace) v cc du cch nh tab, spaces, linefeeds
c dng phn cch trong mt chng trnh OPS5.
V d 2 :
Ta xt mt lp cc dng c trong mt phn xng sn xut, c t tn l tool . Mi
dng c (thuc lp tool ) c cc thuc tnh : tn dng c (th hin chc nng ca dng c ),
kch thc, v tr ca dng c trong phn xng ti mt thi im cho, trng lng, trng
thi s dng, v.v...
Lp c tool khai bo nh sau :
( literalize tool name size weight position state )
106
H chuyn gia
V d sau y cho php tham chiu n thuc tnh vect position ca lp tool, mt vect
c 2 thnh phn v mt vect c 4 thnh phn :
( tool name pipekey position cupboard hook-45 )
( tool name crowbar position settled localcoordinate 124 66 )
107
( p rule-name
left-member right-member )
trong :
tn lut,
iu kin, cn c gi l cc mu so khp (patterns) my suy din
tin hnh so khp (match),
right-member hnh ng (actions) c trin khai khi iu kin tha mn,
ngn cch phn bn tri v phn bn phi lut.
du
V d, chn on mt ngi mc bnh cm cm, ta vit lut sau :
rule-name
left-member
(p
camcum
( benh
sot
mui
dau
non
sotcao
khorat
daudau
buonnon )
Lut camcum trn c chn ra khi phn bn tri lut c so khp tha mn vi cc
thnh phn trong b nh lm vic WM, tc l c tnh trng sotcao, khorat, daudau, binon.Khi
, phn bn phi lut s c thc hin : in ra bnh m bnh nhn mc phi v bi thuc
cha tr.
cho php lc tt c s kin ca lp tool m v tr position (thnh phn u tin ca thuc tnh
vect ny) c gi tr l settled. Bin <tool-name> c gn gi tr cho thuc tnh name. Khai
bo sau y :
( tool name englishkey size >= 12 position <place> )
lc tt c cng c c tn eyekey, hay pipekey, hay flat key (php tuyn), c kch thc nm
gia 9 v 13 (php hi).
108
H chuyn gia
hay :
{ ( tool name englishkey position settled ) <key1> }
109
To ng dn vo-ra
(hu ht cc shell OPS5 t ng mc nh thit b vo-ra).
M v gn mt tn cho tp d liu tham chiu sau .
ng mt tp m.
110
H chuyn gia
Khi ci t mt h chuyn gia, ngi ta thng gp nhng bt li lin quan n tnh hiu
qu ca mt c s s kin fb, chng hn :
Ch rng cc thuc tnh v cc thnh phn thuc tnh vect ca mt lp khng phi
c nh ngha ht cho mi s kin.
Mi s kin ca fb c lu gi thi im to ra nh mt b m khi ng bt u t
gi tr 1 v tng ln 1 mi ln mt s kin mi c to ra, hay c s thay i s kin. Nh
vy, mi s kin c t tng ng vi mt s th t v ngi s dng c th ch nh n.
Chng hn, lnh :
(remove 1 3)
loi b cc s kin 1 v 3 ca fb. Lnh (wm) cho php xem ni dung ca fb.
II.2.5. B nh lm vic
B nh lm vic WM l ni lu tr cc gi tr s kin. Mi s kin trong WM c gi l
mt phn t nh vn hnh (working memory element). B nh lm vic c truy cp v
hot ng vi nhng kh nng nh sau :
Ngi s dng c th lu tr cc phn t nh vn hnh trong sut qu trnh son tho
chng trnh OPS5.
Ngi s dng c th thm, xa b hoc sa i cc s kin ca WM trong khi chng
trnh vn ang thc hin.
My suy din tin hnh so khp cc thnh phn bn tri lut ang xt vi cc phn t
nh vn hnh.
Trong qu trnh g ri (debugging), ngi s dng c th xem ni dung ca WM nh h
thng tng tc ca OPS5 (interactive shell), lnh (wm).
a. Cu trc b nh lm vic
B nh lm vic ca OPS5 c cu trc tng t bn ghi (record) trong cc ngn ng lp
trnh quen thuc nh Pascal, C, ... Tuy nhin, cu trc ca OPS5 n gin hn do mi trng
c th cha bt k kiu d liu no c xc nh ti thi im gn gi tr. Trong khi ,
Pascal hay C b hn ch bi vic gn kiu d liu ban u. Ngn ng OPS5 yu cu cc phn
t nh vn hnh phi c khai bo trong phn u tin ca chng trnh nh lnh literalize.
b. Khi to b nh lm vic
111
h-lt hong-th
tn ng
phi n
tui 21
a-ch 18-ong-ich-khim-da-nang
ngh-nghip gio-vin )
II.3.
Lm vic vi OPS5
112
H chuyn gia
End { Monitor }
bng cch hoc g trc tip ti du nhc lnh, hoc t phn bn phi mt lut. Chin lc
LEX gii quyt xung t qua bn bc nh sau :
1. Loi b (discard, hay refraction) cc lut trong tp xung t c chn ra trn cng
mt d liu. Nu ch cn li mt lut trong tp xung t th ly lut thc hin,
nu khng th thc hin bc tip theo.
2. Sp xp cc thnh phn bn tri theo th t gim dn ca cc th thi gian v so snh
tt c cc th thi gian . Sau so snh cc thnh phn bn tri ca cc lut trong
tp xung t tm ra lut c thnh phn va mi lm bin i (altered) WM. Nu tm
c lut c cc iu kin khp vi cc phn t ca WM c th thi gian mi nht th
chn n thc hin. Nu c rng buc xut hin th loi tr tt c cc lut khng c
rng buc t tp xung t v tip tc bc tip theo.
3. Da trn cc thuc tnh vhoc cc bin, so snh cc iu kin ca cc lut cn li theo
nguyn tc lut no c nhiu mu so khp hn th lut quan trng hn. Nu ch cn
li mt lut trong tp xung t th chn n. Nu c rng buc xut hin th loi tr tt
c cc lut khng c rng buc trong tp xung t v tip tc bc tip theo.
113
4. Nu sau khi thc hin cc bc trn m vn cn nhiu lut trong tp xung t th chn
ngu nhin (selected randomly) mt lut v thc hin n.
114
H chuyn gia
tenhs minh
lop 10d
toan 8
ly 7
hoa 8
diemtb ( compute (( toan+ly+hoa )//3 ))))
Gi tr ca php ton c tnh ton v c lu tr trong WM trc khi thc hin lnh
make. Nhng lp trnh vin OPS5 nhiu kinh nghim c th thc hin cc php ton phc tp
c. Yu t chc chn
Hu ht cc h chuyn gia cho li khuyn hoc gii quyt mt vn no vi kt qu
c chnh xc c o bi chc chn CF. Gi tr ca CF thay i t -1, ng vi sai chc
chn, n +1, ng vi ng chc chn. Gi tr CF=0 cho bit khng bit, gi tr m th
hin khng tin cy vo gi thuyt trong khi gi tr dng th hin tnh chc chn s tin
cy vo gi thuyt.
115
C th sai
CF
-1
C th ng
Khng bit
1
ng chc chn
Trong OPS5, t chc chn khng phi l xc sut, m l cc o khng hnh thc v
s tin tng hay tin cy vo mt vn . th hin tin cy ny, ngi thit k chng
trnh thng thm vo mt s kin mt gi tr CF ph hp. V d, hai s kinhm nay c
kh nng tri s ma v hm nay tri ma, CF=0.6 c ngha nh nhau. Gi tr CF=0.6
c hiu l c kh nng.
Ngi ta cng dng h s CF trong lut th hin quan h khng chc chn gia iu
kin trong phn bn tri lut v hnh ng trong phn bn phi lut.
nu
c my en
V d :
th
tri s ma
CF=0.8
II.4.
II.4.1. nh gi
OPS5 l mt ngn ng xy dng h chuyn gia kh tiu biu. OPS5 mang y nhng
u im ca mt ngn ng da trn lut khi thit k mt chng trnh h chuyn gia :
Mi trng thit k cho cc ngn ng da trn lut khng phc tp do cu trc lut IFTHEN n gin, d hiu v d s dng, d qun l cc s kin c lu tr trong b nh
lm vic.
Mi lut biu din c lp mt lng kin thc ring, thun tin trong vic kim tra, cp
nht v s dng.
S tch bit gia cc lut cho php b sung cc lut mi, to iu kin m rng d dng
cc tri thc trong h thng tri thc ang xt .
Cc lut thng theo mt hng duy nht : theo hng suy lun tin hoc theo hng suy
lun li.
H thng vn hnh nng n do phi so khp mu v gii quyt xung t. Cng gii quyt
mt vn , OPS5 thc hin chm hn so vi ngn ng C hoc ngn ng Pascal.
116
H chuyn gia
Khc vi trnh din dch OPS5, OPS83 l mt trnh bin dch (compiler), cho php giao
tip vi cc ngn ng khc mt cch d dng, chng hn ngn ng C. V vy, tri thc ca h
chuyn gia v giao din ngi dng c thit k thun tin v hiu qu.
Tng t ngn ng C, Pascal,trong mt chng trnh OPS83, ngi s dng khng
nhng c th thc hin cc vng lp FOR, WHILE, m cn c th gi hm v th tc. Tuy
nhin, khc vi C, Pascal, ..., OPS83 l mt ngn ng thit k h chuyn gia da trn lut,
nn OPS83 cn cho php xy dng cc lut.
OPS83 l phin bn hon thin ca OPS5, va cho php thit k h chuyn gia da trn
lut, va cho php xy dng mt giao din ho linh ng to iu kin thun li trong vic
giao tip gia ngi s dng v h chuyn gia.
H chuyn gia
Ph lc A
117
118
Key Summary:
Ctrl-L
Ctrl-E
Ctrl-W
Ctrl-C
Ctrl-O
Ctrl-P
Ctrl-R
ALT-R
ALT-S
ALT-H
ALT-B
Ctrl-D
Ctrl-U
F1
F2
F4
F5
H chuyn gia
2.
Interp: The OPS5 Interpreter
The OPS5 interpreter is where you will spend most of your time. It can be entered only by
moving the highlight to the Interp choice and typing enter.
If you have had experience with LISP implementations of OPS5, then you should feel
comfortable in the Sienna OPS5 interpreter environment, since all of the same top-level
commands are available, and work the same way. In addition to the standard commands are a
few that are unique to Sienna OPS5, and among the standard commands are some that are
additionally available through pop-up windows.
Choice list functions which are preceded by an exclamation point -- !Run !Step !Halt !Back;
are top level 'Alt' commands, and produce an immediate action. To invoke one of these
commands, type alt and the first letter of the desired 'alt' command. The other entries on the
choice list are 'Ctrl' commands (except for Interp and exit) which can be invoked by typing
ctrl followed by the capitalized letter in the command name. The ctrl commands cause a popup window to be displayed containing information specific to the command. alt and ctrl
commands are dispatched immediately. Even if an OPS5 command has been entered at the
command prompt, if a ctrl/alt command is invoked, it is immediately executed. The command
that was typed at the OPS5 prompt will not be evaluated until the enter key is pressed. Both
alt and ctrl commands are further described below.
3.
Edit: How and When to Enter the Editor
The editor may be invoked by any one of four methods:
1. By moving the choice menu highlight to Edit and typing enter.
2. When in the interpreter, by typing Ctrl-E.
3. When in the Rules window, by selecting the Edit option, selecting a rule, and typing enter.
4. When loading a file into the interpreter, if a syntax error is found and the second
parameter of the load function is 'T', the editor is invoked automatically with the cursor
placed on the line where the error was detected.
When the first two methods are used, the editor buffer which was last displayed, or last
loaded, will be the active buffer. If no files have been loaded into the system, then the default
scratch buffer will be active.
Ph lc A
119
When the third method is used to invoke the editor, the buffer containing the selected rule is
made active and the top of the screen is positioned at the beginning of the selected rule. The
editor can be exited at any time by pressing esc.
4.
Help: Using the Help Screen
The help screen provides one screen of help, which is available either by selecting the help
option on the choice list and pressing enter, or, when the interpreter is active, by typing Ctrl-L.
Information on the Help screen is divided into three categories: commands, actions, and RHS
functions. The commands category includes commands that can be entered at the top-level. In
addition to those listed, any action preceded by an asterisk in the actions list can also be
entered at the top level. The actions category are those actions that can be entered in the right
hand side of a rule. The RHS function category are functions which can be placed within
most RHS actions. The notational conventions of the help screen are as follows:
n
an integer number
p1
the name of a production
s
a symbol
v
a variable
< x x ...>
optional arguments
/
select one of the listed
[ .. ]
one of the included options is required.
The heLp screen is meant to be a reminder of the most-used language elements and gives an
indication of the syntax.
Press any key to exit the help window.
5.
Options: Setting OPS5 Options
The Options window may be selected by either moving the choice list highlight to Options
and pressing enter, or, when in the interpreter, by typing Ctrl-O. The Options window
displays the current settings of the strategy, watch level, delay level, echo status, and the
default file settings.
The strategy, watch, delay and echo status may be changed in the options window. You can
select the item to change by pressing either the cursor up or cursor down keys. When you
have selected the item to change, one of the allowable values for that item may be selected by
pressing the left or right cursor keys. The strategy, watch and delay options are also top level
commands.
The default files section displays the currently active files for the trace, accept and write files.
To change these values you must use the OPENFILE and DEFAULT actions at the top-level.
To leave the Options window, press the esc or enter key.
6.
Wm: Displaying the Contents of Working Memory
The Wm (Working Memory) window may be displayed by selecting the Wm option from the
choice list and pressing enter, or by typing Ctrl-W whenever text input can be entered, when
the Cs window is displayed, or when the Rules window (but no other) is displayed.
The current contents of working memory are displayed in order of recency, with the latest
addition to, or change of, working memory being displayed first.
The bottom of the window lists the active keys for the window. If there are more WMEs in
working memory than can be displayed in the window, the cursor up, cursor down, page up,
page down, home and end keys can be used to move through the rest of working memory. If
the WMEs are too long to be displayed in the window, the left cursor and right cursor keys
can be used to shift the window contents left and right.
To exit the window press esc.
120
H chuyn gia
7.
Cs:
Displaying the Conflict Set Entries
The Cs window is invoked by selecting the CS option from the choice list, by typing ctrl-c
whenever text input can be entered, or when the Wm or Rules window, but no other are
displayed. The Cs window displays the contents of the current conflict set, sorted in the order
in which the rule instantiations would fire. Displayed with the name of the instantiated rule is
the list of time tags of instantiating WMEs for the rule. Given the instantiating WME time
tags, the Wm window can be invoked to look up the actual working memory elements.
If there are more conflict set entries than can be displayed in the window at one time, the
cursor up, cursor down, page up, page down, home and end keys may be used to view the rest
of the entries. The cursor left and cursor right keys can be used to scroll the window to the
left and right as needed.
To exit the window, press esc.
8.
!Run -- Using the Run Choice
The !Run choice can be selected with the choice list highlight, or can be invoked by typing
Alt-R from within the interpreter. This has the same effect as typing "(RUN)" at the OPS5
prompt. The interpreter begins running and continues until no productions are instantiated or
a halt action or break point is encountered.
Note that, when within the interpreter, typing alt-R causes the interpreter to be run
immediately. Commands which may have been entered at the OPS5 prompt are not evaluated
unless enter has been first pressed from within the interpreter.
9.
!STEP -- Single Stepping Through Your Program
The !Step commands can be invoked by moving the highlight to that option and pressing
enter, or by typing alt-s from within the interpreter.
The action of the !Step command is to fire 1 production from the conflict set. It is
functionally equivalent to typing (RUN 1) at the OPS5 prompt, but somewhat more
convenient.
Commands entered but not evaluated are not evaluated by the !Step command.
10.
!HALT:
How to Stop a Runaway Program
The !Halt commands can be invoked either by selecting it in the choice list menu, or by typing
Alt-H while a program is running. However, since the !Halt commands is useful only while the
interpreter is running, and it is not possible to select an option with the highlight during that
time, the only meaningful way that the command can be invoked is by typing Alt-H.
The !Halt command is functionally equivalent to the evaluation of a Halt action in the RHS of
a production. When the !Halt command is executed the interpreter is halted immediately after
the current rule has completed firing, and control returns to the top level.
11.
!BACK: Running Backwards -- Undoing Rule Firings
The !Back commands can be selected from the choice list by moving the highlight to the
option and pressing enter, or by typing alt-b from within the interpreter.
The !Back command is functionally equivalent to typing (BACK 1) at the OPS5 prompt. The
interpreter is backed up one rule firing and the system is restored to the state prior to the last
rule firing.
The action of this command is immediate. Any commands entered at the OPS5 prompt but
not yet evaluated by typing enter are not evaluated by invoking this command.
Ph lc A
121
12.
PBREAK: Listing Break Points
The Pbreak option opens a window which displays all currently set break points. The option
can be selected from the menu by highlighting the option and pressing enter, or by typing
CNTl-p from within the interpreter.
Break points cannot be set or cleared with this option, use the Rule window instead. If no
break points have been set then the message "** no break points set **" is displayed in the
window. To close the window and exit, press Esc. To set or clear break points use either the
rules window or the pbreak command.
13.
RULES: Displaying and Manipulating Rules
1.
How to use the Rules screen
The Rules window can be invoked by selecting the Rules choice with the highlight and
pressing enter, or by typing Ctrl-R whenever text input can be entered or while the Wm or
Cs windows are displayed.
The Rules window displays a list of the compiled rules and allows one r of four operations:
Edit, Matches, Pbreak, and Excise, to be applied r to the selected rule. To select a rule, use
the cursor up and cursor r down keys to highlight the desired rule. When there are more rules
r than can fit on one rules screen, you can also use the page up, page r down, home and end
keys to view the rest of the rules. If rule names r are too long to fit within the window, the
Ctrl-Cursor-Left and r Ctrl-Cursor-Right keys can be used to view the truncated portion of r
the rule names.
To select one of the four operations to apply to the selected rule, r uses the Cursor-Left and
Cursor-Right keys to make you choice, and r then press enter.
To summarize the Rules window keys and their actions:
Cursor up
move rules highlight bar up
Cursor down
move rules highlight down
Page up
scroll up one window
Page down
scroll down one window
Home
to top of rules
End
to bottom of rules
Ctrl cursor left
scroll window left
Ctrl cursor right
scroll window right
2.
EDIT: Editing a rule
A rule may be edited by selecting the edit option along with a r particular rule. When enter is
pressed Sienna Edit is entered. The r buffer that contains the rule is made the active buffer,
and the top r of the buffer window is placed at the top of the selected rule. If r the rule cannot
be found, then an error message is displayed.
A rule will not be found if the edit buffer containing the rule does r not exist, or if the rule
text has been deleted.
3.
MATCHES: Displaying WMEs that match a rule
The Matches option performs the same task as the matches command r from the OPS5
prompt. When the Matches option is used from the rules r window is used, however, a
window is opened and the matches for the r rule are displayed in the window. If there is more
information than r can be displayed at one time in the window, then any of the special r keys
listed at the bottom of the window can be used to browse through r the display.
Some care should be exercised when using the Matches option. The r matches information,
when displayed in the window, must be formatted r into a data structure in order to allow
browsing through the list. If r the matches of a rule which creates large cross products of
122
H chuyn gia
objects is r displayed, the resulting space needed to preformat the information r could exceed
available memory. If you suspect that this will be the r case, then use the matches command
at the OPS5 prompt instead.
To close the Matches window, press esc.
4.
PBREAK:
Setting and clearing break points
The Pbreak option allows you to easily set and clear break points r on rules. To set or clear a
break point, select Pbreak with the r highlight, select the rule you want to set/clear, and press
the enter r key. A message will be displayed at the top of the screen.
When a rule has a break point set on it, an asterisk is visible to the r left of the rule name.
When the break point is cleared, the asterisk ris cleared also.
5.
EXCISE: Purging rules from the Knowledge Base
The Excise option can be used to purge a rule from the RETE network. To excise a rule,
select the rule in the Rules window, select the Excise option, and press enter. A window will
appear to verify that you want the rule excised. If you do, then type 'Y'. If not, just press enter
or esc to cancel the operation.
Excising a rule from the RETE network does NOT delete the rule text from the edit buffer, if
it exists in one.
14.
EXIT: Leaving the Workbench
To exit the workbench you must select the exit option on the main choice list, and then press
enter. If you are in the interpreter, the editor, or any other selection, then you must first return
to the choice list by pressing esc.
Upon exit, if any edit buffers have been altered since being last saved, a warning is given
along with the chance to abort the exit. You may then enter the editor and save the modified
buffers by pressing F-4 within each buffer.
http://www.haley.com/3173193312476179/ReteAlgorithm.html
H chuyn gia
123
Ph lc B
Mt s h chuyn gia
Historical Projects
A number of major projects are now considered completed work; their goals have been met,
and our research attention has moved on to new areas.
DENDRAL (1965-83)
The DENDRAL Project was one of the earliest expert systems. DENDRAL began as an
effort to explore the mechanization of scientific reasoning and the formalization of scientific
knowledge by working within a specific domain of science, organic chemistry. Another
concern was to use AI methodology to understand better some fundamental questions in the
philosophy of science, including the process by which explanatory hypotheses are discovered
or judged adequate. After more than a decade of collaboration among chemists, geneticists,
and computer scientists, DENDRAL had become not only a successful demonstration of the
power of rule-based expert systems but also a significant tool for molecular structure
analysis, in use in both academic and industrial research labs. Using a plan-generate-test
search paradigm and data from mass spectrometry and other sources, DENDRAL proposes
plausible candidate structures for new or unknown chemical compounds. Its performance
rivals that of human experts for certain classes of organic compounds and has resulted in a
number of papers that were published in the chemical literature. Although no longer a topic
of academic research, the most recent version of the interactive structure generator, GENOA,
has been licensed by Stanford University for commercial use.
META-DENDRAL (1970-76)
META-DENDRAL is an inductive prograrn that automatically formulates new rules for
DENDRAL to use in explaining data about unknown chemical compounds. Using the plangenerate-test paradigm, META-DENDRAL has successfully formulated rules of mass
spectrometry, both by rediscovering existing rules and by proposing entirely new rules.
Although META-DENDRAL is no longer an active program, its contributions to ideas about
learning and discovery are being applied to new domains. Among these ideas are that
induction can be automated as heuristic search; that, for efflciency, search can be broken into
two steps--approximate and refined; that learning must be able to cope with noisy and
incomplete data; and that learning multiple concepts at the same time is sometimes
inescapable.
MYCIN (1972-80)
MYCIN is an interactive program that diagnoses certain infectious diseases, prescribes
antimicrobial therapy, and can explain its reasoning in detail. In a controlled test, its
performance equalled that of specialists. In addition, the MYCIN program incorporated
several important AI developments. MYCIN extended the notion that the knowledge base
should be separate from the inference engine, and its rule-based inference engine was built on
a backward-chaining, or goal-directed, control strategy. Since it was designed as a consultant
for physicians, MYCIN was given the ability to explain both its line of reasoning and its
knowledge. Because of the rapid pace of developments in medicine, the knowledge base was
designed for easy augmentation. And because medical diagnosis often involves a degree of
uncertainty, MYCIN's rules incorporated certainty factors to indicate the importance (i.e.,
likelihood and risk) of a conclusion. Although MYCIN was never used routinely by
physicians, it has substantially influenced other AI research. At the HPP, MYCIN led to work
in TEIRESIAS, EMYCIN, PUFF, CENTAUR, VM, GUIDON, and SACON, all described
below, and to ONCOCIN and ROGET. The book Rule-Based Expert Sytem: The MYCIN
Ph lc B
Mt s h chuyn gia
124
Experiment at the Stanford Heuristic Programming Project describes the decade of research
on MYCIN and its descendants.
TEIRESIAS (1974-77)
The knowledge acquisition program TEIRESIAS was built to assist domain experts in
refining the MYCIN knowledge base. TEIRESIAS developed the concept of metalevel
knowledge, i.e., knowledge by which a program can not only use its knowledge directly, but
can examine it, reason about it, and direct its use. TEIRESIAS makes clear the line of
reasoning used in making a diagnosis and aids physician experts in modifying or adding to
the knowledge base. Much of this was incorporated into the EMYCIN framework. The
flexibility and understandability that TEIRESIAS introduced into the knowledge base
debugging process have been models for the design of many expert systems.
EMYCIN (1974-79)
The core inference engine of MYCIN, together with a knowledge engineering interface, was
developed under the name EMYCIN, or "Essential MYCIN." It is a domain-independent
framework that can be used to build rule-based expert systems for consultation problems such
as those encountered in diagnosis or troubleshooting. EMYCIN continues to be a primary
example of software that can facilitate building expert systems and has been used in a variety
of domains, both medical (e.g., PUFF) and nonmedical (e.g., SACON). The system has been
widely distributed in the U.S. and abroad and is the basis for the Texas Instruments software
system called Personal Consultant.
PUFF (1977-79)
The PUFF system was the first program built using EMYCIN. PUFF's domain is the
interpretation of pulmonary function tests for patients with lung disease. The program can
diagnose the presence and severity of lung disease and produce reports for the patient's file.
Once the rule set for this domain had been developed and debugged, PUFF was transferred to
a minicomputer at Pacific Medical Center in San Francisco, where it is used routinely to aid
with interpretation of pulmonary function tests. A version of PUFF has been licensed for
commercial use.
CENTAUR (1977-80)
The CENTAUR system was designed to experiment with an expert system that combines
both rule- and frame-based approaches to represent and use knowledge about medicine and
medical diagnostic strategies. For purposes of comparison, CENTAUR was developed for the
same task domain as PUFF, interpretation of pulmonary function tests. CENTAUR
performed well, demonstrating the effectiveness of this representation and control
methodology.
VM (1977-81)
The Ventilator Manager (VM) program interprets online quantitative data in the intensive
care unit (ICU) and advises physicians on the management of post-surgical patients needing a
mechanical ventilator to help them breathe. While based on the MYCIN architecture, VM
was redesigned to allow for the description of events that change over time. Thus, it can
monitor the progress of a patient, interpret data in the context of the patient's present and past
condition, and suggest adjustments to therapy. VM was tested in the surgical ICU at Pacific
Medical Center in San Francisco. Some of the program's concepts have been built directly
into more recent respiratory monitoring devices.
125
H chuyn gia
GUIDON (1977-81)
GUIDON is an experimental program intended to make available to students the expertise
contained in EMYCIN-based systems. GUIDON incorporates separate knowledge bases for
the domain itself and for tutoring, and engages the student in a dialogue that presents dornain
knowledge in an organized way over a number of sessions. Using the MYCIN knowledge
base as the domain to be taught, work in GUIDON explored several issues in intelligent
computer-assisted instruction (ICAI), including means for structuring and planning a
dialogue, generating teaching material, constructing and verifying a model of what the
student knows, and explaining expert reasoning. Although GUIDON was successful in many
respects, it also revealed that the diagnostic strategies and some of the medical knowledge
that were contained implicitly in the MYCIN rules had to be made explicit in order for
students to understand and remember them easily. As a result, a new expert system,
NEOMYCIN, has been developed.
SACON (1977-78)
SACON (for Structural Analysis CONsultant) was implemented as a test of the EMYCIN
framework in an engineering context. SACON advised structural engineers on the use of
MARC, a large structural analysis program, and has served as a prototype of many advisory
systems.
MOLGEN (1975-84)
The MOLGEN project has applied AI methods to research in molecular biology. Initial work
focused on acquiring and representing the expert knowledge needed to design and simulate
experiments in the domain. This led to the development of UNITS, described below. The
second phase of research resulted in two expert systems, representing distinct approaches to
the design of genetic experiments. One system used "skeletal plans," which are abstracted
outlines of experiment designs that can be applied to specific experimental goals and
environments. The other system was based on planning with constraints, in which planning
decisions are made in the spaces of overall strategy, domain-independent decisions, and
domain-dependent laboratory decisions, and the interaction of separate steps or subproblems
of an experiment constitute constraints on the overall problem. These two systems were later
synthesized into a third system, called SPEX. Current work, known as MOLGEN-II (see the
section "The Heuristic Programming Project"), is investigating the process of theory
formation in molecular biology.
UNITS (1975-81)
The frame-based UNITS system was developed in the MOLGEN project as a generalpurpose knowledge representation, acquisition, and manipulation tool. Designed for use by
domain experts with little previous knowledge of computers, it provides an interface that
allows the expert to describe both factual and heuristic knowledge. It contains both domainindependent and domain-specific components, including modified English rules for
describing the procedural knowledge. UNITS has been licensed by Stanford University for
commercial development.
AM (1974-80)
The AM program explored machine learning by discovery in the domain of elementary
mathematics. Using a framework of 243 heuristic rules, AM successfully proposed plausible new
mathematical concepts, gathered data about them, noticed regularities, and, completing this cycle,
found ways of shortening the statement of those hypotheses by making new definitions.
However, AM was not able to generate new heuristics. This failing was found to be inherent in
the design of AM; related work on discovering new heuristics was done as part of EURISKO.
Ph lc B
Mt s h chuyn gia
126
EURISKO (1978-84)
A successor to AM, EURISKO has also investigated automatic discovery, with a particular
emphasis on heuristics, their representation, and the part played by analogy in their discovery.
Several hundred heuristics, mostly related to functions, design, and simulation, guide
EURISKO in applying its knowledge in several domains. In each domain, the program has
three levels of task to perform: working at the domain level to solve problems; inventing new
domain concepts; and synthesizing new heuristics that are specific and powerful enough to
aid in handling tasks in the domain. EURISKO has been applied to elementary mathematics;
programming, where it has uncovered several Lisp bugs; naval fleet design, where it has
reigned undefeated in the Traveller Trillion Credit Squadron tournament; VLSI design, where
it has come up with some novel and potentially useful three-dimensional devices; oil-spill
cleanup; and a few other domains.
RLL (1978-80)
RLL (for Representation Language Language) is a prototype tool for building customized
representation languages. RLL is self-descriptive, i.e., it is itself described in terms of RLL
units. It has been used as the underlying language for EURISKO and other systems.
Contract Nets (1976-79)
The Contract Nets architecture is an early contribution to work on computer architectures for
parallel computation. Recently, it has received much attention in the emerging literature on
multiprocessor architectures for symbolic computation. In the Contract Nets architecture,
problem solving is distributed among decentralized and loosely coupled processors. These
processors communicate about task distribution and answers to subproblems through an
interactive negotiation analogous to contract negotiation in the building trades: the "contract"
is given to the processor that can handle the task at the lowest system cost, and failure to
complete a task results in its reassignment to another processor.
CRYSALIS (1976-83)
The CRYSALIS project explored the power of the blackboard model in interpreting X-ray
data from crystallized proteins. The overall strategy was to piece together the threedimensional molecular structure of a protein by successively refining descriptions of the
structure. Although the knowledge base was developed for only a small part of the problem,
the blackboard model with its hierarchical control structure was shown to be very powerful
for solving such highly complex problems. Results from CRYSALIS are currently being
incorporated in other KSL work and have contributed to improved models of control.
AGE (1976-82)
The AGE (for Attempt to GEneralize) project sought to develop a software laboratory for
building knowledge-based programs. AGE-1, the knowledge engineering tool that resulted, is
designed for building programs that use the blackboard problem-solving framework. It can
aid in the construction, debugging, and running of a program. AGE-1 has been used in a
number of academic laboratories and for various applications in industry and the defense
community.
QUIST (1978-81)
QUIST combines AI and conventional database technology in a system that optimizes queries
to large relational databases. QUIST uses heuristics embodying semantic knowledge about
the contents of the database to make inferences about the meanings of the terms in a query. It
reformultes the original query into an equivalent one whose answer can be found in the
database more efficiently. Then conventional query optimization techniques are used to plan
an efflcient sequence of retrieval operations.
127
H chuyn gia
GLisp (1982-83)
GLisp is a programming language that allows programs to be written in terms of objects and
their properties and behavior. The GLisp compiler converts such programs into efficient Lisp
code. The compiler has been released to outside users, along with the GEV window-based
data inspector, which displays data according to their GLisp description. GLisp is now being
distributed from the University of Texas.
Model of Endorsement (1982-85)
The model of endorsement represents and reasons with heuristic knowledge under
uncertainty. Instead of associating numerical weights with evidence, the model of
endorsement discriminates kinds of evidence and distinguishes the importance of different
evidence-gathering situations. Thus, this model's significance is that it examines the question
of how to reason about uncertainty, as well as with it. in expert systems.
AI Handbook (1975-82)
The Handbook of Artificial Intelligence was a community effort by KSL (formerly HPP)
students and researchers plus collaborators around the country. It describes the fundamental
ideas, useful techniques, and exemplary programs from the first 25 years of AI research.
Designed for scientists and engineers with no AI background. the three-volume Handbook
book contains some 200 articles organized into 15 chapters. Chapters cover such topics as
General Readings
Clancey, W. J., and E. H. Shortliffe. Readings in Medical Artificial Intelligence: The First
Decade. Reading, MA: Addison-Wesley, 1984.
Feigenbaum, E. A., and P. McCorduck. The Fifth Generation: Artificial Intelligence and
Japan's Computer Challenge to the World. Reading, MA: Addison-Wesley, 1983.
Hayes-Roth, F., D. A. Waterman, and D. Lenat, eds. Building Expert Sytems. Reading, MA:
Addison-Wesley, 1983.
Barr, A., E. A. Feigenbaum, and P. Cohen, eds. The Handbook of Artificial Intelligence,
Volumes 1-3. Los Altos, CA: Kaufmann, 1981, 1982.
Feigenbaum, E. A. The art of artificial intelligence: 1. Themes and case studies of knowledge
engineering. Proceedings IJCAI-77, pp. 1014-1029. (Also published in AFIPS Conf
Proceedings: 1978 Computer Conference. Montvale, NJ: AFIPS Press, 1978.)
AGE
Aiello, N., C. Bock, H. P. Nii, and W. White. AGE reference manual. Memo HPP-81-24
(Knowledge Systems Laboratory), October 1981.
Aiello, N., C. Bock, H. P. Nii, and W. White. Joy of AGing: an introduction to AGl system.
Memo HPP-81-23 (Knowledge Systems Laboratory), October 1981.
Nii, H. P. Introduction to knowledge engineering, blackboard model, and AGE. Memo HPP80-29 (Knowledge Systems Laboratory), March 1980.
Nii, H. P., and N. Aiello. AGE: a knowledge-based program for building knowledge-based
programs. Proceedings IJCAI-79, pp. 645-655.
AM
Davis, R., and D. Lenat. Knowledge-Based Systems in Artificial Intelligence: AM and
TEIRESIAS. New York: McGraw-Hill, 1982.
Blackboard Architecture
Blackboard Architecture Hayes-Roth, B. The blackboard model of control. Artificial
Intelligence, in press.
Hayes-Roth, B. BB-l: an environment for building blackboard systems. Memo HPP-8416
(Knowledge Systems Laboratory), 1984.
Ph lc B
Mt s h chuyn gia
128
129
H chuyn gia
Novak, G. S., Jr. GLisp: a high-level language for AI programming. Proceedings AAAI-82,
pp. 238-241.
Novak, G. S., Jr. GLisp user's manual. Memo HPP-82-1 (Knowledge Systems Laboratory),
January 1982.
GUIDON
Hasling, D., W. J. Clancey, and G. Rennels. Strategic explanations for a diagnostic
consultation system. International Journal of Man-Machine Studies 20(1):3-19 (1984).
London, B., and W. J. Clancey. Plan recognition strategies in student modeling: prediction
and description. Proceedings AAAI-82, pp. 335-338.
Clancey, W. J. lutoring rules for guiding a case method dialogue. International Journal of
Man-Machine Studies 11:25-49 (1979).
Clancey, W. J. Dialogue management for rule-based tutorials. Proceedings IJCAI-79, pp.
155-161.
Intelligent Agent
Rosenschein, J., and M. R. Genesereth. Communication and cooperation. Memo HPP-84-5
(Knowledge Systems Laboratory), March 1984.
Finger, J. J., and M. R. Genesereth. RESIDUE: a deductive approach to design. Memo HPP83-46 (Knowledge Systems Laboratory), December 1983.
MacKinlay, J. Intelligent presentation of information: the generation problem of user
interfaces. Memo HPP-83-34 (Knowledge Systems Laboratory), March 1983.
Finger, J. J. Sensory planning. Memo HPP-82-12 (Knowledge Systems Laboratory), April
1982.
KBVLSI
Brown, H., C. Tong, and G. Foyster. PALLADIO: an exploratory environment for circuit
design. Computer 16(12):41-56 (1983).
Knowledge Acquisition
Bennett, J. S. ROGET: a knowledge-based system for acquiring the conceptual structure of
an expert system. Journal of Automated Reasoning 1(1):49-74 (1985)
Dietterich, T. G. Constraint propagation techniques for theory-driven data interpretation.
Memo HPP 84-46 (Knowledge Systems Laboratory), December 1984.
Dietterich, T. G., and B. G. Buchanan. The role of the critic in learning systems. In O.
Selfridge, E. Rissland, and M. Arbib, eds, Adaptive Control of Ill-Defined Systems. New
York: Plenum, 1984. (NATO Advanced Workshop on Adaptive Control of Ill-Defined
Systems; Devon, England, June 1981.) Also Memo HPP-81-19 (Knowledge Systems
Laboratory), January 1981.
Buchanan, B. G., T. M. Mitchell, R. G. Smith, and C. R. Johnson, Jr. Models of learning
systems. Encyclopedia of Computer Science and Technology 11 (1978).
Mitchell, T. M. Version spaces: an approach to concept learning. Memo HPP-79-2
(Knowledge Systems Laboratory), January 1979. Also Stanford CS Report STAN-CS-78711, 1978.
Model of Endorsement
Cohen, P. Heuristic Reasoning about Uncertainty: An AI Approach. Boston: Pitman, 1985.
Ph lc B
Mt s h chuyn gia
130
MOLGEN
Friedland, P., and L. Kedes. Discovering the secrets of DNA. To appear in joint issue
ACM/Computer, October 1985.
Friedland, P., and Y. Iwasaki. The concept and implementation of skeletal plans. Journal of
Automated Reasoning 1(2) (in press).
ach, R., Y. Iwasaki, and P. Friedland. Intelligent computational assistance for experiment
design. Nucleic Acids Research, January 1984.
Iwasaki, Y., and P. Friedland. SPEX: a second-generation experiment design system.
Proceedings AAA1-82, pp. 341-344.
Stefik, M. Planning with constraints. Memo HPP-80-2 (Knowledge Systems Laboratory),
January 1980. Also Stanford CS Report STAN-CS-80-784, 1980.
Friedland, P. Knowledge-based experiment design in molecular genetics. Proceedings
IJCA1-79, pp. 285-287.
MYCIN and EMYCIN
Buchanan, B. G., and E. H. Shortliffe. Rule-Based Expert Systems: The MYCIN Experiments
oJ the Stanford Heuristic Programming Project. Reading, MA: Addison-Wesley, 1984.
van Melle, W. System Aids in Constructing Conultation Programs: EMYCIN. Ann Arbor,
MI: UMI Research Press, 1982.
MRS
Smith, D. E., and M. R. Genesereth. Controlling infinite chains of inference. Memo HPP-846 (Knowledge Systems Laboratory), February 1984.
Genesereth, M. R., and D. E. Smith. Partial programs. Memo HPP-841 (Knowledge Systems
Laboratory), January 1984.
Genesereth, M. R. An overview of meta-level architecture. Proceedings AAA1-8, pp. 119124.
Genesereth, M. R., R. Greiner, and D. E. Smith. A meta-level representation system. Memo
HPP-83-28 (Knowledge Systens Laboratory), May 1983.
NEOMYCIN
Clancey, W. J. Methodology for building an intelligent tutoring system. In W. Kintsch, J.R.
Miller, and P.G. Polson, eds., Method and Tactics in Cognitive Science. Hillsdale, NJ:
Lawrence Erlbaum Associates, 1984.
Clancey, W. J. Acquiring, representing, and evaluating a competence model of diagnosis. In
M.T.H. Chi, R. Glaser, and M. Farr, eds., The Nature of Expertise, in preparation. Also
Memo HPP-84-2 (Knowledge Systems Laboratory), February 1984.
Clancey, W. J. The epistemology of a rule-based expert system: a framework for explanation.
Artificial Intelligence 20(3): 215-251(1983).
Clancey, W. J. The advantages of abstract control knowledge in expert system design.
Proceedings AAA1-8, pp. 74-78.
ONCOCIN
Bischoff, M. B., E. H. Shortliffe, A. C. Scott, R. W. Carlsen, and C. D. Jacobs. Integration of
a computer-based consultant into the clinical setting. Proceedings of the Seventh Annual
Symposium on Computer Applications in Medical Care, pp. 149-152 (October 1983).
Tsuji, S., and E. H. Shortliffe. Graphical access to the knowledge base of a medical
consultation system. Proceedings of AAMSI Congress 1983, pp. 551-555.
Langlotz, C. P., and E. H. Shortliffe. Adapting a consultation system to critique user plans.
International Journal of Man-Machine Studies 19(5):479-496 (1983).
131
H chuyn gia
Gerring, P. E., E. H. Shortliffe, and W. van Melle. The interviewer reasoner model: an
approach to improving system responsiveness in interactive AI systems. AI Magazine
3(4):24-27 (1982).
Suwa, M., A. C. Scott, and E. H. Shortliffe. An approach to verifying completeness and
consistency in a rule-based expert system. AI Magazine 3(4):16-21 (1982).
Shortliffe, E. H., A. C. Scott, M. B. Bischoff, A. B. Campbell, W. van Melle, and C. D.
Jacobs. ONCOCIN: an expert system for oncology protocol management. Proceedings
IJCA1-81, pp. 876-881.
PATHFINDER
Horvitz, E. J., D. E. Heckerman, B. N. Nathwani, and L. M. Fagan. Diagnostic strategies in
the hypothesis-directed PATHFINDER system. First Conference on Artificial Intelligence
Applications, pp. 630-636 (IEEE Computer Society, 1984).
PIXIE
Sleeman, D. H. Basic algebra revisited: a study with 14-year-olds. International Journal of
Man-Machine Studies, in press. Also Memo HPP-83-9 (Knowledge Systems Laboratory),
February 1983.
Sleeman, D. H. A user modelling front end subsystem. International Journal of ManMachine Studies, in press.
Sleeman, D. H. Inferring (mal)rules from pupils' protocols. Proceedings of the 1982
European AI Conference, pp. 160-164.
Sleeman, D. H. Inferring student models for intelligent computer-aided instruction. In R. S.
Michalski, J. G. Carbonell, and T. M. Mitchell, eds., Machine Learning. Palo Alto, CA:
Tioga Press, 1982.
Sleeman, D. H., and J. S. Brown. Intelligent tutoring systems: an overview. In D. H. Sleeman
and J. S. Brown, eds., Intelligent Tutoring Systems. New York: Academic Press, 1982.
PUFF
Aikins, J. S., J. C. Kunz, E. H. Shortliffe and R. J. Fallat. PUFF: an expert system for interpretation
of pulmonary function data. Computers and Biomedical Research 16:199-208 (1983).
QUIST
King, J.J. Query optimization by semantic reasoning. Stanford CS Report STAN-CS-81-861, 1981.
RADIX
Blum, R. L. Representation of empirically derived causal relationships. Proceedings NCA1-8,
pp. 268-271.
Blum, R. L. Discovery, confirmation, and incorporation of causal relationships from a large timeoriented database: the RX Project. Computers and Biomedical Research 15(2):164-187 (1982).
Blum, R. L. Discovery and representation of causal relationships from a large time-oriented
database: the RX Project. In D. A. B. Lindberg and P. L. Reichertz, eds., Medical Informatics
19 (1982).
RLL
Greiner, R., and D. B. Lenat. A representation language language. Proceedings of AAA1-80,
pp. 165-169.
SACON
Bennett, J. S., and R. S. Engelmore. SACON: a knowledge-based consultant for structural
analysis. Proceedings IJCA1-79, pp. 47-49.
Ph lc B
Mt s h chuyn gia
132
SOAR
Rosenbloom, P. S., J. E. Laird, J. McDermott, A. Newell, and E. Orciuch. Rl-SOAR: an
experiment in knowledge-intensive programming in a problem-solving architecture.
Proceedings of the IEEE Workshop in Principles of Knowledge-Based Systems, 1984.
Laird, J. E., P. S. Rosenbloom, and A. Newell. Towards chunking as a general learning
mechanism. Proceeding AAA1-84, pp. 188-192.
TEIRESIAS
Davis, R., and D. Lenat. Knowledge-Based Systems in Artificial Intelligence: AM and
TEIRESIAS. New York: McGraw-Hill, 1982.
UNITS
Smith, R., and P. Friedland. Unit package user's guide. Memo HPP-80-28 (Knowledge
Systems Laboratory), December 1980.
Stefik, M. An examination of a frame-structured representation system. Proceedings IJCA179, pp. 845-852.
VM
Fagan, L. M. VM: representing time-dependent relations in a medical setting. Memo HPP
831 (Knowledge Systems Laboratory), June 1980.
Osborn, J., L. M. Fagan, R. Fallat, D. McClung, and R. Mitchell. Managing the data from
respiratory measurements. Medical Instrumentation 13:6 (1979).
H chuyn gia
133
Ph lc C
Tham kho
Le cerveau humain est constitu d'une toile de milliards de cellules appeles neurones,
comprendre ses complexits semble l'une des dernires frontires des recherches
scientifiques. Une des voies de recherche en Intelligence Artificielle consiste construire des
circuits lectroniques qui sont capables de ragir comme des neurones dans un cerveau
humain. Mais, la plupart des activits neuronales restent inconnues, la complexit du rseau
neuronal constitue prcisment ce que l'on appelle l'intelligence humaine. De par lui-mme
une neurone n'est pas intelligente, mais une fois assemble les neurones sont capables de de
passer les signaux lectriques au travers de ses rseaux.
Systme Expert, une approche descendante
Grce aux normes capacits de stockage d'information, un systme expert est capable
d'interprter les statistiques et en dduire des rgles. Un systme expert fonctionne comme un
dtective qui cherche rsoudre une nigme. En utilisant les informations, les rgles et la
logique, il parvient trouver la solution au problme.Ainsi, un systme expert conu pour
identifier les oiseaux pourrait avoir un raisonnement suivant.
Ph lc C
Tham kho
134
H chuyn gia
135