Evolutionary Computation

Evolutionary computation is a family of optimization methods inspired by natural selection and collective animal behavior. Instead of following a gradient, they maintain a population of candidate solutions, score each with a fitness function, and use selection plus random variation to produce better candidates over many generations. They are useful when the objective is a black box, noisy, multi-modal, discrete, or simply not differentiable — scheduling, routing, design optimization, hyperparameter search, and neural architecture search.



1. Deep Dives

Genetic Algorithms

Chromosome encodings, selection, crossover and mutation operators, elitism, and a from-scratch GA in Python.

Swarm Intelligence

Particle Swarm Optimization and Ant Colony Optimization: velocity updates, pheromone trails, and Python examples.


2. The Evolutionary Loop

The Generic Evolutionary Loop Initializerandom population Evaluatefitness f(x) Selectfitter survive Varycrossover / mutate Replacenext generation until budget spent or fitness converges Population-based, derivative-free, stochastic. Only needs a way to score a candidate. Works on black-box, noisy, discontinuous, or combinatorial objectives where gradients do not exist.

Every method on these pages follows the same skeleton. What differs is how candidates are represented (bit strings, real vectors, trees, permutations), how parents are chosen, and how new candidates are generated. Selection provides exploitation (concentrate on what works); variation provides exploration (try new regions). Balancing the two controls whether the search converges prematurely or wanders.


3. The Main Families

Family Tree of Nature-Inspired Optimization Nature-Inspired Optimization Evolutionary Algorithms Swarm Intelligence GA GP CMA-ES DE PSO ACO ABC Firefly

4. When to Use, and When Not To

Use evolutionary methods when gradients are unavailable, the search space is combinatorial or mixed, the landscape has many local optima, or you need a set of trade-off solutions (multi-objective algorithms such as NSGA-II return a Pareto front). Do not use them when a gradient exists and the problem is smooth: gradient descent, L-BFGS, or Bayesian optimization (for expensive evaluations with few parameters) will be far more sample-efficient. Evolutionary search typically needs thousands to millions of fitness evaluations.


Genetic Algorithmsevolutionary computation Swarm Intelligenceevolutionary computation Reinforcement LearningSection Constraint Satisfactionsearch planning Search & PlanningSection Machine Learning (ML)Section