public List<GraphDate> NEATalgorithm() throws Exception {
        int iterationCounter = 0;

        List<GraphDate> fGraphs = new ArrayList<GraphDate>();

        // create list of all organisms
        List<Organism> allOrg = new ArrayList<Organism>();
        for (int i = 0; i < population.getSpeciesNumber(); i++) {
            allOrg.addAll(population.getSpecies().get(i).getOrganisms());
        }
        //count Errors with initial population (in -> out)
        fGraphs.add(countBP_dataGraph(allOrg));

        do {
            //genetic algorithm step
            List<Organism> mutatedOrg = new ArrayList<Organism>();
            mutatedOrg = population.GAstep_mutation();
            if (!mutatedOrg.isEmpty()) {
                population.nextGenerationNumber();
                System.out.println("Generation Number after mutation: " + population.getGenerationNumber());
                fGraphs.add(countBP_dataGraph(mutatedOrg));
                //remove if last added was NULL
                if (fGraphs.get(fGraphs.size() - 1) == null) {
                    fGraphs.remove(fGraphs.size() - 1);
                }
                population.GAstep_selection();
            }

            List<Organism> childOrg = new ArrayList<Organism>();
            childOrg = population.GAstep_crossover();
            if (!childOrg.isEmpty()) {
                population.nextGenerationNumber();
                System.out.println("Generation Number after crossover: " + population.getGenerationNumber());
                fGraphs.add(countBP_dataGraph(childOrg));
                //remove if last added was NULL
                if (fGraphs.get(fGraphs.size() - 1) == null) {
                    fGraphs.remove(fGraphs.size() - 1);
                }
                population.GAstep_selection();
            }

            iterationCounter++;
            System.out.println("Iteration: " + iterationCounter);

            System.out.println("Number of species in population: " + population.getSpeciesNumber());

            /*stop criteria : Критерий окончания работы ГА - 
             ошибка обобщения для лучшей сети (хромосомы в популяции) 
             станет меньше, чем некоторый уровень. */
            /*if (population.getBestOrganFitness() < p_GAerror_threshold) {
             break;
             }*/
            int size = fGraphs.size() - 1;
            int last = fGraphs.get(size).getSize_inSample() - 1;
            if (fGraphs.get(size).getData(0, last) < AppProperties.thresholdGAstopError()
                    & fGraphs.get(size).getData(1, last) < AppProperties.thresholdGAstopError()
                    & fGraphs.get(size).getData(2, last) < AppProperties.thresholdGAstopError()) {
                break;
            }

        } while (iterationCounter < AppProperties.iterationCount());

        return fGraphs;
    }