Examples of EightPuzzleGoalTest


Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

        int pSel = frame.getSelection().getValue(
            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

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

  private static void eightPuzzleDLSDemo() {
    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) {
View Full Code Here

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

  private static void eightPuzzleIDLSDemo() {
    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) {
View Full Code Here

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

        .println("\nEightPuzzleDemo Greedy Best First Search (MisplacedTileHeursitic)-->");
    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());
View Full Code Here

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

        .println("\nEightPuzzleDemo Greedy Best First Search (ManhattanHeursitic)-->");
    try {
      Problem problem = new Problem(boardWithThreeMoveSolution,
          EightPuzzleFunctionFactory.getActionsFunction(),
          EightPuzzleFunctionFactory.getResultFunction(),
          new EightPuzzleGoalTest());
      Search search = new GreedyBestFirstSearch(new GraphSearch(),
          new ManhattanHeuristicFunction());
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
View Full Code Here

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

    System.out
        .println("\nEightPuzzleDemo AStar Search (MisplacedTileHeursitic)-->");
    try {
      Problem problem = new Problem(random1, EightPuzzleFunctionFactory
          .getActionsFunction(), EightPuzzleFunctionFactory
          .getResultFunction(), new EightPuzzleGoalTest());
      Search search = new AStarSearch(new GraphSearch(),
          new MisplacedTilleHeuristicFunction());
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
View Full Code Here

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

  private static void eightPuzzleSimulatedAnnealingDemo() {
    System.out.println("\nEightPuzzleDemo Simulated Annealing  Search -->");
    try {
      Problem problem = new Problem(random1, EightPuzzleFunctionFactory
          .getActionsFunction(), EightPuzzleFunctionFactory
          .getResultFunction(), new EightPuzzleGoalTest());
      SimulatedAnnealingSearch search = new SimulatedAnnealingSearch(
          new ManhattanHeuristicFunction());
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      System.out.println("Search Outcome=" + search.getOutcome());
View Full Code Here

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

    System.out
        .println("\nEightPuzzleDemo AStar Search (ManhattanHeursitic)-->");
    try {
      Problem problem = new Problem(random1, EightPuzzleFunctionFactory
          .getActionsFunction(), EightPuzzleFunctionFactory
          .getResultFunction(), new EightPuzzleGoalTest());
      Search search = new AStarSearch(new GraphSearch(),
          new ManhattanHeuristicFunction());
      SearchAgent agent = new SearchAgent(problem, search);
      printActions(agent.getActions());
      printInstrumentation(agent.getInstrumentation());
View Full Code Here

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

          0, 4, 6, 2, 3, 5 });

      Problem problem = new Problem(board,
          EightPuzzleFunctionFactory.getActionsFunction(),
          EightPuzzleFunctionFactory.getResultFunction(),
          new EightPuzzleGoalTest());
      Search search = new AStarSearch(new GraphSearch(),
          new ManhattanHeuristicFunction());
      SearchAgent agent = new SearchAgent(problem, search);
      Assert.assertEquals(23, agent.getActions().size());
      Assert.assertEquals("926",
View Full Code Here

Examples of aima.core.environment.eightpuzzle.EightPuzzleGoalTest

          0, 4, 6, 2, 3, 5 });

      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",
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.