Skip to content

mariuaas/n_queen_problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

UiO Logo

The N-Queens Puzzle

by Marius Aasan - IN3050/4050 Group 3 - 08.02.2021 1015-1200

The 8-queens puzzle is a combinatorial optimization problem where one tries to place 8 queens on a chessboard without any of the queens being in a position to capture one another. In principle, a candidate solution can be obtained by placing the queens randomly over the board. However, this would create a very large solution space. Instead, we represent the genotypes as permutations, such that each queen can occupy a single rank and file. This leaves only the diagonals to be checked. Let us solve this problem with a genetic algorithm and generalize to an N x N grid.

Note:

Some of the code in this notebook is omitted as to not crash with the mandatory assignment, but can be filled out as an exercise.

About

Example of the N-Queen Puzzle with Genetic Algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published