Académique Documents
Professionnel Documents
Culture Documents
html
Local Search
Local Search
They apply mostly to problems for which we don't need to know the path to the solution but only the
solution itself.
They operate using a single state or a small number of states and explore the neighbors of that state.
They usually don't store the path.
A particular case are optimization problems for which we search for the best solution according to an
objective function.
The distribution of values of the objective function in the state space is called a landscape.
Global maximum - a state that maximizes the objective function over the entire landscape.
Local maximum - a state that maximizes the objective function in a small area around it.
Plateau - a state such that the objective function is constant in an area around it.
Shoulder - a plateau that has an uphill edge.
Flat - plateau whose edges go downhill.
Ridge - sequences of local maxima.
See Fig. 4.10 (pg 111) & 4.13 (pg 114) from the textbook.
Landscape
Hill Climbing
1 of 4 4/20/2018, 10:51 AM
Local Search http://www.cs.iusb.edu/~danav/teach/c463/6_local_search.html
Continuous Spaces
When the objective function is continuous. Then the graph of the function creates a continuous
subspace (like a surface) of the landscape.
Gradient search: if the function is a scalar field of 3 variables, f(x, y, z) in R3, then the gradient of this
function:
gives us the direction where the scalar field grows the most.
A plateau is defined by .
Simulated Annealing
2 of 4 4/20/2018, 10:51 AM
Local Search http://www.cs.iusb.edu/~danav/teach/c463/6_local_search.html
Initial state :
Neighbors:
Suppose T = 40. Then the probability of the first neighbor is e-(25-22)/40 = 0.9277 = 92.77%
Genetic Algorithms
The potential solutions are represented as strings over a base alphabet (0/1). The strings are called
chromosomes or individuals and their elements are called genes.
Each chromosome is evaluated by a fitness function.
The search starts with a number of random chromosomes called initial population.
From each set of chromosomes called generation we build a new one applying selection, crossover, and
mutation. The first generation is the initial population.
The search continues until a given value for the fitness is achieved or for a given number of
generations.
Genetic Operators
Fitness-proportionate selection: chooses a chromosome from the population giving a higher probability
to those of higher fitness value.
Crossover: starts with 2 chromosomes (parents), chooses a random position, and swaps the parents'
genes to the right of that position. It results in two new chromosomes called children or offspring.
Mutation: choosing a random gene in an individual and replacing it by another possible random value
(1->0, 0->1).
Crossover:
CAA | GTTTAAG
GCT | AAGGTAC
-------------
CAA | AAGGTAC
GCT | GTTTAAG
Mutation:
Fitness-proportionate selection:
3 of 4 4/20/2018, 10:51 AM
Local Search http://www.cs.iusb.edu/~danav/teach/c463/6_local_search.html
4 of 4 4/20/2018, 10:51 AM