Skip to content

alirezaeftekhari/8-queens-genetic-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

8-queens-genetic-algorithm

Very fast problem solving of 8 queens with genetic algorithm.

How to try?

  1. Clone this repository: 8-queens-genetic-algorithm
  2. Run main.py: python3 main.py
  3. Enter the number of solutions you want

After these steps, your output should look like the following: output image in console

Why does this algorithm work faster than other algorithms?

The main difference between this algorithm and other algorithms is that before the children are produced by the parents, first the parents' heuristic is calculated based on the position of the queen and then, As much as possible, the queen's position on the chessboard changes to reach a fitness level of 28, otherwise the parents will have children.

Releases

No releases published

Packages

No packages published

Languages