Algorithms

A Quick Look

Algorithms in PyGMO are objects, constructed and then used to optimize a problem via their evolve method. The user can implement his own algorithm in Python (in which case they need to derive from PyGMO.algorithm.base). You may follow the Adding a new algorithm tutorial. We also provide a number of algorithms that are considered useful for general purposes. Each algorithm can be associated only to problems of certain types: (Continuous, Integer or Mixed Integer)-(Constrained, Unconstrained)-(Single, Multi-objective).

Heuristic Optimization

Common Name Name in PyGMO Type Comments
Differential Evolution (DE) PyGMO.algorithm.de C-U-S The original algorithm
Self-adaptive DE (jDE) PyGMO.algorithm.jde C-U-S Self-adaptive F, CR
DE with p-best crossover (mde_pbx) PyGMO.algorithm.mde_pbx C-U-S Self-adaptive F, CR
Differential Evolution (DE) PyGMO.algorithm.de_1220 C-U-S Our own brew. self adaptive F, CR and variants
Particle Swarm Optimization (PSO) PyGMO.algorithm.pso C-U-S The PSO algorithm (canonical, with constriction factor, FIPS, etc.)
Particle Swarm Optimization (PSO) PyGMO.algorithm.pso_gen C-U-S Generational (also problems deriving from base_stochastic)
Simple Genetic Algorithm GRAY (SGA_GRAY) PyGMO.algorithm.sga_gray C-U-S Simple genetic algorithm with gray binary encoding
Simple Genetic Algorithm (SGA) PyGMO.algorithm.sga MI-U-S  
Vector Evaluated Genetic Algorithm (VEGA) PyGMO.algorithm.vega MI-U-M VEGA algorithm, multi-objective extension of SGA
(N+1)-EA Evol. Algorithm (SEA) PyGMO.algorithm.sea I-U-M The multiobjective extension uses crowding distance operator
Non-dominated Sorting GA (NSGA2) PyGMO.algorithm.nsga_II C-U-M NSGA-II
S-Metric Selection EMOA (SMS-EMOA) PyGMO.algorithm.sms_emoa C-U-M Relies on the hypervolume computation.
Corana’s Simulated Annealing (SA) PyGMO.algorithm.sa_corana C-U-S  
Parallel Decomposition (PADE) PyGMO.algorithm.pade C-U-M Parallel Decomposition (based on the MOEA/D framework)
Non-dominated Sorting PSO (NSPSO) PyGMO.algorithm.nspso C-U-M Multi-Objective PSO
Strength Pareto EA 2 (SPEA2) PyGMO.algorithm.spea2 C-U-M Strength Pareto Evolutionary Algorithm 2
Artificial Bee Colony (ABC) PyGMO.algorithm.bee_colony C-U-S  
Improved Harmony Search (IHS) PyGMO.algorithm.ihs MI-U-M Integer and Multiobjetive not tested yet
Monte Carlo Search (MC) PyGMO.algorithm.monte_carlo MI-C-S  
Monte Carlo Search (MC) PyGMO.algorithm.py_example MI-C-S Written directly in Python
Covariance Matrix Adaptation-ES PyGMO.algorithm.py_cmaes C-U-S Written directly in Python
Covariance Matrix Adaptation-ES PyGMO.algorithm.cmaes C-U-S  

Meta-algorithms

Common Name Name in PyGMO Type Comments
Monotonic Basin Hopping (MBH) PyGMO.algorithm.mbh N/A  
Multistart (MS) PyGMO.algorithm.ms N/A  
Augmented Lagrangian (AL) PyGMO.algorithm.nlopt_auglag C-C-S Requires PyGMO to be compiled with nlopt option. Minimization assumed
Augmented Lagrangian (AL) PyGMO.algorithm.nlopt_auglag_eq C-C-S Requires PyGMO to be compiled with nlopt option. Minimization assumed
Cstrs co-evolution PyGMO.algorithm.cstrs_co_evolution C-C-S Minimization assumed
Cstrs Self-Adaptive PyGMO.algorithm.cstrs_self_adaptive C-C-S Minimization assumed
Cstrs Immune System PyGMO.algorithm.cstrs_immune_system C-C-S Immune system constraints handling technique
Cstrs CORE PyGMO.algorithm.cstrs_core C-C-S CORE constraints handling technique (repairing technique)

Local optimization

Common Name Name in PyGMO Type Comments
Compass Search (CS) PyGMO.algorithm.cs C-U-S  
Nelder-Mead simplex PyGMO.algorithm.scipy_fmin C-U-S SciPy required. Minimization assumed
Nelder-Mead simplex PyGMO.algorithm.gsl_nm C-U-S Requires PyGMO to be compiled with GSL option. Minimization assumed
Nelder-Mead simplex variant 2 PyGMO.algorithm.gsl_nm2 C-U-S Requires PyGMO to be compiled with GSL option. Minimization assumed
Nelder-Mead simplex variant 2r PyGMO.algorithm.gsl_nm2rand C-U-S Requires PyGMO to be compiled with GSL option. Minimization assumed
Subplex (a Nelder-Mead variant) PyGMO.algorithm.nlopt_sbplx C-C-S Requires PyGMO to be compiled with nlopt option. Minimization assumed
L-BFGS-B PyGMO.algorithm.scipy_l_bfgs_b C-U-S SciPy required. Minimization assumed
BFGS PyGMO.algorithm.gsl_bfgs2 C-U-S Requires PyGMO to be compiled with GSL option. Minimization assumed
BFGS 2 PyGMO.algorithm.gsl_bfgs C-U-S Requires PyGMO to be compiled with GSL option. Minimization assumed
Sequential Least SQuares Prog. PyGMO.algorithm.scipy_slsqp C-C-S SciPy required. Minimization assumed
Sequential Least SQuares Prog. PyGMO.algorithm.nlopt_slsqp C-C-S Requires PyGMO to be compiled with nlopt option. Minimization assumed
Truncated Newton Method PyGMO.algorithm.scipy_tnc C-U-S SciPy required. Minimization assumed
Conjugate Gradient (fr) PyGMO.algorithm.gsl_fr C-U-S Requires PyGMO to be compiled with GSL option. Minimization assumed
Conjugate Gradient (pr) PyGMO.algorithm.gsl_pr C-U-S Requires PyGMO to be compiled with GSL option. Minimization assumed
COBYLA PyGMO.algorithm.scipy_cobyla C-C-S SciPy required. Minimization assumed
COBYLA PyGMO.algorithm.nlopt_cobyla C-C-S Requires PyGMO to be compiled with nlopt option. Minimization assumed
BOBYQA PyGMO.algorithm.nlopt_bobyqa C-C-S Requires PyGMO to be compiled with nlopt option. Minimization assumed
Method of Moving Asymptotes PyGMO.algorithm.nlopt_mma C-C-S Requires PyGMO to be compiled with nlopt option. Minimization assumed
SNOPT PyGMO.algorithm.snopt C-C-S Requires PyGMO to be compiled with snopt option. Minimization assumed
IPOPT PyGMO.algorithm.ipopt C-C-S Requires PyGMO to be compiled with ipopt option. Minimization assumed

Detailed Documentation

class PyGMO.algorithm.base

All PyGMO algorithms derive from this class


class PyGMO.algorithm.de

class PyGMO.algorithm.jde

class PyGMO.algorithm.mde_pbx

class PyGMO.algorithm.de_1220

class PyGMO.algorithm.pso

class PyGMO.algorithm.pso_gen

class PyGMO.algorithm.sea

class PyGMO.algorithm.sga
mutation.RANDOM

Random mutation (width is set by the width argument in PyGMO.algorithm.sga)

mutation.GAUSSIAN

Gaussian mutation (bell shape standard deviation is set by the width argument in PyGMO.algorithm.sga multiplied by the box-bounds width)

selection.ROULETTE

Roulette selection mechanism

selection.BEST20

Best 20% individuals are inserted over and over again

crossover.BINOMIAL

Binomial crossover

crossover.EXPONENTIAL

Exponential crossover


class PyGMO.algorithm.vega
mutation.RANDOM

Random mutation (width is set by the width argument in PyGMO.algorithm.vega)

mutation.GAUSSIAN

Gaussian mutation (bell shape standard deviation is set by the width argument in PyGMO.algorithm.vega multiplied by the box-bounds width)

crossover.BINOMIAL

Binomial crossover

crossover.EXPONENTIAL

Exponential crossover


class PyGMO.algorithm.sga_gray
mutation.UNIFORM

Uniform mutation

selection.ROULETTE

Roulette selection mechanism

selection.BEST20

Best 20% individuals are inserted over and over again

crossover.SINGLE_POINT

Single point crossover


class PyGMO.algorithm.nsga_II

class PyGMO.algorithm.sms_emoa

class PyGMO.algorithm.pade
RANDOM

Random generation of the weight vector

GRID

Weight vectors are generated to equally divide the search space (requires a particular population size)

LOW_DISCREPANCY

Weight vector are generated using a low discrepancy sequence


class PyGMO.algorithm.nspso
CROWDING_DISTANCE

Individual with better crowding distance are prefered

NICHE_COUNT

Individuals with better niche count are prefered

MAXMIN

The MaxMin method is used to obtain the non-dominated set and to mantain diversity


class PyGMO.algorithm.spea2

class PyGMO.algorithm.sa_corana

class PyGMO.algorithm.bee_colony

class PyGMO.algorithm.ms
screen_output

When True, the algorithms produces output on screen

algorithm

Algorithm to be multistarted


class PyGMO.algorithm.mbh
screen_output

When True, the algorithms produces output on screen

algorithm

Algorithm to perform mbh ‘local’ search


class PyGMO.algorithm.cstrs_co_evolution

class PyGMO.algorithm.cstrs_immune_system
screen_output

When True, the algorithms produces output on screen


class PyGMO.algorithm.cstrs_core
screen_output

When True, the algorithms produces output on screen


class PyGMO.algorithm.cs

class PyGMO.algorithm.ihs

class PyGMO.algorithm.monte_carlo

class PyGMO.algorithm.py_example

class PyGMO.algorithm.py_cmaes

class PyGMO.algorithm.cmaes

class PyGMO.algorithm.scipy_fmin

class PyGMO.algorithm.scipy_l_bfgs_b

class PyGMO.algorithm.scipy_slsqp

class PyGMO.algorithm.scipy_tnc
screen_output

When True, the algorithms produces output on screen


class PyGMO.algorithm.scipy_cobyla
screen_output

When True, the algorithms produces output on screen


class PyGMO.algorithm.nlopt_cobyla

class PyGMO.algorithm.nlopt_bobyqa

class PyGMO.algorithm.nlopt_sbplx

class PyGMO.algorithm.nlopt_mma

class PyGMO.algorithm.nlopt_auglag

class PyGMO.algorithm.nlopt_auglag_eq

class PyGMO.algorithm.nlopt_slsqp

class PyGMO.algorithm.gsl_nm2rand

class PyGMO.algorithm.gsl_nm2

class PyGMO.algorithm.gsl_nm

class PyGMO.algorithm.gsl_pr

class PyGMO.algorithm.gsl_fr

class PyGMO.algorithm.gsl_bfgs2

class PyGMO.algorithm.gsl_bfgs

class PyGMO.algorithm.snopt
screen_output

When True, the algorithms produces output on screen


class PyGMO.algorithm.ipopt
screen_output

When True, the algorithms produces output on screen


class PyGMO.algorithm.cstrs_self_adaptive