23 derivative-free optimization algorithms in pure Python. No compilation, no required dependencies.
Differential Evolution clears a 9-ball rack on a single break — one of 13+ interactive applications that pit every HumpDay optimizer against a real physics or engineering problem. (Watch the 14-second video · Browse all applications →)
Mixtures, portfolios, and allocations live on the probability simplex (weights
that sum to 1), not the cube. HumpDay optimizes them by lifting a plain [0,1]ⁿ
objective through a smooth bijection φθ onto the interior of the simplex — so
every box-domain optimizer works unchanged. The vertices are not in the image;
attainable_weights(n_dim, scale) says how close to them a given scale reaches.
The map's scale is a tunable preconditioner, and the scale argument of
cube_to_simplex, simplex_to_cube and lift_to_cube: too large and the whole
cube collapses onto the centroid; tuned (the θ★ shown), off-centre optima map
back to interior cube points where optimizers sample densely.
Explore it live →
(drag to orbit, morph cube ⇆ simplex, watch the optimum's pre-image move).
For fun, the same map applied to a football pitch — straight lines bend, the centre circle becomes an oval, the corners smear toward the boundary: ⚽ the beautiful game on the simplex →.
pip install humpday # Python
npm install humpday # JavaScript (the same roster; 13 of 23 bit-exact, rest ported)Zero runtime dependencies. Every algorithm has a pure-Python implementation
that works wherever Python runs. The bundled objective suites in
humpday.objectives are the exception: they are written against numpy, so
humpday[fast] below is what you want if you plan to use them.
If you want the numpy-accelerated backend for higher dimensions:
pip install humpday[fast]The same algorithm code runs either way; humpday transparently uses numpy when it's available and falls back to pure Python when it isn't.
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]Installing also puts a humpday command on your PATH, which reads out the
recorded evidence rather than running an optimization:
humpday suggest --dim 8 --trials 200 # ranked, from the recorded tournament
humpday recommend --dim 8 --trials 200 # the single pick, from the grid
humpday ratings --dim 8 # what was measured, and off how many problems
humpday optimizers --dim 100 --trials 50 # the roster, and why anything is excludedAdd --json to any of them for machine-readable output.
23 validated optimizers: See them in action | Source code
Trust region methods, evolutionary algorithms, metaheuristics.
Cut and paste to avoid waste.
Read https://raw.githubusercontent.com/microprediction/humpday/main/SKILL.md
and create a project skill from it.
Marginal install footprint on top of a Python environment that already has numpy:
| Library | Adds on top of numpy | Global optimizers |
|---|---|---|
| Humpday | ~1 MB (or zero without [fast]) |
23 |
| SciPy | ~100 MB | 6 documented |
| Optuna | ~30 MB | 11 samplers |
| Nevergrad | ~230 MB | 540+ registered (tuned variants of ~30 base methods) |
Humpday's niche: when you need optimization that works anywhere Python runs, without dependencies or compilation.
MIT - Use freely in commercial and research projects.

