Package aima.core.search.local

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


    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

Related Classes of aima.core.search.local.HillClimbingSearch

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.