Package aima.core.environment.map

Examples of aima.core.environment.map.MapAgent


        logger.log("Error: This agent requires exact one destination.");
        return;
      }
      MapEnvironment env = scenario.getEnv();
      String goal = destinations.get(0);
      MapAgent agent = new MapAgent(env.getMap(), env, search, new String[] { goal });
      env.addAgent(agent, scenario.getInitAgentLocation());
    }
View Full Code Here


    heuristic.adaptToGoal(locs[1], map);
    Agent agent = null;
    MapAgentFrame.SelectionState state = frame.getSelection();
    switch (state.getValue(MapAgentFrame.AGENT_SEL)) {
    case 0:
      agent = new MapAgent(map, env, search, new String[] { locs[1] });
      break;
    case 1:
      Problem p = new BidirectionalMapProblem(map, null, locs[1]);
      OnlineSearchProblem osp = new OnlineSearchProblem
      (p.getActionsFunction(), p.getGoalTest(), p.getStepCostFunction());
View Full Code Here

  @Test
  public void test_A_StartingAtGoal() {
    ExtendableMap aMap = new ExtendableMap();

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

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

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

  public void test_AB_BothWaysPath() {
    ExtendableMap aMap = new ExtendableMap();
    aMap.addBidirectionalLink("A", "B", 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.addBidirectionalLink("A", "B", 5.0);
    aMap.addBidirectionalLink("B", "C", 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("A", "B", 5.0);
    aMap.addBidirectionalLink("B", "C", 5.0);
    aMap.addBidirectionalLink("C", "D", 5.0);

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

  public void test_AB_OriginalOnlyPath() {
    ExtendableMap aMap = new ExtendableMap();
    aMap.addUnidirectionalLink("A", "B", 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("A", "B", 5.0);
    aMap.addUnidirectionalLink("B", "C", 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.addUnidirectionalLink("B", "C", 5.0);
    aMap.addBidirectionalLink("C", "D", 5.0);
    aMap.addBidirectionalLink("D", "E", 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

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.