Package eas.simulation.spatial.sim2D.marbSimulation

Examples of eas.simulation.spatial.sim2D.marbSimulation.RobEA


                // Starte n Generationen vor der besten Population.
                bestPopNum = Math.max(0, bestPopNum - 1);
               
                for (int i = 0; i < aufn.getPop(0).getRobSchnapp().length; i++) {
                    RobSnapshot robSchnapp = aufn.getPop(bestPopNum).getRobSchnapp()[i];
                    RobEA rob = new RobEA(i, env, params, env.getRand());
                    rob.erzeugeAusSequenz(0, robSchnapp.getVStdCodes()[0], null, false);
                    env.hinzuRobotRand(rob);
                   
                    // Speichere einen beliebigen (hoffentlich representativen) Roboterautomaten.
                    if (i == 0) {
                        StaticMethods.saveAutPNG(
                                robSchnapp.getVStdCodes()[0],
                                storedRuns[filesFinished].getName() + "_simTrajTime_" + simZyk.getLastTick() + "_simOriginalTime_" + aufn.getPop(bestPopNum).getId() + ".png",
                                params);
                        rob.speichereAuts(storedRuns[filesFinished].getName() + "_simTrajTime_" + simZyk.getLastTick() + "_simOriginalTime_" + aufn.getPop(bestPopNum).getId());
                    }
                }
                       
                filesFinished++;
            } else {
View Full Code Here


            final List<Plugin<?>> plugins) {

        this.aktVisTrans = new LinkedList<VisTrans>();
       
        if (this.rob == null) {
            this.rob = new RobEA(
                    0,
                    0,
                    0,
                    eas.simulation.ConstantsSimulation.ROB_AUSDEHNUNG_X,
                    eas.simulation.ConstantsSimulation.ROB_AUSDEHNUNG_Y,
View Full Code Here

                * umg.getFeld()[0].length
                * (Double) this.pars
                        .getParValue(Schleim.SLIME_PROZ_P_ATT) / 100);

        for (int i = 0; i < schleimanz; i++) {
            RobEA r = new RobEA(i, umg, this.pars, this.rand);
            umg.hinzuRobotRand(r);
        }

        XMLAufnahmePlugin aufnahmePlug = (XMLAufnahmePlugin) umg
                .getPluginObject(new XMLAufnahmePlugin().id());
View Full Code Here

                // Starte n Generationen vor der besten Population.
                bestPopNum = Math.max(0, bestPopNum - 1);
               
                for (int i = 0; i < aufn.getPop(0).getRobSchnapp().length; i++) {
                    RobSnapshot robSchnapp = aufn.getPop(bestPopNum).getRobSchnapp()[i];
                    RobEA rob = new RobEA(i, env, params, env.getRand());
                    rob.erzeugeAusSequenz(0, robSchnapp.getVStdCodes()[0], null, false);
                    env.hinzuRobotRand(rob);
                   
                    // Speichere einen beliebigen (hoffentlich representativen) Roboterautomaten.
                    if (i == 0) {
                        rob.speichereAuts(storedRuns[filesFinished].getName() + "_simTrajTime_" + simZyk.getLastTick() + "_simOriginalTime_" + aufn.getPop(bestPopNum).getId());
                    }
                }
                       
                filesFinished++;
            } else {
View Full Code Here

                     final int                ident,
                     final ParCollection      params,
                     final boolean            sel,
                     final List<Plugin<?>>       plugins) {

        this.rob = new RobEA(0, 0, 0,
                              eas.simulation.ConstantsSimulation.ROB_AUSDEHNUNG_X,
                              eas.simulation.ConstantsSimulation.ROB_AUSDEHNUNG_Y,
                              umg,
                              null,
                              mutVerh,
View Full Code Here

            final int           ident,
            final ParCollection params,
            final boolean       sel,
            final Vis           obs,
            final List<Plugin<?>> plugins) {
        this.rob = new RobEA(automaten,
                               cond,
                               umg,
                               ident,
                               params,
                               rand,
View Full Code Here

        String endung = eas.startSetup.marbBuilder.ConstantsGraphVis.GRAPH_ENDUNG;
        String[] gespGr = verz.list(new FileNamePostfixFilter(endung));
        ArrayList<Integer> a;
        Iterator<Integer> it2;
        int anzahl = 0;
        RobEA aktRob;
        Knoten l;
        int gesAnz = 0;
        String[] verzPar = {"verz", verzeichnis};
        ParCollection params = GlobalVariables.getPrematureParameters();
        params.overwriteParameterList(verzPar);
       
       
        if (positiv) {
            System.out.println("Positive Automaten:");
        } else {
            System.out.println("Negative Automaten:");
        }
       
        for (int i = 0; i < gespGr.length; i++) {
            System.gc();
            if ((!positiv
                && (gespGr[i].contains("-")
                    || gespGr[i].contains("_0")))
                || positiv
                && !(gespGr[i].contains("-")
                     || gespGr[i].contains("_0"))) {
               
                gesAnz++;
               
                aktRob = new VisMantel(
                        gespGr[i].substring(0, gespGr[i].length() - 4),
                        null,
                        null,
                        null,
                        null,
                        -1,
                        params,
                        false,
                        null).getRob();

                a = aktRob.vAuts()[0].getKnList();
               
                it2 = a.iterator();
                while (it2.hasNext()) {
                    l = aktRob.vAuts()[0].holeKnoten(it2.next());
                    if (l.getInfo().getAktion()
                            == bef) {
                        if (!erreichbar
                            || aktRob.vAuts()[0].erreichbar(l.holeName())) {
                                anzahl++;
                                System.out.println(anzahl
                                                   + "/"
                                                   + gesAnz
                                                   + " "
View Full Code Here

     */
    @Override
    public boolean evaluiere(final Object aut) {
        int zahl1;
        int zahl2;
        RobEA rob;
        Translator trans;
       
        if (aut == null) {
            zahl1 = this.operand1;
            zahl2 = this.operand2;
        } else if (aut.getClass().equals(RobEA.class)) {
            rob = (RobEA) aut;
            if (this.sensor1) {
                zahl1 = (Integer) rob.sense(this.operand1 - 1);
            } else {
                zahl1 = this.operand1;
            }
   
            if (this.sensor2) {
                zahl2 = (Integer) rob.sense(this.operand2 - 1);
            } else {
                zahl2 = this.operand2;
            }
        } else if (aut.getClass().equals(Translator.class)) {
            trans = (Translator) aut;
View Full Code Here

           
            RobEA[] robs = new RobEA[numRobs];

            for (int i = 0; i < numRobs; i++)
            {
                RobEA r = new RobEA(i, umg,
                        params, rand);
                robs[i] = r;
                umg.hinzuRobotRand(r);
                r.setPos(i*10, i*13, false);
                r.setAngle(90);
            }

            stigmergy = new StigmergyBenedikt(umg
                    .ausdX() / 10,
                    umg.ausdY() / 10, 3);
View Full Code Here

            System.out.println("GROUND CREATED!!!!!!!!!");
           
            NeuroAgentBenedikt[] agents = new NeuroAgentBenedikt[numRobs];
            for (int i = 0; i < numRobs; i++)
            {
                RobEA r = new RobEA(i, umg, params, rand);
                umg.hinzuRobotRand(r);
                r.setPos(i*10, i*13, false);
                r.setAngle(90);
                agents[i] = new NeuroAgentBenedikt(r, null, rand);
            }

            pop = new PopulationBenedikt(agents, rand);

View Full Code Here

TOP

Related Classes of eas.simulation.spatial.sim2D.marbSimulation.RobEA

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.