optimization-lab

A living lab for applied mathematical optimization

From-scratch algorithms, real solver comparisons, cross-domain problems, and intuition for what a million-parameter non-convex loss surface actually looks like.

Welcome

This is the reference site for optimization-lab — a from-scratch exploration of applied mathematical optimization. The spark was working through Steven L. Brunton’s Optimization Bootcamp (Brunton 2026), but the site draws on the standard optimization literature broadly (see the bibliography and the project’s README for the full reading list) rather than following any one source chapter by chapter.

Three commitments shape everything here:

  1. Build it, don’t just import it. Every core algorithm is implemented from scratch in the optimlab Python package. Mature libraries are used deliberately as correctness oracles and scale-up backends, never as a substitute.
  2. Port a problem in, get solvers for free. Every problem speaks one small Problem interface; every solver — from-scratch or backend — runs against any of them.
  3. See it, don’t just prove it. Every technique ships with an interactive visual — either right on the page (a live-rendered Plotly figure) or as a reactive marimo app you can drag sliders on.

How this site is organized

Chapters are built up progressively, each landing once the corresponding optimlab module is implemented and tested — see the project’s ROADMAP.md for the full phased plan. A chapter here is never published ahead of the code it’s explaining.

Reading this site vs. reading the code

This site is the narrative — definitions, theorems, the “why” behind a design choice. The optimlab package docstrings are the precise reference for a given function’s signature and behavior. When the two disagree, trust the code and open an issue: the docstrings are regenerated from tests that actually run; this prose is written by hand and can drift.

Brunton, Steven L. 2026. Optimization: A Bootcamp for Machine Learning, Inverse Problems, and Control. Cambridge University Press.