package com.company.genetic_algorithm_find_sequence; import java.util.Random; // this is a chromosome public class Individual { // in this example the genes are not binary values private int[] genes; private int fitness; private Random random; public Individual() { this.genes = new int[Constants.CHROMOSOME_LENGTH]; this.random = new Random(); } public int getFitness() { if(fitness == 0) { for(int i=0;i