Skip to content

Algorithms Overview ​

Useful Optimizer provides 118 optimization algorithms in 10 categories. Each one shares the same interface and is documented with its mathematical formulation, parameters, references and benchmark results.

Algorithm Categories ​

CategoryAlgorithmsDescription
🦋 Swarm Intelligence56Nature-inspired algorithms based on collective behavior
🧬 Evolutionary6Algorithms inspired by biological evolution
🧠 Gradient-Based11Optimization using gradient information
🎯 Classical10Traditional mathematical optimization methods
🔧 Metaheuristic14High-level problem-independent algorithms
⚛️ Physics-Inspired4Algorithms based on physical phenomena
📊 Probabilistic5Stochastic and Bayesian optimization methods
👥 Social-Inspired4Algorithms inspired by social behaviors
🔒 Constrained5Optimization with constraints
📈 Multi-Objective3Pareto-optimal solutions for multiple objectives

Choosing an Algorithm ​

By Problem Type ​

Problem TypeRecommended Algorithms
Smooth, unimodalBFGS, L-BFGS, Conjugate Gradient
Multi-modalPSO, DE, CMA-ES, Firefly
High-dimensionalCMA-ES, DE, Grey Wolf
Noisy objectivePSO, DE, SA
ConstrainedAugmented Lagrangian, SLP
Black-boxNelder-Mead, PSO, DE

By Computational Budget ​

BudgetRecommended Algorithms
Very limitedNelder-Mead, Hill Climbing
MediumPSO, DE, Grey Wolf
LargeCMA-ES, multi-start BFGS

Common Interface ​

All algorithms share the same interface:

python
from opt.swarm_intelligence import ParticleSwarm

optimizer = ParticleSwarm(
    func=objective_function,    # Callable[[np.ndarray], float]
    lower_bound=-10.0,          # Lower bound of search space
    upper_bound=10.0,           # Upper bound of search space
    dim=10,                     # Number of dimensions
    max_iter=100                # Maximum iterations
)

best_solution, best_fitness = optimizer.search()

Performance Comparison ​

See the Benchmarks section for detailed performance comparisons on standard test functions.

Released under the MIT License.