So, my apartment has recently become infested with ants. I find them quite distracting and distressing, especially when they’re crawling across my desk as I try to code. Perhaps as a coping mechanism, the puzzle game I was trying to make turned into an ant simulation instead. Turns out that for all their apparent creepy sophistication, they’re pretty much just dumb little twitchy Turing machines (or at least can be convincingly modeled as such).
I’m feeling a bit better, but this doesn’t even remotely resemble a game yet.
The ants you programmed are fun to watch. The inclusion of the chemical trails is pretty neat.
SimAnt music is now stuck in my head…
That brings back horrible memories of my apartment being swarmed with ants about a year ago. Tried a lot of gizmos to stop them, but that had no effect. But one day, they just stopped appearing. And then it was peace…
Real life writes the plot, huh?
My condolences on the being vermin-infested.
That was pretty sweet. The trails are definitely cool. I love watching a pioneering ant far away from the colony find a piece of food and then seeing the rest of the colony follow the new trail. Sorry for that wordy sentence.
Ants totally kill productivity. I had to vacuum mine up and then duct tapes the holes they were coming in. I’m glad I live on the second floor now.
Best of luck, Nathan!
-John
I just noticed that if you click on the animation, you can see the chemical trails in pink when they form, and when the food is gone, they quickly disappear. there is also red, perhaps to show where they’ve been? and some blue trails too. It looks like some ants leave blue and some leave red? I’m not quite sure how the blue and red work, but the pink at least makes sense.
Red is “distance from hive”, blue is “distance from food”, pink is where they overlap. When an ant has no food and moves against the food gradient, it weakens the blue trail.
The ants have no internal memory other than “am I carrying food” and “which cell did I just leave”. All of the “AI” is based on the current cell and surrounding ones only.