My code is linked to from that blog post, but for the impatient here it is: https://github.com/plredmond/ants.py