HumpDay

A collection of derivative-free optimization algorithms in Python and JavaScript

HumpDay provides a unified interface to 22 derivative-free optimization algorithms implemented in pure Python and JavaScript. All algorithms operate on the unit hypercube [0,1]ⁿ with automatic domain transformations for bounded and unbounded problems. Cross-validation against SOTA well-used reference implementations ensures mathematical correctness.
Run Algorithm Contest Python Source JavaScript Source Test All Algorithms

Python Usage

Install via pip with minimal dependencies:

pip install humpday

Basic usage for optimization problems:

from humpday import minimize

def objective(x):
    return (x[0] - 2)**2 + (x[1] - 3)**2

result = minimize(objective, bounds=[(-5, 5), (-5, 5)], method='DifferentialEvolution')
print(f"Solution: {result.x}")  # [2.0, 3.0]
Available Algorithm Methods
'PRIMA_UOBYQA', 'PRIMA_NEWUOA', 'PRIMA_BOBYQA', 'NelderMead', 'Powell', 'LBFGSB', 'DifferentialEvolution', 'ParticleSwarm', 'CMAEvolutionStrategy', 'EvolutionStrategy', 'GeneticAlgorithm', 'BayesianOpt', 'RandomSearch', 'AdaptiveRandomSearch', 'HillClimbing', 'CoordinateDescent', 'PatternSearch', 'SimulatedAnnealing', 'TabuSearch', 'HarmonySearch', 'FireflyAlgorithm', 'AntColonyOpt'

Interactive Demonstrations

The following tools provide empirical evaluation and visualization of algorithm performance:

Algorithm Contest

Comparative evaluation of optimizers on user-defined problems with statistical analysis.

Run Contest →

3D Visualization

Real-time visualization of optimization trajectories on three-dimensional objective surfaces.

View Visualization →

Individual Algorithm Documentation

Detailed documentation and interactive demos for each algorithm:

Algorithm Type Python Implementation JavaScript Implementation Reference Paper Documentation
PRIMA_UOBYQA Trust Region prima_algorithms.py#L16 prima-algorithms.js#L72 Powell (2002) View →
PRIMA_NEWUOA Trust Region prima_algorithms.py#L84 prima-algorithms.js#L320 Powell (2006) View →
PRIMA_BOBYQA Trust Region prima_algorithms.py#L148 prima-algorithms.js#L580 Powell (2009) View →
NelderMead Direct Search scipy_algorithms.py#L17 scipy-algorithms.js#L18 Nelder & Mead (1965) View →
Powell Direct Search scipy_algorithms.py#L83 scipy-algorithms.js#L145 Powell (1964) View →
LBFGSB Quasi-Newton scipy_algorithms.py#L149 scipy-algorithms.js#L209 Byrd et al. (1995) View →
DifferentialEvolution Evolutionary evolutionary_algorithms.py#L15 evolutionary-algorithms.js#L16 Storn & Price (1997) View →
ParticleSwarm Swarm Intelligence evolutionary_algorithms.py#L79 evolutionary-algorithms.js#L80 Kennedy & Eberhart (1995) View →
SimulatedAnnealing Metaheuristic evolutionary_algorithms.py#L143 evolutionary-algorithms.js#L144 Kirkpatrick et al. (1983) View →
GeneticAlgorithm Evolutionary evolutionary_algorithms.py#L207 evolutionary-algorithms.js#L208 Holland (1992) View →
RandomSearch Sampling evolutionary_algorithms.py#L271 evolutionary-algorithms.js#L272 Bergstra & Bengio (2012) View →
BayesianOpt Bayesian evolutionary_algorithms.py#L278 evolutionary-algorithms.js#L296 Brochu et al. (2010) View →
CMAEvolutionStrategy Evolutionary evolutionary_algorithms.py#L479 evolutionary-algorithms.js#L408 Hansen (2016) View →
TabuSearch Metaheuristic evolutionary_algorithms.py#L630 evolutionary-algorithms.js#L463 Glover (1989) View →
FireflyAlgorithm Bio-inspired evolutionary_algorithms.py#L679 evolutionary-algorithms.js#L525 Yang (2008) View →
AntColonyOpt Swarm Intelligence evolutionary_algorithms.py#L724 evolutionary-algorithms.js#L582 Dorigo et al. (1996) View →
HarmonySearch Metaheuristic alloptimizers.py#L38 evolutionary-algorithms.js#L654 Geem et al. (2001) View →
EvolutionStrategy Evolutionary evolutionary_algorithms.py#L829 evolutionary-algorithms.js#L719 Beyer & Schwefel (2002) View →
AdaptiveRandomSearch Adaptive Search search_algorithms.py#L18 search-algorithms.js#L16 Schumer & Steiglitz (1968) View →
CoordinateDescent Local Search search_algorithms.py#L57 search-algorithms.js#L69 Wright (2015) View →
PatternSearch Direct Search search_algorithms.py#L109 search-algorithms.js#L129 Torczon (1997) View →
HillClimbing Local Search alloptimizers.py#L37 search-algorithms.js#L200 Russell & Norvig (1995) View →

Algorithm Categories

Trust Region Methods

Model-based algorithms using quadratic approximations:

Classic Numerical Methods

Workhorse non-derivative-free methods, ported to pure Python:

Evolutionary & Swarm

Population-based stochastic methods:

Metaheuristics

Acceptance-rule and memory-based search:

Local & Pattern Search

Lightweight baselines and direct-search workhorses: