Package aima.core.environment.map

Examples of aima.core.environment.map.MapEnvironment.step()


    if (env.getAgents().isEmpty())
      initAgents(logger);
    try {
      while (!env.isDone() && !frame.simulationPaused()) {
        Thread.sleep(sleepTime);
        env.step();
      }
    } catch (InterruptedException e) {}
    logger.log("</simulation-protocol>\n");
  }
 
View Full Code Here


  @Override
  public void step(MessageLogger logger) {
    MapEnvironment env = scenario.getEnv();
    if (env.getAgents().isEmpty())
      initAgents(logger);
    env.step();
  }
   
  /** Updates the status of the frame. */
  public void update(SimulationThread simulationThread) {
    if (simulationThread.isCanceled()) {
View Full Code Here

    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
    // Note: Will search forever if no path is possible,
    // Therefore restrict the number of steps to something
    // reasonablbe, against which to test.
    me.step(14);

    Assert.assertEquals(
        "Action[name==moveTo, location==B]->Action[name==moveTo, location==A]->Action[name==moveTo, location==B]->Action[name==moveTo, location==C]->Action[name==moveTo, location==B]->Action[name==moveTo, location==C]->Action[name==moveTo, location==D]->Action[name==moveTo, location==C]->Action[name==moveTo, location==D]->Action[name==moveTo, location==E]->Action[name==moveTo, location==D]->Action[name==moveTo, location==E]->Action[name==moveTo, location==F]->Action[name==moveTo, location==E]->",
        envChanges.toString());
  }
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.