https://github.com/stefanhuber/n-queens-problem
Demonstrate different local search algorithms applied to the 8-queens problem.
https://github.com/stefanhuber/n-queens-problem
8-queens 8-queens-problem beam-search hill-climbing local-search n-queens n-queens-problem simulated-annealing
Last synced: about 2 months ago
JSON representation
Demonstrate different local search algorithms applied to the 8-queens problem.
- Host: GitHub
- URL: https://github.com/stefanhuber/n-queens-problem
- Owner: stefanhuber
- Created: 2020-01-17T14:57:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-02T18:46:30.000Z (over 3 years ago)
- Last Synced: 2025-01-15T16:53:42.482Z (3 months ago)
- Topics: 8-queens, 8-queens-problem, beam-search, hill-climbing, local-search, n-queens, n-queens-problem, simulated-annealing
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 8-queens < > local search
> Demonstrate different local search algorithms applied to the 8-queens problem.

## Problem description
The goal of the 8-queens problem is to place 8 queens on a chessboard such that no queen attacks any other queen. A queen can attack any piece in the same row, same column or same diagonal.
Local search algorithms explore the state space with various techniques to find a goal state. In contrast to path-based search algorithms (such as breadth-first search or depth-first search) the path to the goal doesn't matter for local search algorithms.
## Implemented algorithms
- [x] Basic Hill-Climbing
- [x] Steepest Ascent Hill-Climbing
- [x] Stochastic Hill-Climbing
- [x] First-Choice (Stochastic) Hill-Climbing
- [x] Simulated Annealing
- [x] Local Beam Search
- [ ] Stochastic Local Beam Search
- [ ] Genetic Algorithm## Usage
### Clone git repo
```bash
git clone https://github.com/stefanhuber/n-queens-problem.git
```### Start main.py
Start the python program via command line from the project folder
```bash
python main.py
```