2023-09-14 14:23:01 -05:00
|
|
|
# n-queens
|
|
|
|
|
2023-09-24 23:39:10 -05:00
|
|
|
## Response
|
|
|
|
The N-Queens program typically took over 10000 iterations for 8 queens.
|
|
|
|
|
|
|
|
This was the case until I switched it to 5 queens, in which the average was 7000
|
|
|
|
|
2023-09-24 23:22:43 -05:00
|
|
|
## Compiling the project
|
|
|
|
|
|
|
|
Prerequisites
|
|
|
|
- C++11
|
|
|
|
|
|
|
|
In order to compile the project, simply run these two commands:
|
|
|
|
|
|
|
|
cmake -B build -S .
|
|
|
|
cmake --build build
|
|
|
|
|
|
|
|
## Running the Project
|
|
|
|
The program should now be compiled at ./build/bin/n_queens
|
|
|
|
|
|
|
|
Simply run the program using:
|
|
|
|
|
|
|
|
build/bin/n_queens
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
The program's default board size is 4
|
|
|
|
|
|
|
|
To change the board size use:
|
|
|
|
|
|
|
|
build/bin/n_queens NUMBER_OF_QUEENS
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
build/bin/n_queens 8
|
|
|
|
|