Foxes & Rabbits
Foxes & Rabbits was one of the first programming projects I got into as a very young coder, back in the days of Programming magazines and BBC Basic. Way back when, the internet wasn't even a glimmer in Tim Burners-Lee eye, and cassette tapes were the only affordable storage media for home coders. No AI then, apart from in the Terminator movie, but it was fun to rekindle that old interest using Claude Ai.
Foxes and Rabbits is a small living ecosystem for your website. Grass grows across a grid, rabbits move through it and eat, and foxes hunt the rabbits. Nobody plans anything: every animal simply moves, feeds and breeds according to a handful of rules, and out of that comes the rise and fall you can watch in the population graph beneath the grid.
You can change the rules with sliders, paint animals onto the grid by hand, and run the whole thing hundreds of times over to see how long the balance lasts. It is oddly hard to keep all three alive at once, which is rather the point.
It follows the classic Wa-Tor predator and prey model, with grass and fecundity based on food availability added for both foxes and rabbits.
You can change the rules with sliders, paint animals onto the grid by hand, and run the whole thing hundreds of times over to see how long the balance lasts. It is oddly hard to keep all three alive at once, which is rather the point.
It follows the classic Wa-Tor predator and prey model, with grass and fecundity based on food availability added for both foxes and rabbits.