St Stoc ochasti hastic c Loc Local al Se Sear arch ch Var - - PowerPoint PPT Presentation

st stoc ochasti hastic c loc local al se sear arch ch
SMART_READER_LITE
LIVE PREVIEW

St Stoc ochasti hastic c Loc Local al Se Sear arch ch Var - - PowerPoint PPT Presentation

St Stoc ochasti hastic c Loc Local al Se Sear arch ch Var arian ants ts Computer ter Sc Science ce cpsc3 c322 22, , Lectur ture e 16 (Te Text xtbo book ok Chpt 4.8) Oct, ct, 12, 2012 CPSC 322, Lecture 16 Slide 1


slide-1
SLIDE 1

CPSC 322, Lecture 16 Slide 1

St Stoc

  • chasti

hastic c Loc Local al Se Sear arch ch Var arian ants ts

Computer ter Sc Science ce cpsc3 c322 22, , Lectur ture e 16 (Te Text xtbo book

  • k Chpt 4.8)

Oct, ct, 12, 2012

slide-2
SLIDE 2

CPSC 322, Lecture 16 Slide 2

Lecture cture Ov Overview view

  • Re

Recap ap SL SLS

  • SLS variants
slide-3
SLIDE 3

CPSC 322, Lecture 16 Slide 3

Sto tochast chastic ic Local al Search rch

  • Ke

Key Idea: a: combine greedily improving moves with randomization

  • As well as improving steps we can allow a “small

probability” of:

  • Random steps: move to a random neighbor.
  • Random restart: reassign random values to all

variables.

  • Stop when
  • Solution is found (in vanilla CSP …………………………)
  • Run out of time (return best solution so far)
  • Always keep best solution found so far
slide-4
SLIDE 4

CPSC 322, Lecture 16 Slide 5

Lecture cture Ov Overview view

  • Recap SLS
  • SL

SLS va S variants ants

  • Ta

Tabu bu lists ts

  • Si

Simulated mulated An Annealin ealing

  • Beam

am search rch

  • Ge

Genetic netic Al Algorit

  • rithms

hms

slide-5
SLIDE 5

CPSC 322, Lecture 16 Slide 6

Ta Tabu bu lists sts

  • To avoid search to
  • Immediately going back to previously visited candidate
  • To prevent cycling
  • Maintain a tabu list of the k last nodes visited.
  • Don't visit a poss. world that is already on the tabu list.
  • Cost of this method depends on…..
slide-6
SLIDE 6

CPSC 322, Lecture 16 Slide 7

Si Simulated mulated An Annealin ealing

  • Annealing: a metallurgical process where metals

are hardened by being slowly cooled.

  • Analogy: start with a high ``temperature'': a high

tendency to take random steps

  • Over time, cool down: more likely to follow the scoring

function

  • Temperature reduces over time, according to an

annealing schedule

  • Ke

Key idea: : Change the degree of randomness….

slide-7
SLIDE 7

CPSC 322, Lecture 16 Slide 8

Simula mulated ted Annealing: ealing: algori gorithm thm

Here's how it works (for maximizing):

  • You are in node n. Pick a variable at random and a

new value at random. You generate n'

  • If it is an improvement i.e., , adopt it.
  • If it isn't an improvement, adopt it probabilistically

depending on the difference and a temperature parameter, T.

  • we move to n' with probability e(h(n')-h(n))/T
slide-8
SLIDE 8

CPSC 322, Lecture 16 Slide 9

  • If it isn't an improvement, adopt it probabilistically

depending on the difference and a temperature parameter, T.

  • we move to n' with probability e(h(n')-h(n))/T
slide-9
SLIDE 9

CPSC 322, Lecture 16 Slide 10

Pr Properties

  • perties of

f si simulated ulated annealin ealing g se search ch

One can prove: e: If T decreases slowly enough, then simulated annealing search will find a global

  • ptimum with probability approaching 1

Widely used in VLSI layout, airline scheduling, etc. Finding the ideal cooling schedule is unique to each class of problems

slide-10
SLIDE 10

CPSC 322, Lecture 16 Slide 11

Lecture cture Ov Overview view

  • Recap SLS
  • SL

SLS va S variant ants

  • Simula

mulated ted Annealing ealing

  • Population

pulation Based ed

Bea eam m sea earch ch Gen enet etic ic Alg lgor

  • rith

ithms ms

slide-11
SLIDE 11

CPSC 322, Lecture 16 Slide 12

Po Population pulation Ba Base sed d SL SLS

Often we have more memory than the one required for current node (+ best so far + tabu list) Ke Key Idea: a: maintain a population of k individuals

  • At every stage, update your population.
  • Whenever one individual is a solution, report it.

Sim impl plest est str trate ategy: gy: Par aral alle lel l Sea earch

  • All searches are independent
  • Like k restarts
slide-12
SLIDE 12

CPSC 322, Lecture 16 Slide 13

Po Population pulation Ba Base sed d SL SLS: S: Be Beam m Se Search ch

Non St Stochas astic ic

  • Like parallel search, with k individuals, but you

choose the k best out of all of the neighbors.

  • Useful information is passed among the k parallel

search thread

  • Troub

ublesome esome case: If one individual generates several good neighbors and the other k-1 all generate bad successors….

slide-13
SLIDE 13

CPSC 322, Lecture 16 Slide 14

Po Population pulation Ba Base sed d SL SLS: S: St Stochastic chastic Beam am Search rch

  • Non St

Stochas astic ic Beam Search may suffer from lack of diversity among the k individual (just a more

expensive hill climbing)

  • St

Stocha hastic stic version alleviates this problem:

  • Selects the k individuals at random
  • But probability of selection proportional to their value

(according to scoring function)

slide-14
SLIDE 14

CPSC 322, Lecture 16 Slide 15

St Stocha chastic stic Be Beam m Se Search ch: : Ad Adva vantage ntages

  • It maintai

ains ns divers rsity ity in the population.

  • Bi

Biologi gica cal l metapho hor r (asexual reproduction):

each individual generates “mutated” copies of itself (its neighbors) The scoring function value reflects the fitness of the individual the higher the fitness the more likely the individual will survive (i.e., the neighbor will be in the next generation)

slide-15
SLIDE 15

CPSC 322, Lecture 16 Slide 16

Lecture cture Ov Overview view

  • Recap SLS
  • SL

SLS va S variant ants

  • Simula

mulated ted Annealing ealing

  • Population

pulation Based ed

Bea eam m sea earch ch Gen enet etic ic Alg lgor

  • rith

ithms ms

slide-16
SLIDE 16

CPSC 322, Lecture 16 Slide 17

Po Population pulation Ba Base sed d SL SLS: S: Ge Genetic etic Al Algorithms

  • rithms
  • Start with k randomly generated individuals

(population)

  • An individual is represented as a string over a finite

alphabet (often a string of 0s and 1s)

  • A successor is generated by combining two parent

individuals (loosely analogous to how DNA is spliced in

sexual reproduction)

  • Evaluation/Scoring function (fitness function). Higher

values for better individuals.

  • Produce the next generation of individuals by

selection, crossover, and mutation

slide-17
SLIDE 17

CPSC 322, Lecture 16 Slide 18

Ge Genetic netic algorithms: gorithms: Ex Example mple

Representation and fitness function St State: e: string over finite alphabet Fi Fitness ess functi ction:

  • n: higher value

better states

slide-18
SLIDE 18

CPSC 322, Lecture 16 Slide 19

Ge Genetic netic algorithms: gorithms: Ex Example mple

24/(24+23+20+11) = 31% 23/(24+23+20+11) = 29% etc

Se Select ctio ion: common strategy, probability of being chosen for reproduction is directly proportional to fitness score

slide-19
SLIDE 19

CPSC 322, Lecture 16 Slide 20

Ge Genetic netic algorithms: gorithms: Ex Example mple

Reprod

  • duc

uctio ion: cross-over and mutation

slide-20
SLIDE 20

CPSC 322, Lecture 16 Slide 21

Ge Genetic netic Al Algorit

  • rithms:

hms: Conclusion clusions

  • Their performance is very sensitive to the choice
  • f state representation and fitness function
  • Ex

Extrem emel ely y slow (not surprising as they are inspired by evolution!)

slide-21
SLIDE 21

CPSC 322, Lecture 4 Slide 22

Learning Goals for today’s class

You

  • u can

an:

  • Implement a tabu-list.
  • Implement the simulated annealing algorithm
  • Implement population based SLS algorithms:
  • Beam Search
  • Genetic Algorithms.
  • Explain pros and cons of different SLS algorithms .
slide-22
SLIDE 22

CPSC 322, Lecture 2 Slide 23

Modules dules we'l 'll l cover er in th this course: se: R&Rsys sys

En Enviro ronm nmen ent Problem

Query Planning Deterministic Stochastic Search Arc Consistency Search Search Value Iteration

  • Var. Elimination

Constraint Satisfaction Logics STRIPS Belief Nets Vars + Constraints Decision Nets Markov Processes

  • Var. Elimination

Static Sequential Representation Reasoning Technique SLS

slide-23
SLIDE 23

CPSC 322, Lecture 16 Slide 24

Next xt cl class ss

How to select and organize a sequence of actions to achieve a given goal… ……………… Start Planning (Chp 8.1-8.2 Sk Skip 8.1.1-2) As Assign gnmen ent-2 on CSP will be out this evening (programming!)

slide-24
SLIDE 24

CPSC 322, Lecture 12 Slide 25

32 322 2 Fe Feed edba back k  or

  • r 
  • Le

Lectu tures res

  • Sli

lide des

  • Pr

Prac actice tice Exercises ercises

  • As

Assign signments ments

  • AIs

Ispa pace ce

  • ……
  • Te

Textb tbook

  • ok
  • Cou
  • urse

rse Top

  • pic

ics / / Obj bjec ectives tives

  • TAs

TAs

  • Le

Lear arni ning ng Goa

  • als

ls

  • ……
slide-25
SLIDE 25

CPSC 322, Lecture 16 Slide 26

Sampl mpling ing a discret rete e probability bability distribution stribution