Package aima.core.environment.map

Examples of aima.core.environment.map.MapAgent


  public void test_AB_ReverseOnlyPath() {
    ExtendableMap aMap = new ExtendableMap();
    aMap.addUnidirectionalLink("B", "A", 5.0);

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "B" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();
View Full Code Here


    ExtendableMap aMap = new ExtendableMap();
    aMap.addUnidirectionalLink("B", "A", 5.0);
    aMap.addUnidirectionalLink("C", "B", 5.0);

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "C" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();
View Full Code Here

    aMap.addBidirectionalLink("B", "C", 5.0);
    aMap.addUnidirectionalLink("D", "C", 5.0);
    aMap.addUnidirectionalLink("E", "D", 5.0);

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "E" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();
View Full Code Here

    aMap.addBidirectionalLink("F", "G", 5.0);
    aMap.addBidirectionalLink("G", "H", 5.0);
    aMap.addUnidirectionalLink("B", "H", 5.0);

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "H" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();
View Full Code Here

    aMap.addBidirectionalLink("D", "E", 5.0);
    aMap.addBidirectionalLink("E", "F", 5.0);
    aMap.addUnidirectionalLink("E", "A", 5.0);

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "F" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();
View Full Code Here

    aMap.addUnidirectionalLink("F", "E", 5.0);
    aMap.addBidirectionalLink("E", "A", 5.0);
    aMap.addBidirectionalLink("D", "F", 5.0);

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "F" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();
View Full Code Here

  }

  @Test
  public void testStartingAtGoal() {
    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, recursiveBestFirstSearch,
        new String[] { SimplifiedRoadMapOfPartOfRomania.BUCHAREST });

    me.addAgent(ma, SimplifiedRoadMapOfPartOfRomania.BUCHAREST);
    me.addEnvironmentView(new TestEnvironmentView());
    me.stepUntilDone();
View Full Code Here

  }

  @Test
  public void testAIMA3eFigure3_27() {
    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, recursiveBestFirstSearch,
        new String[] { SimplifiedRoadMapOfPartOfRomania.BUCHAREST });

    me.addAgent(ma, SimplifiedRoadMapOfPartOfRomania.ARAD);
    me.addEnvironmentView(new TestEnvironmentView());
    me.stepUntilDone();
View Full Code Here

    aMap.addBidirectionalLink("B", "C", 4.0);
    aMap.addBidirectionalLink("C", "D", 7.0);
    aMap.addUnidirectionalLink("B", "E", 14.0);

    me = new MapEnvironment(aMap);
    ma = new MapAgent(me.getMap(), me, new UniformCostSearch(),
        new String[] { "A" });
  }
View Full Code Here

    Assert.assertEquals(p.getAttribute(DynAttributeNames.PERCEPT_IN), "D");
  }

  @Test
  public void testTwoAgentsSupported() {
    MapAgent ma1 = new MapAgent(me.getMap(), me, new UniformCostSearch(),
        new String[] { "A" });
    MapAgent ma2 = new MapAgent(me.getMap(), me, new UniformCostSearch(),
        new String[] { "A" });

    me.addAgent(ma1, "A");
    me.addAgent(ma2, "A");
    me.executeAction(ma1, new MoveToAction("B"));
View Full Code Here

TOP

Related Classes of aima.core.environment.map.MapAgent

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.