Package aima.core.search.framework

Examples of aima.core.search.framework.Problem


  }

  private static void nQueensHillClimbingSearch() {
    System.out.println("\nNQueensDemo HillClimbing  -->");
    try {
      Problem problem = new Problem(new NQueensBoard(8),
          NQueensFunctionFactory.getIActionsFunction(),
          NQueensFunctionFactory.getResultFunction(),
          new NQueensGoalTest());
      HillClimbingSearch search = new HillClimbingSearch(
          new AttackingPairsHeuristic());
View Full Code Here


  }

  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());
View Full Code Here

  }

  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());
View Full Code Here

  private static void eightPuzzleGreedyBestFirstDemo() {
    System.out
        .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());
View Full Code Here

  private static void eightPuzzleGreedyBestFirstManhattanDemo() {
    System.out
        .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());
View Full Code Here

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

  }

  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);
View Full Code Here

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

        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            goalState), new MapStepCostFunction(aMap));

    map = aMap;

    reverseProblem = new Problem(goalState,
        MapFunctionFactory.getActionsFunction(aMap),
        MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
            initialState), new MapStepCostFunction(aMap));
  }
View Full Code Here

*/
public class UniformCostSearchTest {

  @Test
  public void testUniformCostSuccesfulSearch() throws Exception {
    Problem problem = new Problem(new NQueensBoard(8),
        NQueensFunctionFactory.getIActionsFunction(),
        NQueensFunctionFactory.getResultFunction(),
        new NQueensGoalTest());
    Search search = new UniformCostSearch();
    SearchAgent agent = new SearchAgent(problem, search);
View Full Code Here

TOP

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

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.