use of aima.core.environment.vacuum.VacuumEnvironmentViewActionTracker in project aima-java by aimacode.
the class TableDrivenVacuumAgentTest method testDirtyDirty.
@Test
public void testDirtyDirty() {
VacuumEnvironment tve = new VacuumEnvironment(VacuumEnvironment.LocationState.Dirty, VacuumEnvironment.LocationState.Dirty);
tve.addAgent(agent, VacuumEnvironment.LOCATION_A);
tve.addEnvironmentView(new VacuumEnvironmentViewActionTracker(envChanges));
tve.stepUntilDone();
Assert.assertEquals("Action[name==Suck]Action[name==Right]Action[name==Suck]Action[name==NoOp]", envChanges.toString());
}
use of aima.core.environment.vacuum.VacuumEnvironmentViewActionTracker in project aima-java by aimacode.
the class ReflexVacuumAgentTest method testCleanDirty.
@Test
public void testCleanDirty() {
VacuumEnvironment tve = new VacuumEnvironment(VacuumEnvironment.LocationState.Clean, VacuumEnvironment.LocationState.Dirty);
tve.addAgent(agent, VacuumEnvironment.LOCATION_A);
tve.addEnvironmentView(new VacuumEnvironmentViewActionTracker(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());
}
use of aima.core.environment.vacuum.VacuumEnvironmentViewActionTracker in project aima-java by aimacode.
the class ReflexVacuumAgentTest method testCleanClean.
@Test
public void testCleanClean() {
VacuumEnvironment tve = new VacuumEnvironment(VacuumEnvironment.LocationState.Clean, VacuumEnvironment.LocationState.Clean);
tve.addAgent(agent, VacuumEnvironment.LOCATION_A);
tve.addEnvironmentView(new VacuumEnvironmentViewActionTracker(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());
}
use of aima.core.environment.vacuum.VacuumEnvironmentViewActionTracker in project aima-java by aimacode.
the class ReflexVacuumAgentTest method testDirtyClean.
@Test
public void testDirtyClean() {
VacuumEnvironment tve = new VacuumEnvironment(VacuumEnvironment.LocationState.Dirty, VacuumEnvironment.LocationState.Clean);
tve.addAgent(agent, VacuumEnvironment.LOCATION_A);
tve.addEnvironmentView(new VacuumEnvironmentViewActionTracker(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());
}
use of aima.core.environment.vacuum.VacuumEnvironmentViewActionTracker in project aima-java by aimacode.
the class ModelBasedReflexVacuumAgentTest method testDirtyClean.
@Test
public void testDirtyClean() {
VacuumEnvironment tve = new VacuumEnvironment(VacuumEnvironment.LocationState.Dirty, VacuumEnvironment.LocationState.Clean);
tve.addAgent(agent, VacuumEnvironment.LOCATION_A);
tve.addEnvironmentView(new VacuumEnvironmentViewActionTracker(envChanges));
tve.stepUntilDone();
Assert.assertEquals("Action[name==Suck]Action[name==Right]Action[name==NoOp]", envChanges.toString());
}
Aggregations