ga
ga solves for the global minimum of a function using the Real-Coded Genetic Algorithm implementation based on "Genetic Algorithms in Search, Optimization and Machine Learning" [1].
[xmin,fmin,popPos,popCost,info] = ga(f,o)
Outputs:
[xmin,fmin,popPos,popCost,info] = ga(f,o)
- f: function handle
- o: optimization options
Options | Description | Values | Default values |
d | Dimension | positive integer | 1 |
lb | Lower bounds | double | realmin/100 |
ub | Upper bounds | double | realmax/100 |
display | Information display level | 'iter' | 'iter' |
pop | Population size | positive integer | 10 |
maxit | Maximum Number of Iterations | positive integer | 20 |
method | Selection method | 'Roulette Wheel', 'Tournament' or 'Random' | 'Roulette Wheel' |
- xmin: minimum of f
- fmin: function value at xmin
- popPos: contains position for the entire population (each row corresponds to one individual)
- popCost: the cost for each individuals
- info: struct object with information for the animation
Animation
Call optimview('ga',info), being info the fifth output of ga. Some animation options can be specified appending them to the struct object info.Options | Description | Values | Default values |
animfreq | Frame frequency | positive integer | 1 |
animstart | Inicial iteration to start animation | positive integer | 1 |
References
[1] ^ D. Goldberg, "Genetic Algorithms in Search, Optimization and Machine Learning", MA: Addison-Wesley Professional, Reading, 1989.
Related documentation
Benchmark ProblemsBenchmark Problems - Levi13
Benchmark Problems - Eggholder
Benchmark Problems - Holder table
Benchmark Problems - Goldstein-Price
Benchmark Problems - Bird
Benchmark Problems - Chichinadze
Benchmark Problems - Drop-Wave
Benchmark Problems - Rastrigin
Benchmark Problems - Michalewicz
Benchmark Problems - Schwefel
Benchmark Problems - Gramacy-Lee
Benchmark Problems - Griewank