Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment is about writing and testing a computer program that implements hill-climbing algorithm for the following problem situation. - Assume that you have an

image text in transcribed
This assignment is about writing and testing a computer program that implements hill-climbing algorithm for the following problem situation. - Assume that you have an 88 chess board and you have a number of Queen pieces to be placed on this board. - You will be provided three input parameters: M: the number of queen pieces to be placed conflict-free on this chess board R : Each queen piece has a reach of only R number of cells beyond its current position. That is, its influence extends only up to R number of cells on each side. For example, when R is 3 , then a queen piece can conflict with another queen piece only if that piece is within 3 cells on its left, on its, right, on its top, on its bottom, or in any direction along the two diagonals. There is no conflict with a Queen piece that is more than 3 squares away in any direction - A starting state giving locations of queen pieces on the board. For example, the (row, column) locations of nine queens on the board will be specified as: (1,7), (2,4),(3,8),(4,1),(4,6),(5,5),(6,2),(7,2),(8,3) - Your output for each input set should contain the following: - The starting state and the next four subsequent states of the board, selected by your hill climbing search, along with the number of conflicts in each state. - The solution state, if one could be found. - Total number of state-transitions (neighbor selections) between the starting state and the final solution state. - Total number of neighboring states examined, accumulated over all the state transitions, before the final solution state is arrived at. If a solution state is not found, then show the state at which you gave up the search. The reason for giving up the search could be one of the following and must be stated in your output: - A local minimum is reached, all neighboring states are worse than the current state, and the current state is not the solution state. - A maximum-limit number of state transitions has been executed and the solution state is not found. Let this maximum-limit number of transitions for this homework be set to 60 . - You are required to implement in your program the hill-climbing strategy, wherein, from each non-solution state you generate all neighboring states, determine the merit of each neighboring state, and select the most promising neighbor as the next state. Any ties for the most promising state can be broken by arbitrarily choosing any one of the best states

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

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions