Package aima.core.search.framework

Examples of aima.core.search.framework.DefaultGoalTest


  Problem reverseProblem;

  public BidirectionalMapProblem(Map map, String initialState,
      String goalState) {
    super(initialState, MapFunctionFactory.getActionsFunction(map),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            goalState), new MapStepCostFunction(map));

    this.map = map;

    reverseProblem = new Problem(goalState,
        MapFunctionFactory.getActionsFunction(map),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            initialState), new MapStepCostFunction(map));
  }
View Full Code Here


  Problem reverseProblem;

  public BidirectionalMapProblem(Map aMap, String initialState,
      String goalState) {
    super(initialState, MapFunctionFactory.getActionsFunction(aMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            goalState), new MapStepCostFunction(aMap));

    map = aMap;

    reverseProblem = new Problem(goalState,
        MapFunctionFactory.getActionsFunction(aMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            initialState), new MapStepCostFunction(aMap));
  }
View Full Code Here

  @Test
  public void testAIMA3eFigure3_15() throws Exception {
    Map romaniaMap = new SimplifiedRoadMapOfPartOfRomania();
    Problem problem = new Problem(SimplifiedRoadMapOfPartOfRomania.SIBIU,
        MapFunctionFactory.getActionsFunction(romaniaMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            SimplifiedRoadMapOfPartOfRomania.BUCHAREST),
        new MapStepCostFunction(romaniaMap));

    Search search = new UniformCostSearch();
    SearchAgent agent = new SearchAgent(problem, search);
View Full Code Here

    map.addBidirectionalLink("c", "e", 1.0);
    map.addBidirectionalLink("d", "goal", 1.0);
    map.addBidirectionalLink("e", "goal", 5.0);
    Problem problem = new Problem("start",
        MapFunctionFactory.getActionsFunction(map),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            "goal"), new MapStepCostFunction(map));

    Search search = new UniformCostSearch();
    SearchAgent agent = new SearchAgent(problem, search);
View Full Code Here

  public RouteFindingProblem(MapNode from, MapNode to, MapWayFilter filter,
      boolean ignoreOneWays) {
    initialState = from;
    actionsFunction = new OsmActionsFunction(filter, ignoreOneWays, to);
    resultFunction = new OsmResultFunction();
    goalTest = new DefaultGoalTest(to);
    stepCostFunction = new OsmDistanceStepCostFunction();
  }
View Full Code Here

  public RouteFindingProblem(MapNode from, MapNode to, MapWayFilter filter,
      boolean ignoreOneWays, StepCostFunction costs) {
    initialState = from;
    actionsFunction = new OsmActionsFunction(filter, ignoreOneWays, to);
    resultFunction = new OsmResultFunction();
    goalTest = new DefaultGoalTest(to);
    stepCostFunction = costs;
  }
View Full Code Here

        (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);
            }
View Full Code Here

  @Test
  public void testAIMA3eFigure3_15() throws Exception {
    Map romaniaMap = new SimplifiedRoadMapOfPartOfRomania();
    Problem problem = new Problem(SimplifiedRoadMapOfPartOfRomania.SIBIU,
        MapFunctionFactory.getActionsFunction(romaniaMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            SimplifiedRoadMapOfPartOfRomania.BUCHAREST),
        new MapStepCostFunction(romaniaMap));

    Search search = new AStarSearch(new GraphSearch(),
        new StraightLineDistanceHeuristicFunction(
View Full Code Here

  @Test
  public void testAIMA3eFigure3_24() throws Exception {
    Map romaniaMap = new SimplifiedRoadMapOfPartOfRomania();
    Problem problem = new Problem(SimplifiedRoadMapOfPartOfRomania.ARAD,
        MapFunctionFactory.getActionsFunction(romaniaMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            SimplifiedRoadMapOfPartOfRomania.BUCHAREST),
        new MapStepCostFunction(romaniaMap));

    Search search = new AStarSearch(new TreeSearch(),
        new StraightLineDistanceHeuristicFunction(
View Full Code Here

  @Test
  public void testAIMA3eFigure3_24_using_GraphSearch() throws Exception {
    Map romaniaMap = new SimplifiedRoadMapOfPartOfRomania();
    Problem problem = new Problem(SimplifiedRoadMapOfPartOfRomania.ARAD,
        MapFunctionFactory.getActionsFunction(romaniaMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            SimplifiedRoadMapOfPartOfRomania.BUCHAREST),
        new MapStepCostFunction(romaniaMap));

    Search search = new AStarSearch(new GraphSearch(),
        new StraightLineDistanceHeuristicFunction(
View Full Code Here

TOP

Related Classes of aima.core.search.framework.DefaultGoalTest

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.