Package com.heatonresearch.aifh.examples.capstone.alife.milestone2

Examples of com.heatonresearch.aifh.examples.capstone.alife.milestone2.Milestone2Main


        this.universe.reset();


        DoubleArrayGenome bestGenome = (DoubleArrayGenome) genetic.getBestGenome();
        PlantPhysics physics = new PlantPhysics();
        PlantGrowth growth = new PlantGrowth();

        for (int i = 0; i < 100; i++) {
            physics.runPhysics(universe);
            growth.runGrowth(universe, bestGenome.getData());
        }

        this.display = new DisplayPlant();
        this.display.setUniverse(this.universe);
        this.getContentPane().add(this.display);
View Full Code Here


            this.genetic.iteration();

            this.universe.reset();

            DoubleArrayGenome bestGenome = (DoubleArrayGenome) this.genetic.getBestGenome();
            PlantGrowth growth = new PlantGrowth();
            PlantPhysics physics = new PlantPhysics();

            for (int i = 0; i < PlantUniverse.EVALUATION_CYCLES; i++) {
                physics.runPhysics(universe);
                growth.runGrowth(universe, bestGenome.getData());
            }

            this.display.setGeneration(generation);
            this.display.setBestScore(this.genetic.getBestGenome().getScore());
            this.display.repaint();
View Full Code Here

    public double calculateScore(final MLMethod algo) {
        DoubleArrayGenome genome = (DoubleArrayGenome) algo;
        PlantUniverse universe = new PlantUniverse();
        universe.reset();
        PlantPhysics physics = new PlantPhysics();
        PlantGrowth growth = new PlantGrowth();

        // Run the generations.
        for (int i = 0; i < PlantUniverse.EVALUATION_CYCLES; i++) {
            physics.runPhysics(universe);
            growth.runGrowth(universe, genome.getData());
        }

        // Count the amount of green.
        int count = 0;
        double sum = 0;
View Full Code Here

        this.universe = new PlantUniverse();
        this.universe.reset();


        DoubleArrayGenome bestGenome = (DoubleArrayGenome) genetic.getBestGenome();
        PlantPhysics physics = new PlantPhysics();
        PlantGrowth growth = new PlantGrowth();

        for (int i = 0; i < 100; i++) {
            physics.runPhysics(universe);
            growth.runGrowth(universe, bestGenome.getData());
        }

        this.display = new DisplayPlant();
        this.display.setUniverse(this.universe);
View Full Code Here

            this.universe.reset();

            DoubleArrayGenome bestGenome = (DoubleArrayGenome) this.genetic.getBestGenome();
            PlantGrowth growth = new PlantGrowth();
            PlantPhysics physics = new PlantPhysics();

            for (int i = 0; i < PlantUniverse.EVALUATION_CYCLES; i++) {
                physics.runPhysics(universe);
                growth.runGrowth(universe, bestGenome.getData());
            }

            this.display.setGeneration(generation);
            this.display.setBestScore(this.genetic.getBestGenome().getScore());
View Full Code Here

    @Override
    public double calculateScore(final MLMethod algo) {
        DoubleArrayGenome genome = (DoubleArrayGenome) algo;
        PlantUniverse universe = new PlantUniverse();
        universe.reset();
        PlantPhysics physics = new PlantPhysics();
        PlantGrowth growth = new PlantGrowth();

        // Run the generations.
        for (int i = 0; i < PlantUniverse.EVALUATION_CYCLES; i++) {
            physics.runPhysics(universe);
            growth.runGrowth(universe, genome.getData());
        }

        // Count the amount of green.
        int count = 0;
View Full Code Here

TOP

Related Classes of com.heatonresearch.aifh.examples.capstone.alife.milestone2.Milestone2Main

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.