Examples of nextGeneration()


Examples of ch.idsia.ai.ea.ES.nextGeneration()

        ES es = new ES (task, initial, populationSize);
        System.out.println("Evolving " + initial + " with task " + task);
        final String fileName = "evolved" + (int) (Math.random () * Integer.MAX_VALUE) + ".xml";
        for (int gen = 0; gen < generations; gen++) {
            task.setStartingSeed((int) (Math.random () * Integer.MAX_VALUE));
            es.nextGeneration();
            double bestResult = es.getBestFitnesses()[0];
            System.out.println("Generation " + gen + " best " + bestResult);
            Evolvable bestEvolvable = es.getBests()[0];
            double[] fitnesses = task.evaluate((Agent) bestEvolvable);
            System.out.printf("%.4f  %.4f  %.4f  %.4f  %.4f\n",
View Full Code Here

Examples of ch.idsia.ai.ea.ES.nextGeneration()

        options.setLevelRandSeed((int) (Math.random () * Integer.MAX_VALUE));
        ES es = new ES (task, initial, populationSize);
        System.out.println("Evolving " + initial + " with task " + task);
        final String fileName = "evolved" + (int) (Math.random () * Integer.MAX_VALUE) + ".xml";
        for (int gen = 0; gen < generations; gen++) {
            es.nextGeneration();
            double bestResult = es.getBestFitnesses()[0];
            System.out.println("Generation " + gen + " best " + bestResult);
            Easy.save (es.getBests()[0], fileName);
        }
        Stats.main(new String[]{fileName, "1"});
View Full Code Here

Examples of ch.idsia.ai.ea.ES.nextGeneration()

        System.out.println("Evolving " + initial + " with task " + task);
        int difficulty = 0;
        final String fileName = "evolved" + (int) (Math.random () * Integer.MAX_VALUE) + ".xml";
        options.setLevelRandSeed(seed);
        for (int gen = 0; gen < generations; gen++) {
            es.nextGeneration();
            double bestResult = es.getBestFitnesses()[0];
            System.out.println("Generation " + gen + " diff " + difficulty + "  best " + bestResult);
            Easy.save (es.getBests()[0], fileName);
            if (bestResult > 4000) {
                difficulty++;
View Full Code Here

Examples of ch.idsia.ai.ea.ES.nextGeneration()

            task.setNumberOfSeeds(3);
            task.setStartingSeed(0);
            ES es = new ES (task, initial, populationSize);
            System.out.println("Evolving " + initial + " with task " + task);
            for (int gen = 0; gen < generations; gen++) {
                es.nextGeneration();
                double bestResult = es.getBestFitnesses()[0];
                System.out.println("Generation " + gen + " best " + bestResult);
                options.setVisualization(gen % 5 == 0 || bestResult > 4000);
                options.setMaxFPS(true);
                Agent a = (Agent) es.getBests()[0];
View Full Code Here

Examples of ch.idsia.ai.ea.ES.nextGeneration()

            task.setStartingSeed(0);
            ES es = new ES (task, initial, populationSize);
            System.out.println("Evolving " + initial + " with task " + task);
            for (int gen = 0; gen < generations; gen++) {
                //task.setStartingSeed((int)(Math.random () * Integer.MAX_VALUE));
                es.nextGeneration();
                double bestResult = es.getBestFitnesses()[0];
                System.out.println("Generation " + gen + " best " + bestResult);
                options.setVisualization(gen % 5 == 0 || bestResult > 4000);
                options.setMaxFPS(true);
                Agent a = (Agent) es.getBests()[0];
View Full Code Here

Examples of ch.idsia.ai.ea.ES.nextGeneration()

            Task task = new ProgressTask(options);
            ES es = new ES (task, initial, populationSize);

            for (int gen = 0; gen < generations; gen++) {
                es.nextGeneration();
                double bestResult = es.getBestFitnesses()[0];
//                LOGGER.println("Generation " + gen + " best " + bestResult, LOGGER.VERBOSE_MODE.INFO);
                System.out.println("Generation " + gen + " best " + bestResult);
                options.setVisualization(gen % 5 == 0 || bestResult > 4000);
                options.setMaxFPS(true);
View Full Code Here

Examples of ch.idsia.ai.ea.GA.nextGeneration()

        GA vivarium = new GA(task, new GeneticAgent(), 60);
       
        for (int i = 0; i < 30; i++)
        {
          System.out.println("Best of Gen " + i + ": " + vivarium.getBestFitnesses()[0]);
          vivarium.nextGeneration();
          System.out.flush();
        }

        System.out.println("Score: " + ArrayUtils.toString(task.evaluate(controller)));
        System.out.println("Seed: " + options.getLevelRandSeed());
View Full Code Here

Examples of com.supinfo.anthill.Anthill.nextGeneration()

    public static void main(String[] args) { 
              
        Anthill anthill1 = new Anthill();
        anthill1.initGame();
        for (int i = 1; i > 0; i++){ //boucle qui permet de générer un grand nombre d'age de fourmilière
        anthill1.nextGeneration();
        }
    }
}
View Full Code Here

Examples of org.drools.examples.conway.CellGrid.nextGeneration()

            public void actionPerformed(ActionEvent e)
            {
                Worker.post( new Job( ) {
                    public Object run()
                    {
                        grid.nextGeneration( );
                        return null;
                    }
                } );
                canvas.repaint( );
            }
View Full Code Here

Examples of org.drools.examples.conway.CellGrid.nextGeneration()

            public void actionPerformed(ActionEvent ae)
            {
                Worker.post( new Job( ) {
                    public Object run()
                    {
                        if ( !grid.nextGeneration( ) )
                        {
                            stopTimer( );
                        }
                        return null;
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.