Algorithms¶
Every algorithm is a class that takes its settings as keyword arguments and has a solve(problem, seed=None) method that returns a Result. Each page gives the method, every setting with its default, and the references.
Every algorithm also takes the common settings: max_iter, pop_size, max_nfe, target, max_time, display, x0, and for population methods local_search (see Memetic runs). target has no effect with several objectives. Stopping rules, seeds and advice on choosing an algorithm are in the guide page Algorithms.
The single-objective pages run the algorithm with its defaults and 20 000 evaluations on the sphere function in 20 dimensions, and show the printed summary. Their figure is a separate run: 50 iterations on the Rastrigin function in two dimensions (seed 1). The four maps show the algorithm's current solutions (red) after 1, 5, 20 and 50 iterations, with their number in the title, the best solution found so far (open diamond) and the global minimum at (0, 0) (plus sign). The curve on the right is the error of the best solution found so far against the evaluations, and its markers show where each map was taken. Once the solutions crowd into one spot, the curve still shows how close they are. On a multi-objective page, the figure shows the front found on ZDT1 with 10 variables after 10 000 evaluations (seed 1), with the true front as a dashed line. It is also a separate run from the example above it.
In the tables, n is the number of codes of the problem (the number of real variables for a continuous problem).
Single objective¶
The classic metaheuristics.
| Class | Algorithm | Default population |
|---|---|---|
ABC |
Artificial Bee Colony | 100 |
ACOR |
Ant Colony Optimization for Continuous Domains | 100 |
BA |
Bees Algorithm | 100 |
BBO |
Biogeography-based Optimization | 100 |
CA |
Cultural Algorithm | 100 |
CMAES |
Covariance Matrix Adaptation Evolution Strategy | 4 + floor(3 ln n) |
DE |
Differential Evolution | 100 |
FA |
Firefly Algorithm | 100 |
GA |
Genetic Algorithm | 100 |
HS |
Harmony Search | 10 |
ICA |
Imperialist Competitive Algorithm | 100 |
IWO |
Invasive Weed Optimization | 20 |
PSO |
Particle Swarm Optimization | 100 |
SA |
Simulated Annealing | 10 |
TLBO |
Teaching-Learning-Based Optimization | 100 |
Modern baselines and reference methods¶
Four modern baselines for benchmark studies and two reference methods.
| Class | Algorithm | Default population |
|---|---|---|
JADE |
Adaptive Differential Evolution with Optional External Archive | 100 |
SHADE |
Success History based Adaptive Differential Evolution | 100 |
LSHADE |
Success History based Adaptive Differential Evolution with Linear Population Size Reduction | 18 n, falling to 4 |
IPOPCMAES |
CMA-ES with Restarts and Increasing Population Size | 4 + floor(3 ln n), doubled at each restart |
NelderMead |
Nelder-Mead Simplex | n + 1 vertices |
RandomSearch |
Random Search | 100 |
Local search¶
Single-solution methods that move one solution through its neighborhood. They suit combinatorial problems (tours, assignments, selections) best, so their pages solve a 50-city tour. With real variables they move one component at a time or add Gaussian noise. pop_size is 1.
| Class | Algorithm | Default population |
|---|---|---|
HillClimbing (HC) |
Hill Climbing with random restarts | 1 |
TabuSearch (TS) |
Tabu Search | 1 |
VNS |
Variable Neighborhood Search | 1 |
ILS |
Iterated Local Search | 1 |
GRASP |
Greedy Randomized Adaptive Search Procedure (discrete variables) | 1 |
Ant colony optimization¶
Methods that build discrete solutions step by step from pheromone and a heuristic. See Ant colony optimization for the supported types. Their pages solve a 50-city tour.
| Class | Algorithm | Default population |
|---|---|---|
AntSystem (AS) |
Ant System, Elitist AS, rank-based AS | choices per ant |
AntColonySystem (ACS) |
Ant Colony System | 10 |
MaxMinAntSystem (MMAS) |
MAX-MIN Ant System | choices per ant |
Hybrids¶
| Class | What it does |
|---|---|
Sequence |
runs several algorithms one after another on one budget, each starting from the previous one's best solutions |
local_search= |
a setting of every population algorithm: improves some new solutions with a short local search (memetic runs) |
Multiple objectives¶
See Multiple objectives. In the table, H is the number of reference points.
| Class | Algorithm | Default population |
|---|---|---|
NSGAII |
Non-dominated Sorting Genetic Algorithm II | 100 |
NSGAIII |
Non-dominated Sorting Genetic Algorithm III | the smallest multiple of 4 at least H |
MOEAD |
Multiobjective Evolutionary Algorithm Based on Decomposition | the largest Das and Dennis lattice with at most 100 points |
MOPSO |
Multi-Objective Particle Swarm Optimization | 100 |
SPEA2 |
Strength Pareto Evolutionary Algorithm 2 | 100, archive 100 |