More Local Search

bigskymanΤεχνίτη Νοημοσύνη και Ρομποτική

24 Οκτ 2013 (πριν από 4 χρόνια και 14 μέρες)

112 εμφανίσεις

Page
1

of
2

Artificial Intelligence

More Local Search


Simulated Annealing


Borrowed from metallurgy, in which you heat metals

and class to high temperatures and then

allow to cool
very slowly, Simulated Annealing usually switches the point of view from a fitness
function to a cost function (so that you are seeking a low value, to parallel the gently cooling
metal).


Simulated Annealing is essentially a cross between Stochastic Hill
-
Climbing (in which the
probability of accepting a successor increases with its fitn
ess) and Random Walk (in which a
move can be less to a less desirable state).


In general, the goal is to move to a lower cost state. A successor is generated, and if the
successor is of a lower cost, then it is accepted. If it is of a higher cost (movin
g away from the
goal), with a small probability it is accepted. This probability gets lower as the process continues
and the cost gets lower and lower, because we assume we are settling on a good configuration.
We are therefore more likely to accept a re
verse choice early in the process, and exponentially
less likely to accept one later.



Genetic Algorithms


This variant of stochastic search gets its origins from the idea of combining the DNA of two
parents

to create an
offspring
. In the search for an o
ptimal state, if the state can be writ
ten out in
a descriptive string, where each element forms part of the description:


ABBCCFEEF


Then the
generation of successor states goes as follows: Starting with
k

randomly generated
states, which we will call the

population
, a fitness function is applied to each and the probably
of being chosen for “reproduction” varies directly proportional to the fitness score (survival of
the fittest!)
.


When two parent individuals are chosen, a random crossover point is chosen

in the strings of
each description:


ABBCCF
|
EEF

XJWWPS|OHZ


The resulting offspring starts as the string from one parent, up until the crossover, and the string
from the other parent, after the crossover:


ABBCCF
OHZ


Page
2

of
2

And then, because no individual is
just part one parent and part another, a s
mall random mutation
is applied to each position with a small probability:


AB
Q
CCF
OHZ


This individual is added to the population. Over time, as the population grows, and the most fit
states are chosen from which
to generate child states, there is a convergence on an ideal state.
This process is run for a certain number of generations, or until there appears to be no
improvement in the fitness scores of the created offspring.

In some applications, the random
muta
tion probabilities, like with simulated annealing, decrease as the overall fitness of the
population increases.