Package aima.test.core.unit.agent.impl

Examples of aima.test.core.unit.agent.impl.MockAgent


    perceptSequenceActions.put(
        createPerceptSequence(new DynamicPercept("key1", "value1"),
            new DynamicPercept("key1", "value2"),
            new DynamicPercept("key1", "value3")), ACTION_3);

    agent = new MockAgent(new TableDrivenAgentProgram(
        perceptSequenceActions));
  }
View Full Code Here


  AbstractAgent a;

  @Before
  public void setUp() {
    env = new XYEnvironment(10, 12);
    a = new MockAgent();
    env.addObjectToLocation(a, new XYLocation(3, 4));
  }
View Full Code Here

  @Test
  public void testAddObjectTwice() {
    Assert.assertEquals(1, env.getAgents().size());
    XYLocation loc = new XYLocation(5, 5);
    AbstractAgent b = new MockAgent();
    env.addObjectToLocation(b, loc);
    Assert.assertEquals(2, env.getAgents().size());

    Assert.assertEquals(loc, env.getCurrentLocationFor(b));
  }
View Full Code Here

  @Test
  public void testGetObjectsAt() {
    XYLocation loc = new XYLocation(5, 7);
    env.moveObjectToAbsoluteLocation(a, loc);
    Assert.assertEquals(1, env.getObjectsAt(loc).size());
    AbstractAgent b = new MockAgent();
    env.addObjectToLocation(b, loc);
    Assert.assertEquals(2, env.getObjectsAt(loc).size());
  }
View Full Code Here

  @Test
  public void testGetObjectsNear() {
    XYLocation loc = new XYLocation(5, 5);
    env.moveObjectToAbsoluteLocation(a, loc);
    AbstractAgent b = new MockAgent();
    AbstractAgent c = new MockAgent();
    Wall w1 = new Wall();

    env.addObjectToLocation(b, new XYLocation(7, 4));
    env.addObjectToLocation(c, new XYLocation(5, 7));
    env.addObjectToLocation(w1, new XYLocation(3, 10));
View Full Code Here

TOP

Related Classes of aima.test.core.unit.agent.impl.MockAgent

Copyright © 2018 www.massapicom. 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.