use of aima.core.agent.impl.DynamicPercept in project aima-java by aimacode.
the class MapEnvironmentTest method testPerceptSeenBy.
@Test
public void testPerceptSeenBy() {
me.addAgent(ma, "D");
DynamicPercept p = (DynamicPercept) me.getPerceptSeenBy(ma);
Assert.assertEquals(p.getAttribute(DynAttributeNames.PERCEPT_IN), "D");
}
use of aima.core.agent.impl.DynamicPercept in project aima-java by aimacode.
the class MapAgent method updateState.
//
// PROTECTED METHODS
//
@Override
protected void updateState(Percept p) {
DynamicPercept dp = (DynamicPercept) p;
state.setAttribute(DynAttributeNames.AGENT_LOCATION, dp.getAttribute(DynAttributeNames.PERCEPT_IN));
}
Aggregations