Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dev-michael-schmidt/n-queens
Solve the classic N-Queens problem using a variety of techniques including Greedy Local Search, genetic algorithm, and DFS/Backtracking
https://github.com/dev-michael-schmidt/n-queens
Last synced: 1 day ago
JSON representation
Solve the classic N-Queens problem using a variety of techniques including Greedy Local Search, genetic algorithm, and DFS/Backtracking
- Host: GitHub
- URL: https://github.com/dev-michael-schmidt/n-queens
- Owner: dev-michael-schmidt
- Created: 2018-09-09T00:59:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T14:43:56.000Z (almost 6 years ago)
- Last Synced: 2024-03-20T04:44:59.829Z (8 months ago)
- Language: C++
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# n-queens
The classic problem of placing "queen" chess pieces on an N×N board such that no queen attacks any other queen. Queen pieces move vertically, horizontally, and both diagonals. This repo implements search algorithms to solve this problem in both C++ and Python programming languages.- C++
- Depth First Search
- Greedy Local Search
- Genetic Search
- Simulated Annealing (under RESEARCH)- Python
- Depth First Search
- Greedy Local Search
- Genetic Search (under development)## C++
Currently, genetic search performs slower than both depth first and greedy local search algorithms.#### Building:
the usual: `make`#### Usage:
`./n-queens `, where seed is used to seed the random generator, and N is used to specify the board size.## Python:
Currently, no main driver exists for Python classes. A module will be created in the future with a driver script.#### Usage:
`python3 depth_first.py`
`python3 greedy_local.py`