I've been building an ant simulation that runs in the browser, and thought maybe someone would have fun playing around with it for a few minutes.

I always stop and look at ant colonies when I go past them in nature, and thought it would be fun to try to simulate them. I was inspired by Sebastian Lague's and Pezzza's Work's ant videos. I first made this quite advanced simulation with food, predators, competing colonies, queens making new colonies, and hunger. But then I started thinking how realistic it is, and it sent me down a rabbit hole, finding research papers on the topic, and making a model of how real ants walk in real-life experiments.

The "realistic" walk is on by default, and you can turn it off to see how it compares to a random walk. The research paper I got the real ant data from showed that the ants' walks aren't a simple random walk, by comparing the times they cross their own path to that of a random walk, and I took their ideas and metrics further when making my own model. It's not perfect, but I'd say it's good enough for now. For now I focused only on the walking patterns when the ants are searching for food, and not on how they follow pheromone trails or how they find their way home. Those are educated guesses in the simulation, but maybe I'll try to replicate real ant behaviour on those too later.

If you're interested in the process, and how my model differs from a random walk, and where it falls short, I made a YouTube video out of it. It includes a quiz where you try to spot which paths are by real ants and which are by my model. I'd be interested to see how well the model does in that test. Link: https://www.youtube.com/watch?v=zz6LKJT3qow


Comments URL: https://news.ycombinator.com/item?id=50365832

Points: 2

# Comments: 0