Required reading: AIMA, Chapter 4 Choueiry L WH: Chapters - - PowerPoint PPT Presentation

required reading aima chapter 4 choueiry l wh chapters 6
SMART_READER_LITE
LIVE PREVIEW

Required reading: AIMA, Chapter 4 Choueiry L WH: Chapters - - PowerPoint PPT Presentation

Title: Lo al Sear h B.Y. Required reading: AIMA, Chapter 4 Choueiry L WH: Chapters 6, 10, 13 and 14. In tro dution to Artiial In telligene CSCE 476-876, Spring 2012 URL: www.se.unl.edu/ ho uei


slide-1
SLIDE 1

✬ ✫ ✩ ✪

Title: Lo al Sear h Required reading: AIMA, Chapter 4 L WH: Chapters 6, 10, 13 and 14. In tro du tion to Arti ial In telligen e CSCE 476-876, Spring 2012 URL:
  • www. se.unl.edu/
ho uei ry/ S1 2-4 76- 87 6 Berthe Y. Choueiry (Sh u-w e-ri) (402)472-5444 B.Y. Choueiry 1 Instru tor's notes #8 F ebruary 17, 2012
slide-2
SLIDE 2

✬ ✫ ✩ ✪

Outline Iterativ e impro v emen t sear h:
  • Hill- lim
bing
  • Sim
ulated annealing
  • ...
B.Y. Choueiry 2 Instru tor's notes #8 F ebruary 17, 2012
slide-3
SLIDE 3

✬ ✫ ✩ ✪

T yp es
  • f
Sear h (I) 1- Uninformed vs. informed 2- Systemati / onstru tiv e vs. iterativ e impro v emen t xxx B.Y. Choueiry 3 Instru tor's notes #8 F ebruary 17, 2012
slide-4
SLIDE 4

✬ ✫ ✩ ✪

Iterativ e impro v emen t (a.k.a. lo al sear h)

− →

Sometimes, the `path' to the goal is irrelev an t
  • nly
the state des ription (or its qualit y) is needed Iterativ e impro v emen t sear h
  • ho
  • se
a single urren t state, sub-optimal
  • gradually
mo dify urren t state
  • generally
visiting `neigh b
  • rs'
  • un
til rea hing a near-optimal state Example:
  • mplete-state
form ulation
  • f N
  • queens
B.Y. Choueiry 4 Instru tor's notes #8 F ebruary 17, 2012
slide-5
SLIDE 5

✬ ✫ ✩ ✪

Main adv an tages
  • f
lo al sear h te hniques 1. Memory (usually a
  • nstan
t amoun t) 2. Find reasonable solutions in large spa es where w e annot p
  • ssibly
sear h the spa e exhaustiv ely 3. Useful for
  • ptimization
problems: b est state giv en an
  • b
je tiv e fun tion (qualit y
  • f
the goal) B.Y. Choueiry 5 Instru tor's notes #8 F ebruary 17, 2012
slide-6
SLIDE 6

✬ ✫ ✩ ✪

In tuition: state-s ap e lands ap e

evaluation current state

  • All
states are la y ed up
  • n
the surfa e
  • f
a lands ap e
  • A
state's lo ation determines its neigh b
  • rs
(where it an mo v e)
  • A
state's elev ation represen ts its qualit y (v alue
  • f
  • b
je tiv e fun tion)
  • Mo
v e from
  • ne
neigh b
  • r
  • f
the urren t state to another state un til rea hing the highest p eak B.Y. Choueiry 6 Instru tor's notes #8 F ebruary 17, 2012
slide-7
SLIDE 7

✬ ✫ ✩ ✪

T w
  • ma
jor lasses 1. Hill lim bing (a.k.a. gradien t as en t/des en t)

try to mak e hanges to impro v e qualit y
  • f
urren t state 2. Sim ulated Annealing (ph ysi s)

things an temp
  • rarily
get w
  • rse
Others: tabu sear h, lo al b eam sear h, geneti algorithms, et .

− →

Optimalit y (soundness)? Completeness?

− →

Complexit y: spa e? time?

− →

In pra ti e, surprisingly go
  • d..
(ero ding m yth) B.Y. Choueiry 7 Instru tor's notes #8 F ebruary 17, 2012
slide-8
SLIDE 8

✬ ✫ ✩ ✪

Hill lim bing Start from an y state at random and lo
  • p:
Examine all dire t neigh b
  • rs
If a neigh b
  • r
has higher v alue then mo v e to it else exit

evaluation current state

current state

  • bjective function

state space global maximum local maximum “flat” local maximum shoulder

Problems:

8 > > < > > :

Lo al
  • ptima:
(maxima
  • r
minima) sear h halts Plateau: at lo al
  • ptim
um
  • r
shoulder Ridge B.Y. Choueiry 8 Instru tor's notes #8 F ebruary 17, 2012
slide-9
SLIDE 9

✬ ✫ ✩ ✪

Plateaux Allo w sidew a y mo v es

current state

  • bjective function

state space global maximum local maximum “flat” local maximum shoulder

  • F
  • r
shoulder, go
  • d
solution
  • F
  • r
at lo al
  • ptima,
ma y result in an innite lo
  • p
Limit n um b er
  • f
mo v es B.Y. Choueiry 9 Instru tor's notes #8 F ebruary 17, 2012
slide-10
SLIDE 10

✬ ✫ ✩ ✪

Ridges Sequen e
  • f
lo al
  • ptima
that is di ult to na vigate B.Y. Choueiry 10 Instru tor's notes #8 F ebruary 17, 2012
slide-11
SLIDE 11

✬ ✫ ✩ ✪

V arian ts
  • f
Hill Clim bing
  • Sto
hasti hill lim bing: random w alk Cho
  • se
to disob ey the heuristi , sometimes P arameter: Ho w
  • ften?
  • First-
hoi e hill lim bing Cho
  • se
rst b est neigh b
  • r
examined Go
  • d
solution when w e ha v e to
  • man
y neigh b
  • rs
  • Random-restart
hill lim bing A series
  • f
hill- lim bing sear hes from random initial states B.Y. Choueiry 11 Instru tor's notes #8 F ebruary 17, 2012
slide-12
SLIDE 12

✬ ✫ ✩ ✪

Random-restart hill- lim bing

When HC halts
  • r
no progress is made re-start from a dieren t (randomly hosen) starting sa v e b est results found so far

Rep eat random restart
  • for
a xed n um b er
  • f
iterations,
  • r
  • un
til b est results ha v e not b een impro v ed for a ertain n um b er
  • f
iterations B.Y. Choueiry 12 Instru tor's notes #8 F ebruary 17, 2012
slide-13
SLIDE 13

✬ ✫ ✩ ✪

Sim ulated annealing (I) Basi idea: When stu k in a lo al maxim um allo w few steps to w ards less go
  • d
neigh b
  • rs
to es ap e the lo al maxim um Start from an y state at random, start
  • un
t do wn and lo
  • p
un til time is
  • v
er: Pi k up a neigh b
  • r
at random Set ∆ E = v alue(neigh b
  • r)
  • v
alue( urren t state) If ∆ E>0 (neigh b
  • r
is b etter) then mo v e to neigh b
  • r
else ∆ E<0 mo v e to it with probabilit y < 1 T ransition probabilit y ≃ e∆E/T

8 < : ∆ E

is negativ e T:
  • un
t-do wn time as time passes, less and less lik ely to mak e the mo v e to w ards `unattra tiv e' neigh b
  • rs
B.Y. Choueiry 13 Instru tor's notes #8 F ebruary 17, 2012
slide-14
SLIDE 14

✬ ✫ ✩ ✪

Sim ulated annealing (I I) Analogy to ph ysi s: Gradually
  • ling
a liquid un til it freezes If temp erature is lo w ered su ien tly slo wly , material will attain lo w est-energy
  • nguration
(p erfe t
  • rder)
Coun t do wn

← →

T emp erature Mo v es b et w een states

← →

Thermal noise Global
  • ptim
um

← →

Lo w est-energy
  • nguration
B.Y. Choueiry 14 Instru tor's notes #8 F ebruary 17, 2012
slide-15
SLIDE 15

✬ ✫ ✩ ✪

Ho w ab
  • ut
de ision problems? Optimization problems De ision problems Iterativ e impro v emen t

← →

Iterativ e repair State v alue

← →

Num b er
  • f
  • nstrain
ts violated Sub-optimal state

← →

In onsisten t state Optimal state

← →

Consisten t state B.Y. Choueiry 15 Instru tor's notes #8 F ebruary 17, 2012
slide-16
SLIDE 16

✬ ✫ ✩ ✪

Lo al b eam sear h
  • Keeps
tra k
  • f k
states
  • Me
hanism: Begins with k states A t ea h step, all su essors
  • f
all k states generated Goal rea hed? Stop. Otherwise, sele ts k b est su essors, and rep eat.
  • Not
exa tly a k restarts: k runs are not indep enden t
  • Sto
hasti b eam sear h in reases div ersit y B.Y. Choueiry 16 Instru tor's notes #8 F ebruary 17, 2012
slide-17
SLIDE 17

✬ ✫ ✩ ✪

Geneti algorithms
  • Basi
  • n ept:
  • m
bines t w
  • (paren
t) states
  • Me
hanism: Starts with k random states (p
  • pulation)
En o des individuals in a
  • mpa t
represen tation (e.g., a string in an alphab et) Com bines partial solutions to generate new solutions (next generation)

+ =

B.Y. Choueiry 17 Instru tor's notes #8 F ebruary 17, 2012
slide-18
SLIDE 18

✬ ✫ ✩ ✪

Imp
  • rtan
t
  • mp
  • nen
ts
  • f
a geneti algorithm

(a) Initial Population (b) Fitness Function (c) Selection (d) Crossover (e) Mutation

24 23 20 11 29% 31% 26% 14%

32752411 24748552 32752411 24415124 32748552 24752411 32752124 24415411 32252124 24752411 32748152 24415417 24748552 32752411 24415124 32543213

  • Fitness
fun tion ranks a state's qualit y , assigns probabilit y for sele tion
  • Sele tion
randomly ho
  • ses
pairs for
  • m
binations dep ending
  • n
tness
  • Crosso
v er p
  • in
t randomly hosen for ea h individual,
  • springs
are generated
  • Mutation
randomly hanges a state B.Y. Choueiry 18 Instru tor's notes #8 F ebruary 17, 2012