Package aima.core.search.framework

Examples of aima.core.search.framework.Search


      Problem problem = new Problem(board,
          EightPuzzleFunctionFactory.getActionsFunction(),
          EightPuzzleFunctionFactory.getResultFunction(),
          new EightPuzzleGoalTest());
      Search search = new GreedyBestFirstSearch(new GraphSearch(),
          new ManhattanHeuristicFunction());
      SearchAgent agent = new SearchAgent(problem, search);
      Assert.assertEquals(49, agent.getActions().size());
      Assert.assertEquals("197",
          agent.getInstrumentation().getProperty("nodesExpanded"));
View Full Code Here


        MapFunctionFactory.getActionsFunction(romaniaMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            SimplifiedRoadMapOfPartOfRomania.BUCHAREST),
        new MapStepCostFunction(romaniaMap));

    Search search = new GreedyBestFirstSearch(new TreeSearch(),
        new StraightLineDistanceHeuristicFunction(
            SimplifiedRoadMapOfPartOfRomania.BUCHAREST, romaniaMap));
    SearchAgent agent = new SearchAgent(problem, search);
    Assert.assertEquals(
        "[Action[name==moveTo, location==Sibiu], Action[name==moveTo, location==Fagaras], Action[name==moveTo, location==Bucharest]]",
View Full Code Here

        MapFunctionFactory.getActionsFunction(romaniaMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            SimplifiedRoadMapOfPartOfRomania.BUCHAREST),
        new MapStepCostFunction(romaniaMap));

    Search search = new GreedyBestFirstSearch(new GraphSearch(),
        new StraightLineDistanceHeuristicFunction(
            SimplifiedRoadMapOfPartOfRomania.BUCHAREST, romaniaMap));
    SearchAgent agent = new SearchAgent(problem, search);
    Assert.assertEquals(
        "[Action[name==moveTo, location==Sibiu], Action[name==moveTo, location==Fagaras], Action[name==moveTo, location==Bucharest]]",
View Full Code Here

TOP

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

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.