Package eas.users.lukas.marbImplicitEvolution.movingFitnessNoMutation

Examples of eas.users.lukas.marbImplicitEvolution.movingFitnessNoMutation.JasmineRobotWithoutMutationRegularSelection


        this.numberGoodsInLastTournament = 0;
        this.numberGoodsInPopBeforeLastSelection = 0;
        this.selectionTookPlace = false;
        for (AbstractAgent2D<?> r : this.getEnvironment().getAgents()) {
            try {
                JasmineRobotWithoutMutationRegularSelection jasRob = (JasmineRobotWithoutMutationRegularSelection) r;
                if (jasRob.isGood()) {
                    this.numberGoodsInPopBeforeLastSelection++;
                }
            } catch (Exception e) {
            }
        }

        if (jasmineList.size() >= tournamentGroesse) {
            this.selectionTookPlace = true;
           
            while (jasmineList.size() > tournamentGroesse) {
                jasmineList.remove(rand.nextInt(jasmineList.size()));
            }
           
            // Gute Agenten in Turnier zählen.
            try {
                for (Evolvable<AbstractEvolvableAgent2D<AbstractEnvironment2D<?>>> r : jasmineList) {
                    JasmineRobotWithoutMutationRegularSelection jasRob = (JasmineRobotWithoutMutationRegularSelection) r;
                    if (jasRob.isGood()) {
                        this.numberGoodsInLastTournament++;
                    }
                }
            } catch (Exception e) {
            }
View Full Code Here

TOP

Related Classes of eas.users.lukas.marbImplicitEvolution.movingFitnessNoMutation.JasmineRobotWithoutMutationRegularSelection

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.