Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello everybody out there. I'm trying to write the code for 8 queen problem using hill climbing. I would like someone to help me understand how the game is play. Should I start with all 8 queens in the board, or should I add one by one into the board. In this case, the first one would be randomly, and after that my algorithm will take care of the rest.
Posted

1 solution

The whole point is you place the queens 1 by 1 onto an empty board at startup

When you place the 1st queen, that 'adds constraints', to the number of available positions you can place queen 2, ditto and so forth for queens 3..8

There'e plenty of info out there on the net for this problem
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900