An experiment in Artificial Intelligence. Sorry that it isn't well documented or commented.