I know it's cliche, but here's a genetic algorithm that solves the travelling salesman problem. It's written in Java and contains a gazillion different ways of fitting, evaluating, selecting etc. Some settings work very well, whilst others, er, don't — it's designed to play around with a get a feel for GAs.
Incidentally, I apparently didn't know how to spell when I wrote this, so apologies for some of the class names :-)
When generating the screenshot above I noticed that occasionally it prints ---- megacocks ---- to the terminal — this happens when the overall maximum fitness reduces, since it's an indication that the selection method is flawed.
Download GaTSP.tar.gz.
Basically, browse the javadoc here, and edit Test.java. Use the makefile to compile and have fun, kids.