Examples of JasmineRobot


Examples of eas.simulation.spatial.sim2D.standardAgents.jasmine.JasmineRobot

            LinkedList<Double> verteilung2 = new LinkedList<Double>();
            for (JasmineRobot rob : turnier) {
                verteilung2.add(rob.getEvaluation());
            }

            JasmineRobot selected = (JasmineRobot) MiscMath.randVerteilungDoubleAngenaehert(turnier, verteilung2, rand);
//            System.out.println(selected);
            String selectedGenome = selected.getBrain().getMarb().erzeugeStringSeq();
           
            for (JasmineRobot rob : turnier) {
                realRob = (JasmineRobotWithoutMutationMatrixSelection) rob;
                realRob.getBrain().getMarb().erzeugeAusStdSequenz(selectedGenome);
                realRob.myGenome = selectedGenome;
View Full Code Here

Examples of eas.simulation.spatial.sim2D.standardAgents.jasmine.JasmineRobot

    private static final long serialVersionUID = -1656033216531439063L;

    @Override
    public MARBFastEnvironment[] generateRunnables(ParCollection params) {
        MARBFastEnvironment env = new MARBFastEnvironment(0, params, false);
        JasmineRobot agent;
        MARBBrain<AbstractAgent2D<?>> brain;
        Random rand = new Random(params.getSeed());
        Vector2D pos;
        double richt;
        int numAgents = params.getParValueInt("NumberOfAgents");
       
        if (numAgents < 1) {
            numAgents = 1;
        }
       
        Rectangle2D bound = new Rectangle2D(env.getBoundingBox(false));
       
        double puffer = 100;
        bound.setLeft(bound.upperLeftCorner().x + puffer);
        bound.setRight(bound.lowerRightCorner().x - puffer);
        bound.setTop(bound.upperLeftCorner().y + puffer);
        bound.setBottom(bound.lowerRightCorner().y - puffer);
       
        for (int j = 0; j < numAgents; j++) {
            if (j == 56 && params.getParValueInt("TilesVertically") > 0) {
                System.out.println();
            }
           
            agent = new JasmineRobot(j, env, rand, params, false, 0);
            brain = new MARBBrain<AbstractAgent2D<?>>(
                    agent,
//                  "001, 003, 003, 001, 000, 012, 004, 196, 000, 015, 000, 012, 007, 135, 000, 006, 000, 010, 000, 000, 001, 001, 000, 012, 001, 191, 000, 004, 000, 012, 001, 032, 000, 005, 000, 012, 003, 073, 000, 015, 000, 011, 000, 012, 004, 170, 000, 016, 000, 010, 000, 010, 000, 000, 005, 001, 000, 012, 004, 000, 012, 007, 000, 015, 000, 012, 001, 073, 000, 008, 000, 011, 000, 000, 011, 001, 000, 000, 000, 015, 003, 003, 001, 000, 000, 000, 011, 004, 001, 001, 000, 012, 006, 031, 000, 008, 000, 000, 022, 001, 000, 000, 000, 026, 003, 005, 001, 000, 000, 000, 010, 002, 005, 001, 000, 000, 000, 009, 003, 004, 001, 000, 012, 006, 108, 000, 009, 000, 012, 004, 140, 000, 016, 000, 010, 000, 012, 006, 125, 000, 008, 000, 011, 000, 000, 010, 001, 000, 012, 001, 092, 000, 016, 000, 012, 003, 113, 000, 016, 000, 012, 001, 017, 000, 015, 000, 012, 003, 000, 012, 001, 000, 008, 000, 011, 000, 010, 000, 010, 000, 000, 006, 001, 000, 012, 001, 163, 000, 009, 000, 012, 003, 000, 012, 001, 000, 015, 000, 010, 000, 000, 015, 001, 000, 012, 002, 013, 000, 016, 000, 012, 005, 091, 000, 006, 000, 010, 000, 000, 011, 001, 000, 000, 000, 022, 004, 005, 001, 000, 012, 003, 140, 000, 009, 000, 012, 007, 098, 000, 009, 000, 010, 000, 012, 001, 071, 000, 008, 000, 012, 007, 210, 000, 008, 000, 011, 000, 010, 000, 000, 015, 001, 000, 000, 000, 006, 005, 003, 001, 000, 012, 006, 045, 000, 015, 000, 000, 011, 001, 000, 000, 000, 005, 005, 009, 001, 000, 012, 006, 158, 000, 015, 000, 012, 006, 132, 000, 009, 000, 012, 004, 080, 000, 009, 000, 012, 002, 000, 012, 005, 000, 016, 000, 010, 000, 011, 000, 011, 000, 000, 006, 001, 000, 012, 003, 247, 000, 008, 000, 012, 004, 089, 000, 008, 000, 011, 000, 000, 009, 001, 000, 012, 005, 253, 000, 016, 000, 000, 004, 001, 000, 012, 005, 095, 000, 009, 000, 012, 006, 045, 000, 009, 000, 010, 000, 000, 019, 001, 000, 012, 005, 081, 000, 015, 000, 012, 005, 213, 000, 009, 000, 010, 000, 000, 026, 001, 000, 012, 007, 000, 012, 005, 000, 015, 000, 000, 011, 001, 000, 000, 000, 004, 005, 003, 001, 000, 000, 000, 019, 005, 001, 001, 000, 012, 007, 000, 012, 002, 000, 015, 000, 000, 002, 001, 000, 000, 000, 002, 005, 004, 001, 000, 012, 006, 143, 000, 008, 000, 012, 007, 199, 000, 015, 000, 011, 000, 000, 002, 001, 000, 000, 000",
                    "",
                    params);
            agent.implantBrain(brain);
           
            pos = new Vector2D(
                    rand.nextDouble() * (bound.lowerRightCorner().x - bound.upperLeftCorner().x) + bound.upperLeftCorner().x,
                    rand.nextDouble() * (bound.lowerRightCorner().y - bound.upperLeftCorner().y) + bound.upperLeftCorner().y);
            richt = rand.nextDouble() * 360;
 
View Full Code Here

Examples of eas.simulation.spatial.sim2D.standardAgents.jasmine.JasmineRobot

    private static final long serialVersionUID = 6696105919580212985L;

    @Override
    public GateEnvironment[] generateRunnables(ParCollection params) {
        GateEnvironment env = new GateEnvironment(0, params);
        JasmineRobot agent;
        MARBBrain<AbstractAgent2D<?>> brain;
        Random rand = new Random(params.getSeed());
        Vector2D pos;
        double richt;
        int numAgents = params.getParValueInt("NumOfAgents");
       
        if (numAgents < 1) {
            numAgents = 1;
        }
       
        Rectangle2D bound = new Rectangle2D(env.getBoundingBox(false));
       
        double puffer = 100;
        bound.setLeft(bound.upperLeftCorner().x + puffer);
        bound.setRight(bound.lowerRightCorner().x - puffer);
        bound.setTop(bound.upperLeftCorner().y + puffer);
        bound.setBottom(bound.lowerRightCorner().y - puffer);
       
        for (int j = 0; j < numAgents; j++) {
            agent = new JasmineRobot(j, env, rand, params, true, 0);
            brain = new MARBBrain<AbstractAgent2D<?>>(
                    agent,
//                        "001, 003, 003, 001, 000, 012, 004, 196, 000, 015, 000, 012, 007, 135, 000, 006, 000, 010, 000, 000, 001, 001, 000, 012, 001, 191, 000, 004, 000, 012, 001, 032, 000, 005, 000, 012, 003, 073, 000, 015, 000, 011, 000, 012, 004, 170, 000, 016, 000, 010, 000, 010, 000, 000, 005, 001, 000, 012, 004, 000, 012, 007, 000, 015, 000, 012, 001, 073, 000, 008, 000, 011, 000, 000, 011, 001, 000, 000, 000, 015, 003, 003, 001, 000, 000, 000, 011, 004, 001, 001, 000, 012, 006, 031, 000, 008, 000, 000, 022, 001, 000, 000, 000, 026, 003, 005, 001, 000, 000, 000, 010, 002, 005, 001, 000, 000, 000, 009, 003, 004, 001, 000, 012, 006, 108, 000, 009, 000, 012, 004, 140, 000, 016, 000, 010, 000, 012, 006, 125, 000, 008, 000, 011, 000, 000, 010, 001, 000, 012, 001, 092, 000, 016, 000, 012, 003, 113, 000, 016, 000, 012, 001, 017, 000, 015, 000, 012, 003, 000, 012, 001, 000, 008, 000, 011, 000, 010, 000, 010, 000, 000, 006, 001, 000, 012, 001, 163, 000, 009, 000, 012, 003, 000, 012, 001, 000, 015, 000, 010, 000, 000, 015, 001, 000, 012, 002, 013, 000, 016, 000, 012, 005, 091, 000, 006, 000, 010, 000, 000, 011, 001, 000, 000, 000, 022, 004, 005, 001, 000, 012, 003, 140, 000, 009, 000, 012, 007, 098, 000, 009, 000, 010, 000, 012, 001, 071, 000, 008, 000, 012, 007, 210, 000, 008, 000, 011, 000, 010, 000, 000, 015, 001, 000, 000, 000, 006, 005, 003, 001, 000, 012, 006, 045, 000, 015, 000, 000, 011, 001, 000, 000, 000, 005, 005, 009, 001, 000, 012, 006, 158, 000, 015, 000, 012, 006, 132, 000, 009, 000, 012, 004, 080, 000, 009, 000, 012, 002, 000, 012, 005, 000, 016, 000, 010, 000, 011, 000, 011, 000, 000, 006, 001, 000, 012, 003, 247, 000, 008, 000, 012, 004, 089, 000, 008, 000, 011, 000, 000, 009, 001, 000, 012, 005, 253, 000, 016, 000, 000, 004, 001, 000, 012, 005, 095, 000, 009, 000, 012, 006, 045, 000, 009, 000, 010, 000, 000, 019, 001, 000, 012, 005, 081, 000, 015, 000, 012, 005, 213, 000, 009, 000, 010, 000, 000, 026, 001, 000, 012, 007, 000, 012, 005, 000, 015, 000, 000, 011, 001, 000, 000, 000, 004, 005, 003, 001, 000, 000, 000, 019, 005, 001, 001, 000, 012, 007, 000, 012, 002, 000, 015, 000, 000, 002, 001, 000, 000, 000, 002, 005, 004, 001, 000, 012, 006, 143, 000, 008, 000, 012, 007, 199, 000, 015, 000, 011, 000, 000, 002, 001, 000, 000, 000",
                    "001, 003, 001, 001, 000, 000, 000",
                    params);
            agent.implantBrain(brain);
           
            pos = new Vector2D(
                    rand.nextDouble() * (bound.lowerRightCorner().x - bound.upperLeftCorner().x) + bound.upperLeftCorner().x,
                    rand.nextDouble() * (bound.lowerRightCorner().y - bound.upperLeftCorner().y) + bound.upperLeftCorner().y);
            richt = rand.nextDouble() * 360;
 
View Full Code Here

Examples of eas.simulation.spatial.sim2D.standardAgents.jasmine.JasmineRobot

    private static final long serialVersionUID = 8860483546146256043L;

    @Override
    public MARBMazeEnvironment[] generateRunnables(ParCollection params) {
        MARBMazeEnvironment env = new MARBMazeEnvironment(0, params);
        JasmineRobot agent;
        MARBBrain<AbstractAgent2D<?>> brain;
        Random rand = new Random(params.getSeed());
        Vector2D pos;
        double richt = rand.nextDouble() * 360;
       
        for (int j = 0; j < 50; j++) {
            agent = new JasmineRobot(j, env, rand, params, false, 0);
            brain = new MARBBrain<AbstractAgent2D<?>>(
                    agent,
//                        "001, 003, 003, 001, 000, 012, 004, 196, 000, 015, 000, 012, 007, 135, 000, 006, 000, 010, 000, 000, 001, 001, 000, 012, 001, 191, 000, 004, 000, 012, 001, 032, 000, 005, 000, 012, 003, 073, 000, 015, 000, 011, 000, 012, 004, 170, 000, 016, 000, 010, 000, 010, 000, 000, 005, 001, 000, 012, 004, 000, 012, 007, 000, 015, 000, 012, 001, 073, 000, 008, 000, 011, 000, 000, 011, 001, 000, 000, 000, 015, 003, 003, 001, 000, 000, 000, 011, 004, 001, 001, 000, 012, 006, 031, 000, 008, 000, 000, 022, 001, 000, 000, 000, 026, 003, 005, 001, 000, 000, 000, 010, 002, 005, 001, 000, 000, 000, 009, 003, 004, 001, 000, 012, 006, 108, 000, 009, 000, 012, 004, 140, 000, 016, 000, 010, 000, 012, 006, 125, 000, 008, 000, 011, 000, 000, 010, 001, 000, 012, 001, 092, 000, 016, 000, 012, 003, 113, 000, 016, 000, 012, 001, 017, 000, 015, 000, 012, 003, 000, 012, 001, 000, 008, 000, 011, 000, 010, 000, 010, 000, 000, 006, 001, 000, 012, 001, 163, 000, 009, 000, 012, 003, 000, 012, 001, 000, 015, 000, 010, 000, 000, 015, 001, 000, 012, 002, 013, 000, 016, 000, 012, 005, 091, 000, 006, 000, 010, 000, 000, 011, 001, 000, 000, 000, 022, 004, 005, 001, 000, 012, 003, 140, 000, 009, 000, 012, 007, 098, 000, 009, 000, 010, 000, 012, 001, 071, 000, 008, 000, 012, 007, 210, 000, 008, 000, 011, 000, 010, 000, 000, 015, 001, 000, 000, 000, 006, 005, 003, 001, 000, 012, 006, 045, 000, 015, 000, 000, 011, 001, 000, 000, 000, 005, 005, 009, 001, 000, 012, 006, 158, 000, 015, 000, 012, 006, 132, 000, 009, 000, 012, 004, 080, 000, 009, 000, 012, 002, 000, 012, 005, 000, 016, 000, 010, 000, 011, 000, 011, 000, 000, 006, 001, 000, 012, 003, 247, 000, 008, 000, 012, 004, 089, 000, 008, 000, 011, 000, 000, 009, 001, 000, 012, 005, 253, 000, 016, 000, 000, 004, 001, 000, 012, 005, 095, 000, 009, 000, 012, 006, 045, 000, 009, 000, 010, 000, 000, 019, 001, 000, 012, 005, 081, 000, 015, 000, 012, 005, 213, 000, 009, 000, 010, 000, 000, 026, 001, 000, 012, 007, 000, 012, 005, 000, 015, 000, 000, 011, 001, 000, 000, 000, 004, 005, 003, 001, 000, 000, 000, 019, 005, 001, 001, 000, 012, 007, 000, 012, 002, 000, 015, 000, 000, 002, 001, 000, 000, 000, 002, 005, 004, 001, 000, 012, 006, 143, 000, 008, 000, 012, 007, 199, 000, 015, 000, 011, 000, 000, 002, 001, 000, 000, 000",
                    "001, 003, 001, 001, 000, 000, 000",
                    params);
            agent.implantBrain(brain);
           
            pos = new Vector2D(
                    rand.nextDouble() * (env.getBoundingBox(false).lowerRightCorner().x - env.getBoundingBox(false).upperLeftCorner().x) + env.getBoundingBox(false).upperLeftCorner().x,
                    rand.nextDouble() * (env.getBoundingBox(false).lowerRightCorner().y - env.getBoundingBox(false).upperLeftCorner().y) + env.getBoundingBox(false).upperLeftCorner().y);
            while (!env.addCollidingAgent(
View Full Code Here

Examples of eas.simulation.spatial.sim2D.standardAgents.jasmine.JasmineRobot

        MARBFastEnvironment env = new MARBFastEnvironment(0, params, false);
       
        int anzahl = 10;
       
        for (int i = 0; i < anzahl; i++) {
            JasmineRobot r = new JasmineRobot(i, env, new Random(), params, false, 0);
            r.implantBrain(new MARBBrain<AbstractAgent2D<?>>(
                    r,
    //                "001, 003, 001, 001, 000, 000, 000",
                    "001, 003, 001, 001, 000, 014, 000, 013, 000, 014, 203, 000, 012, 002, 000, 005, 000, 011, 000, 010, 000, 011, 000, 000, 005, 001, 000, 000, 000, 018, 003, 005, 001, 000, 000, 000, 016, 004, 001, 001, 000, 000, 000, 017, 004, 003, 001, 000, 000, 000, 015, 003, 004, 001, 000, 014, 000, 000, 015, 001, 000, 000, 000, 014, 004, 005, 001, 000, 000, 000, 013, 003, 006, 001, 000, 000, 000, 012, 001, 002, 001, 000, 000, 000, 011, 003, 008, 001, 000, 000, 000, 010, 005, 002, 001, 000, 012, 007, 130, 000, 007, 000, 000, 001, 001, 000, 000, 000, 008, 004, 003, 001, 218, 000, 012, 001, 000, 009, 000, 012, 004, 000, 012, 001, 000, 007, 000, 010, 000, 000, 001, 001, 000, 012, 003, 111, 000, 008, 171, 000, 012, 007, 000, 005, 000, 011, 000, 000, 005, 001, 052, 000, 012, 007, 000, 008, 000, 000, 011, 001, 000, 000, 000, 007, 005, 005, 001, 017, 000, 012, 006, 000, 015, 000, 000, 013, 001, 000, 000, 000, 006, 005, 004, 001, 000, 000, 000, 005, 004, 004, 001, 000, 000, 000, 004, 001, 002, 001, 000, 000, 000, 003, 001, 005, 001, 000, 000, 000, 002, 001, 002, 001, 000, 000, 000",
                    params));
            env.addCollidingAgent(r, new Vector2D(-anzahl * 15.5 + i * 33, 800), new Random().nextDouble() * 360);
            r.deactivateEvolution();
        }
       
        return new AbstractEnvironment2D[] { env };
    }
View Full Code Here

Examples of eas.simulation.spatial.sim2D.standardAgents.jasmine.JasmineRobot

            /**
             *
             */
            private static final long serialVersionUID = -5942918193646510033L;};
        Random rand = new Random(params.getSeed());
        JasmineRobot agent;
        Vector2D pos;
        double richt;

        env.addCollidingAgent(
                new ObstacleAgent(0, env, params),
                new Vector2D(0, -1000),
                0,
                new Vector2D(10, 1));
        env.addCollidingAgent(
                new ObstacleAgent(1, env, params),
                new Vector2D(0, 1000),
                0,
                new Vector2D(10, 1));
        env.addCollidingAgent(
                new ObstacleAgent(2, env, params),
                new Vector2D(-2500, 0),
                90,
                new Vector2D(3.95, 1));
        env.addCollidingAgent(
                new ObstacleAgent(3, env, params),
                new Vector2D(2500, 0),
                90,
                new Vector2D(3.95, 1));

        for (int j = 4; j <= 500; j++) {
            richt = rand.nextDouble() * 360;
            agent = new JasmineRobot(j, env, rand, params, false, 0);
            agent.deactivateEvolution();
           
            // BRAIN.
            agent.implantBrain(new MARBBrain<AbstractAgent<?>>(agent, "002, 003, 001, 001, 000, 012, 001, 010, 000, 005, 000, 000, 001, 001, 000, 000, 000, 001, 004, 001, 001, 000, 000, 000", params));
           
            // ADDITIONAL SENSOR.
//            agent.addSensor(new GenericSensor<Set<Integer>, AbstractEnvironment2D<AbstractAgent2D<?>>, JasmineRobot>() {
//
//                @Override
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.