Вы находитесь на странице: 1из 9

Cc bi ton: Water jug, 8 puzzle, 8 queen, missionary and cannibal, map, tic toe tic

Cc thut ton: hill (simple chn better, steepest chn best, anneal chn best !"i #c su$t e%(&#'()*,
# l current& parent*, d+s, b+s, best +s(ucs g(n* t, -.nh t"i n, greedy h(n* g/n -0ng t, n t"i goal, a star
1 g(n* 2 h(n**, minima# (t3nh !alue cc node l tr4"c, sau -5 t3nh ng46c l7n tr7n d8a tr7n minma#,
n9t g9c l ma#*, planning:
;loc(<orld
=ctions
>)=C?(#, y*:
@: CAB=C(y* DEAFGHI(#*
F: CAB=C(y* DEAFGHI(#*
=: =CJBJ@)K EH(#, y*
LH>)=C?(#, y*:
@: EH(#, y* CAB=C(#* =CJBJ@)K
F: EH(#, y* =CJBJ@)K
=: DEAFGHI(#* CAB=C(y*
@GC?L@(#*:
@: CAB=C(#* EH)=;AB(#* =CJBJ@)K
F: EH)=;AB(#* =CJBJ@)K
=: DEAFGHI(#*
@L)FEWH(#*:
@: DEAFGHI(#*
F: DEAFGHI(#*
=: EH)=;AB(#* =CJBJ@)K
>tac( 1 goal, database 1 start: @hMn rN goal ! start:
)hay thO t,ng goal nOu n5 (hPng nQm trong database bQng precondition 2 action cho t"i (hi stac(
rRng:
@lan
S: LH>)=C?(;, =*
T: >)=C?(;, F*
U: @GC?L@(C*
V: >)=C?(C, =*
W3 dX T:
@lan
S: LH>)=C?(C, =*
T: @L)FEWH(C*
''U: @GC?L@(=*
''V: >)=C?(=, ;*
''Y: LH>)=C?(=, ;*
''Z: @L)FEWH(=*
[: @GC?L@(;*
8: >)=C?(;, C*
\: @GC?L@(=*
S]: >)=C?(=, ;*
F^>:,;ucharest &_ Lrzicenl &_ Wasiul &_ Gasi &_ Heamt ,;ucharest &_ Lrzicenl &_ Dirso!a &_
B+orie ,;ucharest &_ @itesti &_ Cimnicu Wilcea &_ >ibiu &_ Eradea &_ `erind &_ =rad &_
)imisoara,;^>: ,;ucharest &_ Lrzicenl ,;ucharest &_ @itesti,;ucharest &_ Ilurgiu ,;ucharest &_
^agaras ,;ucharest &_ Lrzicenl &_ Wasiul ,;ucharest &_ Lrzicenl &_ Dirso!a ,;ucharest &_ @itesti &_
Cimnicu Wilcea ,;ucharest &_ @itesti &_ Craio!a ,;ucharest &_ ^agaras &_ >ibiu ,;ucharest &_
Lrzicenl &_ Wasiul &_ Gasi ,;ucharest &_ Lrzicenl &_ Dirso!a &_ B+orie ,;ucharest &_ @itesti &_
Cimnicu Wilcea &_ >ibiu ,;ucharest &_ @itesti &_ Cimnicu Wilcea &_ Craio!a ,;ucharest &_ @itesti &_
Craio!a &_ Cimnicu Wilcea ,;ucharest &_ @itesti &_ Craio!a &_ Fobreta ,;ucharest &_ ^agaras &_
>ibiu &_ Cimnicu Wilcea ,;ucharest &_ ^agaras &_ >ibiu &_ Eradea ,;ucharest &_ ^agaras &_ >ibiu
&_ =rad ,;ucharest &_ Lrzicenl &_ Wasiul &_ Gasi &_ Heamt ,;ucharest &_ @itesti &_ Cimnicu Wilcea
&_ >ibiu &_ Eradea ,;ucharest &_ @itesti &_ Cimnicu Wilcea &_ >ibiu &_ ^agaras ,;ucharest &_ @itesti
&_ Cimnicu Wilcea &_ >ibiu &_ =rad,;ucharest &_ @itesti &_ Cimnicu Wilcea &_ Craio!a &_
Fobreta ,;ucharest &_ @itesti &_ Craio!a &_ Cimnicu Wilcea &_ >ibiu ,;ucharest &_ @itesti &_
Craio!a &_ Fobreta &_ Jehadia ,;ucharest &_ ^agaras &_ >ibiu &_ Cimnicu Wilcea &_ @itesti
,;ucharest &_ ^agaras &_ >ibiu &_ Cimnicu Wilcea &_ Craio!a ,;ucharest &_ ^agaras &_ >ibiu &_
Eradea &_ `erind ,;ucharest &_ ^agaras &_ >ibiu &_ =rad &_ `erind ,;ucharest &_ ^agaras &_ >ibiu
&_ =rad &_ )imisoara
>tate representation: a \&digit series corresponding to current con+iguration o+ the board in the le+t&
toright and top&to&bottom manner, ] represents the blan(: ^or e#ample, the setting in ^igure T can
be
represented as YV]ZS8[UT:
>tart state: YV]ZS8[UT
Ioal state: STU8]V[ZY
Eperators:
& Jo!e the tile up: STU8]V[ZY a STU8ZV[]Y
& Jo!e the tile do<n: STU8]V[ZY a S]U8TV[ZY
& Jo!e the tile le+t: STU8]V[ZY a STU8V][ZY
& Jo!e the tile right: STU8]V[ZY a STU]8V[ZY
YV]ZS8[UT a bY]VZS8[UTc YV8ZS][UTd
b:
>tate representation: a T&F array representing an arrangement o+ 8 queens, onein each column: ^or
e#ample: (E +or blan(, e +or queen*
eEEEEEEE
EEEEeEEE
EeEEEEEE
EEEEEeEE
EEeEEEEE
EEEeEEEE
EEEEEEeE
EEEEEEEe
>tart state: =ny state satis+ies the state representation abo!e:
Ioal state: =n arrangement o+ 8 queens such that none o+ them is ableto capture any others:
Eperator: mo!e any attac(ed queen to another square in the same column:
eEEEEEEE eEEEEEEE
EEEEeEEE EEEEeEEE
EeEEEEEE EeEEEEEE
EEEEEeEE EEEEEeEE
EEeEEEEE EEeEEEEE
EEEEEEEE EEEEEEeE
EEEeEEeE EEEeEEEE
EEEEEEEe EEEEEEEe
c: )hree cannibals and three missionaries must cross a ri!er +rom the ban( to the right one:
)heir boat can only hold t<o people: G+ the cannibals outnumber the missionaries, on either
sideo+ the ri!er, the missionaries are in trouble: Do< can all si# get across the ri!erf >tate
representation: a triple (#,y,z* <here #and yare respecti!ely the numbers o+ missionaries and
cannibals remaining in the le+t ban( (] g1 #, y g1 Uc #, y H*c z is ] i+ the boat is currently at the
le+t
ban(, other<ise z is S:
>tart state: (U,U,]*
Ioal state: (],],S*
Eperators:
& )<o missionaries cross the ri!er: (U,S,]* a (S,S,S*
& Ene missionary crosses the ri!er: (],S,S* (S,S,]*
& )<o cannibals cross the ri!er: (U,U,]* a (U,S,S*
& Ene cannibal crosses the ri!er: (U,S,S* a (U,T,]*
& Ene missionary and one cannibal cross the ri!er: (T,T,S* a (U,U,]*
d:
>tate representation: Bach state contains t<o in+ormation, current city, and !isited cities: B#:
bCralo!a,
h@itestl, Ilurgluid
>tart state: b;ucharest,hid
Ioal state: b;ucharest,hall other citiesid
Eperators: Jo!e +rom city e to city K j ne< state <ill ha!e current city is K and K <ill be add to
!isited
city
Water jug
>tate: (#, y*
# 1 ], S, T, U, or V y 1 ], S, T, U
>tart state: (], ]*:
Ioal state: (T, n* +or any n:
S: (#, y* k (V, y*
i+ # g V
T: (#, y* k (#, U*
i+ y g U
U: (#, y* k (# l d, y*
i+ # _ ]
V: (#, y* k (#, y l d*
i+ y _ ]
Y: (#, y* k (], y*
i+ # _ ]
Z: (#, y* k (#, ]*
i+ y _ ]
[: (#, y* k (V, y l (V l #**
i+ # 2 y m V, y _ ]
8: (#, y* k (# l (U l y*, U*
i+ # 2 y m U, # _ ]
\: (#, y* k (# 2 y, ]*
i+ # 2 y n V, y _ ]
S]: (#, y* k (], # 2 y*
i+ # 2 y n U, # _ ]
SS: (], T* k (T, ]*
ST: (T, y* k (], y*
)ic toe tic: e <in mang S diem, E <in mang &S diem, (hac thi ] diem
;loc( <orld: F^>, ;^>, >teepest, ;est ^>, =star:
;7n tri: t3nh s9 !o tr3 -png sai (= sai U, F sai S, C sai S, ; sai S*, b7n phqi t3nh !o tr3 -png sai so !"i
b7n d4"i (T -0ng T sai*:
a: )he 8&puzzle problem:
r Gs the problem decomposablef Ho
r Can solution steps be ignored or undonef Can be undone
r Gs the uni!erse predictablef Kes
r Gs a good solution absolute or relati!ef =bsolute
r Gs the solution a state or a pathf = path
r What is the role o+ (no<ledgef Wery little
r Foes the tas( require human&interactionf Ho
b: )he 8&queens problem:
r Gs the problem decomposablef Ho
r Can solution steps be ignored or undonef Can be undone
r Gs the uni!erse predictablef Kes
r Gs a good solution absolute or relati!ef =bsolute
r Gs the solution a state or a pathf = state
r What is the role o+ (no<ledgef Wery little
r Foes the tas( require human&interactionf Ho
c: )he missionaries and cannibals problem:
r Gs the problem decomposablef Ho
r Can solution steps be ignored or undonef Can be undone
r Gs the uni!erse predictablef Kes
r Gs a good solution absolute or relati!ef =bsolute
r Gs the solution a state or a pathf = path
r What is the role o+ (no<ledgef Wery little (just the rules +or determining legal mo!es,
constrain the search and speed up the e#ecution o+ the program*
r Foes the tas( require human&interactionf Ho
d: )ouring problem
Gs the problem decomposablef Ho
r Can solution steps be ignored or undonef Can be undone
r Gs the uni!erse predictablef Kes
r Gs a good solution absolute or relati!ef =bsolute
r Gs the solution a state or a pathf = path
r What is the role o+ (no<ledgef Wery little
r Foes the tas( require human&interactionf Ho

Вам также может понравиться