private void runSpikingProblem(Evolution evo){
        outputScreen.setText("");
        int populationSize = Integer.parseInt(populationSizeField.getText());
        int generations = Integer.parseInt(generationsField.getText());
        SpikingNeuronProblem sn = (SpikingNeuronProblem) problem;
        List<Individual> individuals = problem.createPopulation(populationSize);
        try {
        	long startTime = System.nanoTime();
        	for (int i = 0; i < generations; i++){
                individuals = evo.runGeneration(individuals);
                Individual best = individuals.get(0);
                for (Individual ind: individuals){
                    if(ind.age() > 0){
                        if (ind.fitness() > best.fitness()){
                            best = ind;
                        }
                    }
                }
                
                String formattedString = outputScreen.getText();
                formattedString += "Generation " + (i+1) + ": " + best.toString() + "\n";
                outputScreen.setText(formattedString);
                Plot2DPanel plot = new Plot2DPanel();
                BaseLabel title = new BaseLabel("Generation: " + (i+1) + ", " + 
                        problemBox.getSelectedItem().toString() + ", " + 
                        adultBox.getSelectedItem().toString() + ", " + 
                        parentBox.getSelectedItem().toString() + ", mutation: " + 
                        mutationRateField.getText() + "%, crossover: " + crossoverRateField.getText() + "%"
                        , Color.BLACK, 0.5, 1.1);
                plot.addPlotable(title);
                plot.addLinePlot("Target", Color.RED, sn.target);
                SpikingNeuronPhenotype snPheno = (SpikingNeuronPhenotype) best.phenotype();
                plot.addLinePlot("Best individual", Color.BLUE, snPheno.spiketrain);
                plot.addLegend("SOUTH");
                graphpanel.add(plot);
                CardLayout card = (CardLayout) graphpanel.getLayout();
                card.last(graphpanel);
                if(i % 10 ==0)System.out.println((double)(System.nanoTime()-startTime)/1000000000.0);
            }
            evo.drawBestFitnessPlot();
            
            String teXLabel = 	"Generations: "+generations+"\\\\"+"\n"+
            					"Population: "+populationSize+"\\\\"+"\n"+
            					"Adult Selection: "+ adultBox.getSelectedItem().toString();
            
            if(adultBox.getSelectedItem().toString().equals("Overproduction")){
            	
            	teXLabel += "( \\%)\\\\\n";
            	
            }
            else teXLabel += "\\\\\n";
            
            if(adultBox.getSelectedItem().toString().equals("Generational Mixing")){
            	
            	teXLabel += "( Adult spots: )\n";
            	
            }
            else teXLabel += "\n";
            
            
            
            teXLabel +=			"Selection Method: "+ parentBox.getSelectedItem().toString()+"\\\\"+"\n"+
            					"Mutation :" + mutationRateField.getText() + "\\%"+"\\\\"+"\n"+
            					"Crossover: " + crossoverRateField.getText() + "\\% \\\\"+"\n";
            System.out.println(teXLabel);					
            
        }catch(Exception e){
            System.out.println(e.getMessage());
        }
    }