Skip to main content

Humpday: Pure Python or Javascript Derivative-Free Optimization

CI License: MIT Python 3.9+ PyPI npm

Documentation & Live Demos

23 derivative-free optimization algorithms in pure Python. No compilation, no required dependencies.

See it work

Differential Evolution clears a 9-ball rack on a single break

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 →)

Optimizing on the simplex

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 simplex — so every box-domain optimizer works unchanged.

The cube-to-simplex bijection: a coordinate net flowing between the unit square and the probability simplex

The map's scale is a tunable preconditioner: too small 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 →.

Install & Use

pip install humpday        # Python
npm install humpday        # JavaScript (the same roster, parity-tested)

Zero runtime dependencies. Every algorithm has a pure-Python implementation that works wherever Python runs.

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]

Algorithms

22 validated optimizers: See them in action | Source code

Trust region methods, evolutionary algorithms, metaheuristics.

Save the Planet

Cut and paste to avoid waste.

Read https://raw.githubusercontent.com/microprediction/humpday/main/SKILL.md
and create a project skill from it.

SKILL.md.

Comparison

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]) 22
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.

License

MIT - Use freely in commercial and research projects.

Metadata

Release files for humpday 0.23.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for humpday 0.23.0
File Size Uploaded
humpday-0.23.0.tar.gz 6.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for humpday 0.23.0
File Interpreter ABI Platform
humpday-0.23.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 MB

Release files / humpday-0.23.0.tar.gz

Download URL humpday-0.23.0.tar.gz
Size 6.2 MB
Tags Source
SHA-256 checksum
How to use checksums
b2d2faf5623173d3c83110f41e58e347c5d3d58fa5e3195ca9cb1b7b4c52d31d
BLAKE2b-256 checksum
How to use checksums
6246eddad8182ab5de6cce8cb95be2bf5e5cfd2e5ea4473e14425d34ce50ed41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release files / humpday-0.23.0-py3-none-any.whl

Download URL humpday-0.23.0-py3-none-any.whl
Size 141.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d16a21345c1bf9340c4f1171e905e7318a2e9ec8364bdc4930d2b22f4a2ccd74
BLAKE2b-256 checksum
How to use checksums
025ab22c67f1ac06e8ed691c9e8885d90fdf9d8b7e38d680498c4f84232a8e87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release history Release notifications | RSS feed

0.24.1

2 release files

0.24.0

2 release files

This release

0.23.0 This release

2 release files

0.22.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.0

2 release files

0.4.8

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.7

2 release files

0.3.3

2 release files

0.2.6

2 release files

0.2.3

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.6

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page