"Evolution is not just a biological process; it is the ultimate optimization algorithm."
This repository serves as a practical code companion to Dan Simon's authoritative text, Evolutionary Optimization Algorithms.
The primary goal of this project is to reinforce theoretical concepts through implementation. Instead of relying solely on high-level libraries, algorithms here are implemented from scratch (or with minimal dependencies like numpy) to ensure a deep, mathematical understanding of the underlying mechanicsβfrom stochastic processes to convergence properties.
- Deconstruct complex evolutionary heuristics into clean, modular Python code.
- Visualize the optimization process and convergence behaviors.
- Compare theoretical performance (as described in the book) with practical results.
The algorithms are categorized based on their biological or physical inspiration, following the structure of the book:
-
/GeneticAlgorithms: Standard GA implementations (Selection, Crossover, Mutation). -
/EvolutionStrategies:$(\mu, \lambda)$ and$(\mu + \lambda)$ strategies. -
/SwarmIntelligence:- Particle Swarm Optimization (PSO)
- Ant Colony Optimization (ACO)
- Artificial Bee Colony (ABC)
-
/DifferentialEvolution: DE strategies for continuous optimization. -
/PhysicsBased: Simulated Annealing, Harmony Search.
The implementations rely primarily on scientific computing libraries for matrix operations and visualization.
pip install numpy matplotlib
Usage Example (OneMax Problem)
To run a basic Genetic Algorithm on the OneMax problem:
Python
from EvolutionaryOptimizationAlgorithms import firstGA
# Initialize the optimizer
optimizer = SimpleGA(pop_size=50, gene_length=20, mutation_rate=0.01)
# Run evolution
best_solution, history = optimizer.evolve(generations=100)
print(f"Global Optimum Found: {best_solution}")π Roadmap & Progress
[x] Chapter 1-3: Introduction & Optimization Basics
[ ] Chapter 4: Genetic Algorithms (Implementation in progress)
[ ] Chapter 8: Evolution Strategies
[ ] Chapter 11: Differential Evolution
[ ] Chapter 12: Particle Swarm Optimization
[ ] Chapter 13: Ant Colony Optimization
π Reference This work is based on the concepts presented in:
Simon, D. (2013). Evolutionary Optimization Algorithms. John Wiley & Sons.
π‘οΈ License Distributed under the MIT License. See LICENSE for more information.
Created by archiristo β A tribute to the beauty of stochastic optimization.