Examples of ObstacleRectangularScene


Examples of eas.simulation.spatial.sim2D.standardScenes.ObstacleRectangularScene

  public WandaEnvironment<AbstractAgent2D<?>>[] generateRunnables(ParCollection params) {
    WandaEnvironment<AbstractAgent2D<?>> env = new WandaEnvironment<AbstractAgent2D<?>>(0, params);
   
    Random rand = new Random(params.getSeed());
   
    env.addScene(new ObstacleRectangularScene(1, params, rand));
   
    for (int i = 0; i < 10; i++) {
      WandaAgent agent = new WandaAgent(i, env, params);
      agent.implantBrain(new MDL2eBrain<AbstractAgent2D<?>>(agent,
          new File("eas/users/students/danielFunke/wolfSheep/sheep.xml")));
View Full Code Here

Examples of eas.simulation.spatial.sim2D.standardScenes.ObstacleRectangularScene

    @Override
    public PacmanWorld[] generateRunnables(ParCollection params) {
        Random rand = new Random();
        PacmanWorld world = new PacmanWorld(0, params);
        RealPacmanAgent agent = new RealPacmanAgent(0, world, params);
        Scene2D<AbstractAgent2D<?>> obstacleScene = new ObstacleRectangularScene(4, params, new Random(params.getSeed()));
       
        double breite = obstacleScene.getBoundingBox().getWidth();
        double hoehe = obstacleScene.getBoundingBox().getHeight();
       
        for (int i = 0; i < 7; i++) {
            obstacleScene.addCollidingAgent(
                    new PacmanGhostAgent(1, world, params),
                    new Vector2D(
                            rand.nextDouble() * breite - breite / 2,
                            rand.nextDouble() * hoehe - hoehe / 2),
                    rand.nextDouble() * 360,
                    new Vector2D(2.8, 2.8));
        }
       
        obstacleScene.scaleScene(0.05);
        obstacleScene.rotateScene(10);
        world.addCollidingAgent(agent, Vector2D.NULL_VECTOR, 0);
        world.addScene(obstacleScene);

        return new PacmanWorld[] {world};
    }
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.