Desert Evolution 3D — Survival Against Heat
A population of creatures grazes a 3D dune field scattered with oases. Energy earned from drinking and lost to heat decides who breeds each generation — orbit the terrain and watch the herd's coat color drift paler as heat-reflective genes spread.
This 3D companion drives the same genetic algorithm as the 2D desert-evolution lab through a real terrain view instead of a flat canvas: a population of creatures roams a dune field rendered with Three.js, each one losing energy to heat in proportion to how dark its coat gene is and recovering it only while standing near one of several 3D oases. Every few seconds of real-time grazing, the population is ranked by that energy-minus-heat fitness score, the weakest are culled by the selection-strength slider, and the survivors breed — averaging their coat and behaviour genes and applying a random mutation — so orbiting the terrain across several generations lets you watch pale, heat-reflective coats spread through the herd exactly as the underlying numbers predict.
A 3D genetic-algorithm desert: creatures graze between oases under a real heat-penalty and drink-recovery fitness function, evolving lighter coloration generation by generation as you orbit the terrain.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install
Darker coats absorb more heat and lose energy faster (heatPenalty = (255−brightness)/255 × 0.5 × heat intensity), so lighter-coated creatures end each generation with higher fitness on average. Because only the fittest fraction breeds, the average coat brightness of the population rises generation after generation — a direct, visible demonstration of directional selection.
It scales the heat penalty term directly, so darker creatures die off faster and the selection pressure toward pale coats becomes stronger and quicker to see — at the extreme, populations with low mutation rates can lose genetic diversity almost entirely within a handful of generations.
If the mutation rate is too low and heat intensity too high, every surviving lineage can end up too dark to keep pace with the heat, and energy in the whole population can hit zero between generations. The simulation reseeds a small founder population so you can keep experimenting rather than watching a blank field.