public static void main(String[] args) {
 
        Population first = new Population(20);
        double peakFitness = -10.0;
        int peakGen =1;
        for (int a =0; a<100; a++)
        {
            //generates comparision teams
            Population generationFoes = new Population(10);
            
            
            //tests population members against all the comparision teams
            for (int i = 0; i < first.getPopulation().size(); i++) {
                PokemonTeam current = first.getPopulation().get(i);
                double o = EEEA1.fitnessTestO(current);
                double d = EEEA1.fitnessTestD(current, generationFoes);
                current.modifyFitness(EEEA1.fitnessTestAll(o, d));
                //current.modifyFitness(o);

            }

            first.sort();

            int counter = a +1;
            PokemonTeam member = first.getPopulation().get(19);
            double fitness =  member.getFitness();
            if (counter%10==0 || counter==1)
            {
                System.out.println("Generation " + counter + ":" + fitness);
            }
            //System.out.println("Generation " + counter+ ":" + fitness);
            if (fitness>peakFitness)
            {
                peakFitness = fitness;
                peakGen = counter;
            }
           
            PokemonTeam member2 = first.getPopulation().get(18);
        
            first.cutWeak2();
            first.assignFitnessRank();
            for (int x = 0; x < 10; x = x + 2) {
                PokemonTeam p1 = first.getPopulation().get(x);
                PokemonTeam p2 = first.getPopulation().get(x + 1);
                first.reproduce(p1, p2, p1.getRankFitness());
            }
            first.clearPop2();
            first.addInChildren();
            first.createNextGen();
            //first.mutate();
        }

    System.out.println("Max fitness at Generation:" + peakGen + " fitness:" + peakFitness);


            
            
            
        }