Package ch.idsia.ai.agents

Examples of ch.idsia.ai.agents.Agent


                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];
                a.setName(((Agent)initial).getName() + gen);
                RegisterableAgent.registerAgent(a);
                double result = task.evaluate(a)[0];
                options.setVisualization(false);
                options.setMaxFPS(true);
                Easy.save (es.getBests()[0], "evolved.xml");
View Full Code Here


    public void start()
    {
        if (!started)
        {
            started = true;
            Agent hka = new HumanKeyboardAgent();
            hka.reset();           
            mario = new MarioComponent(getWidth(), getHeight());
            setContentPane(mario);
            setFocusable(false);
            mario.setFocusCycleRoot(true);
View Full Code Here

    }

    GlobalOptions.setSeed(seed);
    GlobalOptions.setDifficulty(difficulty);

    Agent controller = new BestFirstAgent(); // This line uses the agent you imported above.
    if (args.length > 0) {
      controller = RegisterableAgent.load (args[0]);
      RegisterableAgent.registerAgent (controller);
    }

    GlobalOptions.currentController = controller.getName();
    GlobalOptions.writeFrames = false; //set to true to write frames to disk
    EvaluationOptions options = new CmdLineOptions(new String[0]);
    options.setAgent(controller);
    Task task = new ProgressTask(options);
    options.setMaxFPS(false);
View Full Code Here

                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);
                Agent a = (Agent) es.getBests()[0];
                a.setName(((Agent)initial).getName() + df.format(gen));
                RegisterableAgent.registerAgent(a);
                bestAgents.add(a);
                double result = task.evaluate(a)[0];
//                LOGGER.println("trying: " + result, LOGGER.VERBOSE_MODE.INFO);
                options.setVisualization(false);
View Full Code Here

TOP

Related Classes of ch.idsia.ai.agents.Agent

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.