The goal of the

**N Queens**problem is to place N queens in an N x N chessboard such that no queen attacks any other. A queen attacks another queen if the two are in the same row, column or diagonal.**GENETIC ALGORITHMS**

**Representation**: Each gene corresponds to a column on the chessboard, and each allele corresponds to the row that the queen occupies in that column.

**Fitness function**: Defined as the number of nonattacking pairs of queens multiplied by -1. A solution to the problem must have a fitness value of 0.

APPLICATIONS: desktopGA