private void btnHillClimbing_Click(object sender, System.EventArgs e) { this.textBox1.Text = "NQueensDemo HillClimbing -->" + System.Environment.NewLine; Problem problem = new Problem(new NQueensBoard(8),new NQueensSuccessorFunction(), new NQueensGoalTest(),new QueensToBePlacedHeuristic()); Search search = new HillClimbingSearch(); SearchAgent agent = new SearchAgent(problem,search); printActions(agent.getActions()); printInstrumentation(agent.getInstrumentation()); }
private void btnRecursiveDLS_Click(object sender, System.EventArgs e) { this.textBox1.Text = "NQueensDemo recursive DLS -->" + System.Environment.NewLine; Problem problem = new Problem(new NQueensBoard(8),new NQueensSuccessorFunction(), new NQueensGoalTest()); Search search = new DepthLimitedSearch(8); SearchAgent agent = new SearchAgent(problem, search); printActions(agent.getActions()); printInstrumentation(agent.getInstrumentation()); }
private void btnIterativeDeeping_Click(object sender, System.EventArgs e) { this.textBox1.Text = "NQueensDemo Iterative DS -->" + System.Environment.NewLine; Problem problem = new Problem(new NQueensBoard(8),new NQueensSuccessorFunction(), new NQueensGoalTest()); Search search = new IterativeDeepeningSearch(); SearchAgent agent = new SearchAgent(problem,search); printActions(agent.getActions()); printInstrumentation(agent.getInstrumentation()); }
private void btnBreadthFirst_Click(object sender, System.EventArgs e) { this.textBox1.Text = "NQueensDemo BFS -->" + System.Environment.NewLine; Problem problem = new Problem(new NQueensBoard(8),new NQueensSuccessorFunction(), new NQueensGoalTest()); Search search = new BreadthFirstSearch(new TreeSearch()); SearchAgent agent2 = new SearchAgent(problem, search); printActions(agent2.getActions()); printInstrumentation(agent2.getInstrumentation()); }
private void btnSimulatedAnnealing_Click(object sender, System.EventArgs e) { this.textBox1.Text = "EightPuzzleDemo Simulated Annealing Search -->" + System.Environment.NewLine; Problem problem = new Problem(random1, new EightPuzzleSuccessorFunction(), new EightPuzzleGoalTest(), new ManhattanHeuristicFunction()); Search search = new SimulatedAnnealingSearch(); SearchAgent agent = new SearchAgent(problem, search); printActions(agent.getActions()); printInstrumentation(agent.getInstrumentation()); }
private void btnAStar_Click(object sender, System.EventArgs e) { this.textBox1.Text = "EightPuzzleDemo AStar Search (MisplacedTileHeursitic)-->" + System.Environment.NewLine; Problem problem = new Problem(random1, new EightPuzzleSuccessorFunction(), new EightPuzzleGoalTest(), new MisplacedTilleHeuristicFunction()); Search search = new AStarSearch(new GraphSearch()); SearchAgent agent = new SearchAgent(problem, search); printActions(agent.getActions()); printInstrumentation(agent.getInstrumentation()); }
private void btnGreedyBestFirstMan_Click(object sender, System.EventArgs e) { this.textBox1.Text = "EightPuzzleDemo Greedy Best First Search (ManhattanHeursitic)-->" + System.Environment.NewLine; Problem problem = new Problem(boardWithThreeMoveSolution, new EightPuzzleSuccessorFunction(), new EightPuzzleGoalTest(), new ManhattanHeuristicFunction()); Search search = new GreedyBestFirstSearch(new GraphSearch()); SearchAgent agent = new SearchAgent(problem, search); printActions(agent.getActions()); printInstrumentation(agent.getInstrumentation()); }
private void btnIDLS_Click(object sender, System.EventArgs e) { this.textBox1.Text = "EightPuzzleDemo Iterative DLS-->" + System.Environment.NewLine; Problem problem = new Problem(random1, new EightPuzzleSuccessorFunction(), new EightPuzzleGoalTest()); Search search = new IterativeDeepeningSearch(); SearchAgent agent = new SearchAgent(problem, search); printActions(agent.getActions()); printInstrumentation(agent.getInstrumentation()); }