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