WebGPU compute lab

Evolutionary search

A population explores a rugged fitness landscape. The GPU scores every candidate; selection and mutation create the next generation.

All demos ↗
—Generation
—Best objective ↓
—GPU evaluations

Cyan: population · gold: best candidate · background: Rastrigin objective; the global minimum is at (0, 0).

Connecting to WebGPU…

Rastrigin minimization in two dimensions. Elitist top-10% selection, Gaussian mutation, and 5% random immigrants. GPU objective evaluation; CPU selection and canvas drawing. Seeded, illustrative optimization benchmark.

WebGPU specification