private void runBlottoProblem(Evolution evo){
        int generations = Integer.parseInt(generationsField.getText());
        int populationSize = Integer.parseInt(populationSizeField.getText());
        
        double[] avgEntropy = new double[generations];
        double[] stdDev = new double[generations];
        List<Individual> individuals = problem.createPopulation(populationSize);
        try {
            for (int i = 0; i < generations; i++){
                individuals = evo.runGeneration(individuals);
                double[] fitnesses = new double[populationSize];
                int numParents = 0;
                for(Individual ind: individuals){
                    if(ind.age() > 0){
                        fitnesses[numParents] = ind.fitness();
                        BlottoPhenotype pheno = (BlottoPhenotype) ind.phenotype();
                        double sum = 0.0;
                        for (int j = 0; j < pheno.pheno.length; j++){
                            double value = pheno.pheno[j];
                            if (value != 0.0){
                                double logcalc = (value * (Math.log(value)/Math.log(2.0)));
                                sum -= logcalc;
                            }
                        }

                        avgEntropy[i] += sum;
                        numParents++;
                    }
                }
                avgEntropy[i] = avgEntropy[i] / (double)numParents;
                stdDev[i] = StandardDeviation.StandardDeviationMean(fitnesses);
            }

        }catch (Exception ex) {
            System.out.println(ex.getMessage());
            return;
        }
        List<Map> statistics = evo.getStatistics();
        String formattedString = "";
        double[] maxfitnessplot = new double[generations];
        double[] avgfitnessplot = new double[generations];
        int i = 0;
        for(Map m: statistics){
            formattedString += "Generation:" + (i+1) + "\t Best: " +
                    m.get("bestIndividual").toString() + "\n";
            maxfitnessplot[i] = Double.parseDouble(m.get("maxFitness").toString());
            avgfitnessplot[i] = Double.parseDouble(m.get("avgFitness").toString());
            i++;
        }
        Plot2DPanel plot = new Plot2DPanel();
        plot.addLinePlot("Max fitness", Color.RED, maxfitnessplot);
        plot.addLinePlot("Average fitness", Color.ORANGE, avgfitnessplot);
        plot.addLinePlot("Standard deviation", Color.BLACK, stdDev);
        plot.addLegend("SOUTH");
        BaseLabel title = new BaseLabel(problemBox.getSelectedItem().toString() + ", " + 
                adultBox.getSelectedItem().toString() + ", " + 
                parentBox.getSelectedItem().toString() + ", mutation: " + 
                mutationRateField.getText() + "%, crossover: " + crossoverRateField.getText() + "%"
                , Color.BLACK, 0.5, 1.1);
        plot.addPlotable(title);
        graphpanel.add(plot);
        Plot2DPanel plot2 = new Plot2DPanel();
        plot2.addLinePlot("Average entropy", Color.BLUE, avgEntropy);
        plot2.addLegend("SOUTH");
        BaseLabel title2 = new BaseLabel("Entropy graph: " + 
                problemBox.getSelectedItem().toString() + ", " + 
                adultBox.getSelectedItem().toString() + ", " + 
                parentBox.getSelectedItem().toString() + ", mutation: " + 
                mutationRateField.getText() + "%, crossover: " + 
                crossoverRateField.getText() + "%"
                , Color.BLACK, 0.5, 1.1);
        plot2.addPlotable(title2);
        graphpanel.add(plot2);
        CardLayout card = (CardLayout) graphpanel.getLayout();
        card.last(graphpanel);
        outputScreen.setText(formattedString);
    }