You are on page 1of 15

Local Search

Local search techniques works on

complete state formulation

They keep only small number


of
nodes state in memory

Hill search
climbing
Simulated
Annealing
Hill climbing search

It solves the problems that have

solutions
many

for example 8 queens


Graph map
coloring

N queens problem

Goal Put n chess queens on n xn

board with no two queens on the

same row Column a


diagonal
chess board
configurations
Goal is initially unknown

However as specified by the

problem constraints that must

satisfy Hill climbing or


gradient
ascent descent
To conclude
It start with random potentially

poor solution

iteratively makes small


changes
to solution each time improving

a little

athen algorithm cannot see

improvement it
any anymore
terminates
Hill uses PFS with
climbing
heuristic measurement

it select most
always
promising successor the
of
current node

Algorithm
determine successor
1
of current nose

2 choose successor
of Maximum
goodness
3 best successor is less
if goodness of
I g
than current node state's goodness

stop
9 else make best successor the

current state
go to step t

No search tree is maintained

current state nose


any

No back tracking
Like approach moves in
greedy
the direction which optimizes the
cost
objective function
Global waxing

tire
Flat

state space
current state

Regions in the stale space landscape

Local Maxima
Better than its neighbour states
But there is other state which is

height that it

Global Maxima

Best possible stale node


of the

state spare
Has highest value of
objective function
Current state

state where
agent is
an
tal where aged is

currently present
Flat local Maxim
eat here all
neighbor state has
same value

unlike best search hill dims


first
search expand the most promising

successor
of the nose last expanded

where as best
first search expands

most
promising leaf nose
of the

current search tree


Problems hill climb search
of
get stuck at local minima

position where there are no better

neighbor
no that
guarantee we
found
the best solution

Finding
a plateau this is a

situation where search spare

returns the same evaluation

for all the


neighbors
Simulated Annealing

Hill search never move


climbing
back to laws value

This to be incomplet
guaranteed

it can stuck on local


get
maxima

simulated is
Annealing
motivated
by physical annealing
by hgs y
process in which metal is

heated slowly cooled into a

structure
uniform

Likewise simulated Annealing


allows downwards steps

Simulated Annealing select

a move at random

decides whether to accept

if
I

if move is better than

current position accept it

is
If mare worse than

accept based on same

probability

probability of accepting
worse state is
given by
P exponential Edt r

where
c
change in evaluation or

objective ft
t the current value

r random number

between 0.4 t

You might also like