Eight Queens Problem
Posted: 16 Dec 2007 7:22
Hi,
This code is a solution to eight queens problem.There are 92 solutions to this problem in the 8x8 board.
The general problem is a nxn board that can have n queens on it , that none of them attacks others.
For more info search the web here is an address to problem and some solutions:
http://en.wikipedia.org/wiki/Eight_queens_puzzle for definition.
http://en.wikipedia.org/wiki/Eight_quee ... _solutions some solutions in various PLs.
The project is coded in VP 7.1, and is a console project.You can improve the code in various aspects. For example creating a GUI project that displays solving process or by improving its solving method to find all solutions in less time and with less positions searched.Also you can generalize it to solve nxn problems either for finding all solutions or to find only one solution.If you did so,please post your code for every one here,Thanks !
This code is a solution to eight queens problem.There are 92 solutions to this problem in the 8x8 board.
The general problem is a nxn board that can have n queens on it , that none of them attacks others.
For more info search the web here is an address to problem and some solutions:
http://en.wikipedia.org/wiki/Eight_queens_puzzle for definition.
http://en.wikipedia.org/wiki/Eight_quee ... _solutions some solutions in various PLs.
The project is coded in VP 7.1, and is a console project.You can improve the code in various aspects. For example creating a GUI project that displays solving process or by improving its solving method to find all solutions in less time and with less positions searched.Also you can generalize it to solve nxn problems either for finding all solutions or to find only one solution.If you did so,please post your code for every one here,Thanks !