public final void createNewPopulation() {
        ArrayList<Chromosome> newPopulation = new ArrayList<Chromosome>();
        //setupRouletteWheel();
        
        for(int i = 0; i < populationSize / 2; i++) {
            Chromosome firstParent = selectParentTournament();
            Chromosome secondParent = selectParentTournament();
            
            int[] firstParentData = firstParent.getData();
            int[] secondParentData = secondParent.getData();
            
            int[] firstChildData = new int[chromosomeLength];
            int[] secondChildData = new int[chromosomeLength];
            
            float randomFloat = randomizer.nextFloat();
            
            // crossover, if necessary
            if(randomFloat < crossoverProbability) {
                int crossoverIndex = randomizer.nextInt(chromosomeLength);
                
                System.arraycopy(firstParentData, 0, firstChildData, 0, crossoverIndex);
                System.arraycopy(secondParentData, 0, secondChildData, 0, crossoverIndex);
                
                System.arraycopy(firstParentData, crossoverIndex, secondChildData, crossoverIndex, chromosomeLength-crossoverIndex);
                System.arraycopy(secondParentData, crossoverIndex, firstChildData, crossoverIndex, chromosomeLength-crossoverIndex);
            }
            else {
                firstChildData = firstParentData;
                secondChildData = secondParentData;
            }
            
            // mutate, if necessary
            for(int j : firstChildData) {
                randomFloat = randomizer.nextFloat();
                if(randomFloat < mutationProbability) {
                 // mutate first child
                    if(firstChildData[j] == 1) {
                        firstChildData[j] = 0;
                    }
                    else {
                        firstChildData[j] = 1;
                    }
                }
            }
            
            for(int j : secondChildData) {
                randomFloat = randomizer.nextFloat();
                if(randomFloat < mutationProbability) {
                 // mutate second child
                    if(secondChildData[j] == 1) {
                        secondChildData[j] = 0;
                    }
                    else {
                        secondChildData[j] = 1;
                    }
                }
            }
            
            Chromosome firstChild = new Chromosome(firstChildData);
            calculateFitness(firstChild);
            Chromosome secondChild = new Chromosome(secondChildData);
            calculateFitness(secondChild);
            
            newPopulation.add(firstChild);
            newPopulation.add(secondChild);
        }
        
        population = newPopulation;
    } // end crossChromosomes()