Examples of BidirectionalMapProblem


Examples of aima.core.environment.map.BidirectionalMapProblem

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

Examples of aima.core.environment.map.BidirectionalMapProblem

      switch (state.getValue(MapAgentFrame.AGENT_SEL)) {
      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;
      }
      env.addAgent(agent, locs[0]);
View Full Code Here

Examples of aima.core.environment.map.BidirectionalMapProblem

      super(mapEnvironment.getMap(), mapEnvironment, search, goalTests);
    }
   
    @Override
    protected Problem formulateProblem(Object goal) {
      BidirectionalMapProblem problem =
        (BidirectionalMapProblem) super.formulateProblem(goal);
      Problem result = new Problem(
          problem.getInitialState(),
          problem.getActionsFunction(),
          problem.getResultFunction(),
          new DefaultGoalTest((String) goal) {
            @Override
            public boolean isGoalState(Object state) {
              visitedStates.add(state);
              return super.isGoalState(state);
            }
          },
          problem.getStepCostFunction());
      return result;
    }
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.