Examples of PlantGrowth


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

        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

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

            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

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

    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
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.