Package aima.core.search.framework

Examples of aima.core.search.framework.Search


            EightPuzzleFrame.SEARCH_SEL);
        Problem problem = new Problem(env.getBoard(),
            EightPuzzleFunctionFactory.getActionsFunction(),
            EightPuzzleFunctionFactory.getResultFunction(),
            new EightPuzzleGoalTest());
        Search search = SEARCH_ALGOS.get(pSel);
        agent = new SearchAgent(problem, search);
        env.addAgent(agent);
      }
    }
View Full Code Here


   *            search mode: {@link #TREE_SEARCH} or {@link #GRAPH_SEARCH}
   *
   */
  public Search createSearch(int strategy, int mode, HeuristicFunction hf) {
    QueueSearch qs = null;
    Search result = null;
    switch (mode) {
    case TREE_SEARCH:
      qs = new TreeSearch();
      break;
    case GRAPH_SEARCH:
View Full Code Here

        else
          af = NQueensFunctionFactory.getCActionsFunction();
        Problem problem = new Problem(env.getBoard(), af,
            NQueensFunctionFactory.getResultFunction(),
            new NQueensGoalTest());
        Search search = SEARCH_ALGOS.get(sSel);
        agent = new SearchAgent(problem, search);
        env.addAgent(agent);
      }
    }
View Full Code Here

    try {
      Problem problem = new Problem(new NQueensBoard(8),
          NQueensFunctionFactory.getIActionsFunction(),
          NQueensFunctionFactory.getResultFunction(),
          new NQueensGoalTest());
      Search search = new DepthLimitedSearch(8);
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      System.out.println("\nNQueensDemo BFS -->");
      Problem problem = new Problem(new NQueensBoard(8),
          NQueensFunctionFactory.getIActionsFunction(),
          NQueensFunctionFactory.getResultFunction(),
          new NQueensGoalTest());
      Search search = new BreadthFirstSearch(new TreeSearch());
      SearchAgent agent2 = new SearchAgent(problem, search);
      printActions(agent2.getActions());
      printInstrumentation(agent2.getInstrumentation());
    } catch (Exception e1) {
View Full Code Here

    try {
      Problem problem = new Problem(new NQueensBoard(8),
          NQueensFunctionFactory.getIActionsFunction(),
          NQueensFunctionFactory.getResultFunction(),
          new NQueensGoalTest());
      Search search = new DepthFirstSearch(new GraphSearch());
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

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

      System.out.println();
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
View Full Code Here

    System.out.println("\nEightPuzzleDemo recursive DLS (9) -->");
    try {
      Problem problem = new Problem(boardWithThreeMoveSolution, EightPuzzleFunctionFactory
          .getActionsFunction(), EightPuzzleFunctionFactory
          .getResultFunction(), new EightPuzzleGoalTest());
      Search search = new DepthLimitedSearch(9);
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

    System.out.println("\nEightPuzzleDemo Iterative DLS -->");
    try {
      Problem problem = new Problem(random1, EightPuzzleFunctionFactory
          .getActionsFunction(), EightPuzzleFunctionFactory
          .getResultFunction(), new EightPuzzleGoalTest());
      Search search = new IterativeDeepeningSearch();
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

    try {
      Problem problem = new Problem(boardWithThreeMoveSolution,
          EightPuzzleFunctionFactory.getActionsFunction(),
          EightPuzzleFunctionFactory.getResultFunction(),
          new EightPuzzleGoalTest());
      Search search = new GreedyBestFirstSearch(new GraphSearch(),
          new MisplacedTilleHeuristicFunction());
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
    } catch (Exception e) {
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.