Books

четверг, 28 апреля 2011 г.

Ant colony by Rich Hickey

Realy sweet piece of clojure code. This is a great example of program with concurrent calculations that can be made with that Lisp for JVM.

Each small period of time, about 50 Ants are chosing their directions, seek food and interact with environment filled with pheromones.

Can you imagine a solution for this task in 300 lines of code? Including simple visualization, settings, comments...