GA written in Java

Posted by EnderMB on Stack Overflow See other posts from Stack Overflow or by EnderMB
Published on 2009-10-15T21:04:05Z Indexed on 2010/03/18 6:11 UTC
Read the original article Hit count: 282

I am attempting to write a Genetic Algorithm based on techniques I had picked up from the book "AI Techniques for Game Programmers" that uses a binary encoding and fitness proportionate selection (also known as roulette wheel selection) on the genes of the population that are randomly generated within the program in a two-dimensional array.

I recently came across a piece of pseudocode and have tried to implement it, but have come across some problems with the specifics of what I need to be doing. I've checked a number of books and some open-source code and am still struggling to progress. I understand that I have to get the sum of the total fitness of the population, pick a random number between the sum and zero, then if the number is greater than the parents to overwrite it, but I am struggling with the implementation of these ideas.

Any help in the implementation of these ideas would be very much appreciated as my Java is rusty.

© Stack Overflow or respective owner

Related posts about genetic-algorithms

Related posts about evolutionary-algorithms