Antfarm

In prep for a class I’ll be teaching at Part & Crafts, I made this little simulator for “ants” — just like I used to when I was a kid, learning how to program. I’m hoping to get a bunch of kids into refining and building out the simulation to include things like resources, reproduction, sensing, phermones, etc. This was one thing that really motivated me to learn to code as a kid, and is just lots of fun.

Screenshot 2015-08-28 at 9.57.32 AM

This simulator is pretty darn simple, but does include a base canvas upon which the ants leave trails (nod to StarLogo!) The ants have internal states, including a simple event-based user-modifiable script. To edit one, just double click on an ant, and an editor comes up. Nothing is saved after a page refresh, for now! Trail colors, ant properties, and other things are accessible, documented in the wiki.

Open source, of course: https://github.com/jywarren/antfarm/

Owen, at Parts & Crafts, already got started; see this video where he made them “eat” yellow phermones and grow (a little too big):