Project Evolve

Vibecoded JavaScript, WebGL2, GLSL lattice Boltzmann fluid demonstration.

Project Evolve is my take on the intersection of evolution and fluid dynamics. I studied biomimetic tubercles for a year, observing evolution as one of the most powerful means of research and development, selecting for fitness over the course of millions of years and demanding adaptation. Using this principle, I decided to make an evolutionary fluid solver. The lattice-boltzmann governs the fluid flow, while an evolutionary algorithm selects for lift, drag, l/d, or vortex shedding.

How it works

The solver is a lattice Boltzmann with a collision operator. It runs a 1024×768 lattice split into sixteen 256×192 tiles so the whole population simulates at once in a single shader pass. The shapes evolve under a strict area constraint, which stops the algorithm from cheating by shrinking the shape until drag goes away.

The shaders run on the GPU, warming up and then optimizing to balance speed and performance so it doesn't blow up your system.

Before you run it

It's not a solver, it's mainly just a demonstration. The simulation is hard on the GPU, so don't be surprised if it starts to lag; pausing is manual, simply press a button to stop the sim.

Run it in the browser · Source on GitHub