Title: The Genetic Algorithm vs. Simulated Annealing
1Finding Global Minimum/Maximum
- The Genetic Algorithm vs. Simulated Annealing
Charles Barnes PHY 327
2Finding the min/max of a function
- The genetic algorithm and simulated annealing
processes are used for determining the global
minimum and maximum of a selected range for any
given function.
Global minimum
The function E(x) is equivalent to the internal
energy of the system.
3Genetic Algorithm
- The genetic algorithm is a computer-performed
optimization method that mimics the process of
natural evolution. - An initial population is generated A(0)(A1(0),
A2(0), An(0) - Each individual in a population is assigned a
fitness function. - There are three types of operators for genetic
algorithm - Reproduction (Selection)
- Crossover
- Mutation
4Reproduction
5Crossover
- The crossover operator randomly recombines pairs
through mating.
Parents P1 P2
1001 0111 0111
1110 0111 1111
Child
1110 0100 1111
Parents P1,2 P3
1110 0111 1111
1010 0111 0001
Child
1010 1101 0001
etc.
This is a genetic operator and evolutionary
algorithm known as crossover.
6Mutation
- The mutation operator is a sudden change of
chromosome.
001100101001011101
001100101101011101
001100101101001101
A number is randomly switched in the code.
7Genetic Algorithm - Parameters
- There are three main parameters that can be
changed in the function of the genetic algorithm - M the population of a specific farm
- N the length of an individuals binary string
- k the temperature interval
- In addition to these, the function can also
itself be changed. - The research done on the genetic algorithm was to
find which parameters, if any, influenced the
production of accurate results.
8Functions Used in Genetic Algorithm
Â
?
?
Â
?
?
9Results Genetic Algorithm
- The genetic algorithm proved quite accurate on
each experiment, producing exceptional results
entirely independent of the function. - When the variables M, N, and k were changed,
little to no effect on the global min/max was
observed. - The genetic algorithm had no problem finding the
minimum and maximum on any type of function.
10Simulated Annealing
11The Simulated Annealing Process
12Results Finding the Global Max
- Finding the global maximum of a function
typically produced a graph as follows
The graph displays how the solutions converge.
13Results Finding the Global Min
- Finding the global minimum of a function
typically produced a graph as follows
The graph displays how the solutions converge.
14Results Changing Parameters
- The algorithm used for finding the maximum
function was generally more accurate than the
minimum algorithm, producing similar graphs with
similar maximums each time. - e.g.
100 Calculations
10,000 Calculations
It is interesting to note that the more
calculations done by the algorithm, the faster
the convergence is to the solution.
15Results Accuracy
Graph 2 (x-2)23
Graph 1 (x-2)23
Max1 Min2
Results of the Algorithms
?
?
Max13 at x2
Min25.04 at x0.57
16Findings Simulated Annealing
- Accurate results for both the maximum and minimum
simulated annealing algorithms were dependent on
functions, as more complicated functions
(typically those with powers or exponentials) had
trouble producing accurate results - In general, the more iterations the algorithm
would undergo, the more accurate the final data
would be for simpler functions. - Finding the maximum via simulated annealing is
much more accurate than finding the minimum,
though not usually typically accurate.
17Conclusion
- As observed, the genetic algorithm seems to be
the most accurate method of the two to find both
the maximum and minimum of any function. - The simulated annealing process seems to have
trouble finding the maximum and minimum of more
complicated functions.
18Future Research
- To understand why the simulated annealing
algorithm was not accurate, especially at finding
the global minimum of a function