Examples of HillClimbingSearch


Examples of aima.core.search.local.HillClimbingSearch

    case RBF_SEARCH:
      result = new RecursiveBestFirstSearch(new AStarEvaluationFunction(
          hf));
      break;
    case HILL_SEARCH:
      result = new HillClimbingSearch(hf);
      break;
    }
    return result;
  }
View Full Code Here

Examples of aima.core.search.local.HillClimbingSearch

    try {
      Problem problem = new Problem(new NQueensBoard(8),
          NQueensFunctionFactory.getIActionsFunction(),
          NQueensFunctionFactory.getResultFunction(),
          new NQueensGoalTest());
      HillClimbingSearch search = new HillClimbingSearch(
          new AttackingPairsHeuristic());
      SearchAgent agent = new SearchAgent(problem, search);

      System.out.println();
      printActions(agent.getActions());
      System.out.println("Search Outcome=" + search.getOutcome());
      System.out.println("Final State=\n" + search.getLastSearchState());
      printInstrumentation(agent.getInstrumentation());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
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.