Friday, November 14th, 2008 | Author: ranok

While cleaning up my hard drive, I’ve come across many old projects that are pretty interesting, and I thought I’d start a mini-series of these little pearls (perls?) I come across as I find them. Without further ado, lets start with our first Lulz of the Day (LOTD)!

Cesspool

As many of you know, I’m in the systems biology class this semester, and recently we spent a week or so looking at the genetic algorithm and its applications. I immediately began hacking on a genetic algorithm to ‘breed’ a Corewars warrior. The code for this is pretty simple, and still needs much revision, but it’s bred some programs that are pretty good. I’m going to run it a few times and try to put together some statistics in the next few days, but for now, you can download the source and play around with it as you wish. Basically what it does is:

  1. Generates some initial warriors with random commands and arguments
  2. Pits the warriors against themselves in battle using the corewars-cmd command
  3. Ranks them by their scores
  4. Cross breeds the best 20% of the population, and mutate the rest (with 5% chance of mutation)
  5. Repeat from step 2 for the number of generations.

Todo:

  • Modify the cross-breeding algorithm so it doesn’t just append one program to the other, but mixes up the commands of both
  • Small bug fixes with the scraper for the corewars-cmd results
  • Run a number of times, and then pit the best generated warriors against some made by humans

Peace and lulz,

Ranok

Tags: , ,
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses

  1. i love this site’s name, it’s fascinating and very cool, i have watched a previous episode on David Firth’s website called http://www.fat-pie.com, they have animated video clip’s and very funny and entertaining articles, i watched one called “Toast Boy 2″ This has a very funny quote. “i was merely practical joking, oh the mirth!, ahaa, ahaaa”. i found this very amusing so i tried to see if a website was named after it, and this ended me here, so i thought i would leave a message to show my emotions towards this fascinating site.

  2. Yes, that is one of my favorite videos, and has inspired a number of funny quotes that I use daily.

Leave a Reply