Primary genetic algorithm code. Runnable via the Run class. BTW, this thing is scary.