Package aima.core.environment.vacuum

Examples of aima.core.environment.vacuum.VacuumEnvironment.step()


    // a = new ReflexVacuumAgent();
    // a = new SimpleReflexVacuumAgent();
    // a = new TableDrivenVacuumAgent();
   
    env.addAgent(a);
    env.step(16);
    env.notifyViews("Performance=" + env.getPerformanceMeasure(a));
  }
}
View Full Code Here


        VacuumEnvironment.LocationState.Clean);
    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges));

    tve.step(8);

    Assert.assertEquals(
        "Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]",
        envChanges.toString());
  }
View Full Code Here

        VacuumEnvironment.LocationState.Dirty);
    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges));

    tve.step(8);

    Assert.assertEquals(
        "Action[name==Right]Action[name==Suck]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]",
        envChanges.toString());
  }
View Full Code Here

        VacuumEnvironment.LocationState.Clean);
    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges));

    tve.step(8);

    Assert.assertEquals(
        "Action[name==Suck]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]",
        envChanges.toString());
  }
View Full Code Here

        VacuumEnvironment.LocationState.Dirty);
    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges));

    tve.step(8);

    Assert.assertEquals(
        "Action[name==Suck]Action[name==Right]Action[name==Suck]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]",
        envChanges.toString());
  }
View Full Code Here

        VacuumEnvironment.LocationState.Clean);
    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges));

    tve.step(8);

    Assert.assertEquals(
        "Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]",
        envChanges.toString());
  }
View Full Code Here

        VacuumEnvironment.LocationState.Dirty);
    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges));

    tve.step(8);

    Assert.assertEquals(
        "Action[name==Right]Action[name==Suck]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]",
        envChanges.toString());
  }
View Full Code Here

        VacuumEnvironment.LocationState.Clean);
    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges));

    tve.step(8);

    Assert.assertEquals(
        "Action[name==Suck]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]",
        envChanges.toString());
  }
View Full Code Here

        VacuumEnvironment.LocationState.Dirty);
    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    tve.addEnvironmentView(new EnvironmentViewActionTracker(envChanges));

    tve.step(8);

    Assert.assertEquals(
        "Action[name==Suck]Action[name==Right]Action[name==Suck]Action[name==Left]Action[name==Right]Action[name==Left]Action[name==Right]Action[name==Left]",
        envChanges.toString());
  }
View Full Code Here

    tve.addAgent(agent, VacuumEnvironment.LOCATION_A);

    Assert.assertEquals(VacuumEnvironment.LOCATION_A,
        tve.getAgentLocation(agent));
    Assert.assertEquals(1, tve.getAgents().size());
    tve.step(); // cleans location A
    Assert.assertEquals(VacuumEnvironment.LOCATION_A,
        tve.getAgentLocation(agent));
    Assert.assertEquals(VacuumEnvironment.LocationState.Clean,
        tve.getLocationState(VacuumEnvironment.LOCATION_A));
    tve.step(); // moves to lcation B
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.