Examples of OnlineSearchProblem


Examples of aima.core.search.online.OnlineSearchProblem

    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());
      agent = new LRTAStarAgent
      (osp, MapFunctionFactory.getPerceptToStateFunction(), heuristic);
      break;
    }
View Full Code Here

Examples of aima.core.search.online.OnlineSearchProblem

      case 0:
        agent = new SDMapAgent(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());
        agent = new LRTAStarAgent
        (osp, MapFunctionFactory.getPerceptToStateFunction(), heuristic);
        break;
      }
View Full Code Here

Examples of aima.core.search.online.OnlineSearchProblem

  }

  @Test
  public void testAlreadyAtGoal() {
    MapEnvironment me = new MapEnvironment(aMap);
    LRTAStarAgent agent = new LRTAStarAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("A"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction(), hf);
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineSearchProblem

  }

  @Test
  public void testNormalSearch() {
    MapEnvironment me = new MapEnvironment(aMap);
    LRTAStarAgent agent = new LRTAStarAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("F"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction(), hf);
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineSearchProblem

  }

  @Test
  public void testNoPath() {
    MapEnvironment me = new MapEnvironment(aMap);
    LRTAStarAgent agent = new LRTAStarAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("G"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction(), hf);
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineSearchProblem

  }

  @Test
  public void testAlreadyAtGoal() {
    MapEnvironment me = new MapEnvironment(aMap);
    OnlineDFSAgent agent = new OnlineDFSAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("A"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction());
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineSearchProblem

  }

  @Test
  public void testNormalSearch() {
    MapEnvironment me = new MapEnvironment(aMap);
    OnlineDFSAgent agent = new OnlineDFSAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("G"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction());
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineSearchProblem

  @Test
  public void testNoPath() {
    aMap = new ExtendableMap();
    aMap.addBidirectionalLink("A", "B", 1.0);
    MapEnvironment me = new MapEnvironment(aMap);
    OnlineDFSAgent agent = new OnlineDFSAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("X"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction());
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineSearchProblem

    aMap.addBidirectionalLink("2,2", "2,3", 1.0);
    aMap.addBidirectionalLink("3,2", "3,3", 1.0);
    aMap.addBidirectionalLink("2,3", "1,3", 1.0);

    MapEnvironment me = new MapEnvironment(aMap);
    OnlineDFSAgent agent = new OnlineDFSAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("3,3"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction());
    me.addAgent(agent, "1,1");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.