Tracking fitness in a genetic algorithm

Posted by Chuck Vose on Stack Overflow See other posts from Stack Overflow or by Chuck Vose
Published on 2009-12-06T06:10:40Z Indexed on 2010/05/17 4:20 UTC
Read the original article Hit count: 493

Filed under:
|

I'm still hacking on my old ruby for the undead post (I know, I know, stop trying to bring the post back from the dead Chuck). But the code has gotten a little out of hand and now I'm working on a genetic algorithm to create the ultimate battle of living and dead with the fitness being how long the battle lasts.

So, I've got the basics of it down; how to adjust attributes of the game and how to acquire the fitness of a solution, what I can't figure out is how to store the fitness so that I know when I've tried a combination before.

I've not been able to find much genetic code to look at let alone code that I can read well enough to tell what's going on. Does anyone have an idea how this is normally done or just simply an algorithm that could help point me in the right direction?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about genetic-algorithm