Algorithms

HumpDay ships 22 derivative-free optimizers grouped into six families. Every algorithm sees only f(x) calls — no analytical gradients, no Jacobians — and is a pure-Python port with no required dependencies. Each row links to a details page (with an in-browser 3D demo) plus the Python and JavaScript source.

PRIMA trust-region · 3 algorithms

Powell's quadratic-model trust-region methods, ported to pure Python from the PRIMA project.

PRIMA_UOBYQA Full quadratic interpolation model, no constraints. Best for small n.
PRIMA_NEWUOA Underdetermined quadratic model; scales better than UOBYQA in higher n.
PRIMA_BOBYQA Bound-constrained variant of NEWUOA.

Classic numerical · 3 algorithms

Textbook methods, here as derivative-free baselines.

NelderMead Simplex method (reflection / expansion / contraction / shrink). SciPy-faithful parameter values.
Powell Conjugate-direction line searches; bounded golden-section per direction.
LBFGSB Finite-difference quasi-Newton baseline; named after L-BFGS-B but uses central differences (HumpDay has no gradients).

Evolutionary & swarm · 5 algorithms

Population-based methods inspired by biological evolution and swarm behaviour.

DifferentialEvolution DE/rand/1/bin — vector-difference mutation, binomial crossover, greedy selection.
ParticleSwarm Swarm of particles with velocity updates pulled toward personal and global best.
GeneticAlgorithm Crossover, mutation and tournament-style selection on a real-valued population.
EvolutionStrategy Classical (μ+λ) ES — Rechenberg/Schwefel; elitist selection from parents+offspring.
CMAEvolutionStrategy CMA-ES with covariance-matrix adaptation; current state of the art for moderate n.

Surrogate / model-based · 1 algorithm

Builds a probabilistic surrogate of f and chooses queries by an acquisition function.

BayesianOpt Pure-Python Gaussian-Process surrogate + Expected-Improvement acquisition. Best when f is expensive.

Metaheuristics · 5 algorithms

Nature-inspired heuristics: temperature, memory, light, pheromones, harmony.

SimulatedAnnealing Metropolis acceptance with a cooling schedule; classic global optimization heuristic.
FireflyAlgorithm Fireflies attracted toward brighter neighbours; brightness inversely tied to f.
AntColonyOpt Pheromone-trail bias on a discretised search grid.
HarmonySearch Memory-based search that improvises new candidates from a harmony memory.

Local & pattern search · 6 algorithms

Simple greedy / structured search methods that probe neighbourhoods directly.

HillClimbing Greedy local moves with occasional random restarts.
RandomSearch Uniformly random sampling in the unit cube — the honest baseline.
GridSearch Regular Cartesian grid over the unit cube — the other honest baseline. Impractical past n_dim ≈ 3.
Rechenberg Rechenberg's (1+1)-Evolution Strategy with the 1/5-success-rule (formerly AdaptiveRandomSearch).
CoordinateDescent Cycles through axes; takes the better of two probes along each.
PatternSearch Polls ±step along each coordinate axis; grows on success, halves on stall, random-restarts when tiny.

Don't know which to pick? Use humpday.minimize(f, n_dim, n_trials) and a sensible default is chosen for you.