Question: Solve the N-queen problem for increasing N (10,50,100) using 1) hill climbing; 2) first- choice hill climbing; and 3) simulated annealing. Start from 100 different

Solve the N-queen problem for increasing N (10,50,100) using 1) hill climbing; 2) first- choice hill climbing; and 3) simulated annealing. Start from 100 different initial states and record the solution cost (duration since memory is not much of an issue) and success percentage (in how many of the 100, have you found the solution). Use the one queen per column formulation for starting states and also while finding the neighbors. As heuristic, use the attacking pair counts. There is no correct/dictated settings for temperature parameters in simulated annealing; but you can drop the temperature in 10,000 steps and you can decide what should be the starting temperature, which depends on your delta energy. For N-10 and for the largest N you achieved success in at least one of the approaches, report your results in a table (method, cost, percent success) and add a 3-line discussion about the strengths and weaknesses of each of the 3 algorithms. If say Hill Climbing does not work well for N-100, you can put a dash -) indicating that that algorithm is not applicable, or does not end in that case. Also give your source code. (Python, C++, C# or Java) N-10 e.g. N-100 Average Solution Percent Duration (secs) Average Solution Percent Method success (96) | Duration (secs) | Success (96) Hill Climbing First Choice Hill- Climbing Simulated Annealing Solve the N-queen problem for increasing N (10,50,100) using 1) hill climbing; 2) first- choice hill climbing; and 3) simulated annealing. Start from 100 different initial states and record the solution cost (duration since memory is not much of an issue) and success percentage (in how many of the 100, have you found the solution). Use the one queen per column formulation for starting states and also while finding the neighbors. As heuristic, use the attacking pair counts. There is no correct/dictated settings for temperature parameters in simulated annealing; but you can drop the temperature in 10,000 steps and you can decide what should be the starting temperature, which depends on your delta energy. For N-10 and for the largest N you achieved success in at least one of the approaches, report your results in a table (method, cost, percent success) and add a 3-line discussion about the strengths and weaknesses of each of the 3 algorithms. If say Hill Climbing does not work well for N-100, you can put a dash -) indicating that that algorithm is not applicable, or does not end in that case. Also give your source code. (Python, C++, C# or Java) N-10 e.g. N-100 Average Solution Percent Duration (secs) Average Solution Percent Method success (96) | Duration (secs) | Success (96) Hill Climbing First Choice Hill- Climbing Simulated Annealing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
