Haskell Picnic

20 Jan 2013

PicnicMob is a Haskell
tutorial for beginners. It is different from many other
introductory tutorials as it has an interesting,
non-trivial algorithm as the subject and it produces pictures at every
step. Also you can't go wrong by reading something by Conrad Barski,
author of Land of Lisp.

I worked through the tutorial when I was still at university. The
picnic placement pictures I first generated are from 2009. I
revisited the tutorial to read up on the simulated annealing
algorithm that is used. Along the way I ported the code to Clojure and this code
is on GitHub here. The Clojure code follows the Haskell code quite
closely. As with the original tutorial the Clojure code is
inefficient with its use of datastructures and its algorithmic complexity.

At the end of the tutorial is a final thought by Barski on
similation of the physical world and how to represented or model
this world. Barsky refers to interesting work in this area by Jeff
Hawkins at a company called Numenta. A presentation by Jeff Hawkins
about this work has been recorded at the 2012 Strange Loop conference and
is available at InfoQ. With a title "Computing Like the Brain" there's
no reason not to watch it. The presentation is a mix of interesting
theory, an actual implementation and enthousiasm, that leaves me with
the (unrealistic) desire to implement such software. A similarly
exciting presentation is "Machine Learning Live" by Mike Anderson from
the 2012 Clojure Conj about neural networks.