Quantcast
Channel: Genetic Algorithms – technical-recipes.com
Viewing all articles
Browse latest Browse all 8

Using a genetic algorithm to solve the n-Queens problem in C++

$
0
0
A post showing how a genetic algorithm when used appropriately can be used as a powerful means to solve the n-Queens problem of increasing sizes. A downloadable Visual Studio 2010 C++ project implementing the genetic algorithm is available. Problem Description The N-Queens problem is the placement of queens on a chess board so that none are threatened – no single queen share a common row, column, or diagonal. The difficulty of the problem explodes with the number of queens involved and is known to be computation expensive. For example, there are 4,426,165,368 possible arrangements of eight queens on an 8×8 more »

Viewing all articles
Browse latest Browse all 8

Trending Articles