title: GA written in Java
body: <p>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.</p>
  
  <p>I recently came across <a href="http://geneticalgorithms.ai-depot.com/Tutorial/Overview.html" rel="noreferrer">a piece of pseudocode</a> 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.</p>
  
  <p>Any help in the implementation of these ideas would be very much appreciated as my Java is rusty.</p>