Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Write .contains as an original method in Javascript.

Answered: 1 week ago

Question

6. How do histories influence the process of identity formation?

Answered: 1 week ago