Package ch.idsia.ai.ea

Examples of ch.idsia.ai.ea.GA


        options.setLevelRandSeed(seed);
        options.setLevelDifficulty(10);
        GlobalOptions.FPS = GlobalOptions.InfiniteFPS;
        task.setOptions(options);
       
        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());
        System.out.println("Difficulty: " + options.getLevelDifficulty());
        System.out.println("Best Genome: " + vivarium.getBests()[0]);
    }
View Full Code Here

TOP

Related Classes of ch.idsia.ai.ea.GA

Copyright © 2018 www.massapicom. 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.