21.07.2013 Views

Eight Queens with Evolutionary Computing

Eight Queens with Evolutionary Computing

Eight Queens with Evolutionary Computing

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example: Some valid solutions are given as follows:<br />

V = 〈8, 3, 1, 6, 2, 5, 7, 4〉<br />

V = 〈4, 2, 5, 8, 6, 1, 3, 7〉<br />

It should also be noted that in this scheme number of solution candidates is<br />

reduced to permutations P of 8:<br />

where<br />

and<br />

4.2 Fitness function<br />

#{P} = 8! = 40320<br />

S ⊂ P ⊂ C<br />

#{S} = 92<br />

In Section 4.1 we deduced a formula to represent each distinct solution as a<br />

vector:<br />

V = 〈c1, c2, . . . , c8〉<br />

Each vector can be thought of a complete genotype (genome) to solve the<br />

<strong>Eight</strong> <strong>Queens</strong> Problem. Hence a genome in this sense is equivalent to a solution.<br />

Each element of the vector can be thought as a gene expressing a queen being<br />

present at a given square. The overall genetic combination shall determine the<br />

final fitness score such that no two queens can check each other.<br />

Let number of checks in a given vector be:<br />

0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!