• Non ci sono risultati.

An example: 8 Queens

N/A
N/A
Protected

Academic year: 2021

Condividi "An example: 8 Queens"

Copied!
4
0
0

Testo completo

(1)

EvoNet Flying Circus

An example: 8 Queens

Problem: Place 8 queens on a 8x8 chessboard in

such a way that the queens cannot check each other.

(2)

EvoNet Flying Circus

8 Queens - Representation

1 3 5 2 6 4 7 8

Phenotype: a configuration Genotype: a permutation

of the numbers 1 through 8

(3)

EvoNet Flying Circus

8 Queens - Operators

1 3 5 2 6 4 7 8

Mutation: exchanging two numbers

1 3 7 2 6 4 5 8

Crossover: combining two parents 1 3 5 2 6 4 7 8

3

5 4 2 1

6 7 8

1 3 5 4 2 8 7 6 6

7

8 2 4 1 3 5

(4)

EvoNet Flying Circus

8 Queens -

Fitness & Selection

Fitness: penalty of one queen is equal to the number of queens she can check.

The fitness of the configuration is equals the sum of the penalties of all queens.

Selection: using a roulette wheel fitness(C1) = 1

fitness(C2) = 2 fitness(C3) = 3

C1 C2

C3

1/6 = 17 %

3/6 = 50 %

2/6 = 33 %

Riferimenti

Documenti correlati

Mark one on the answer sheet. The ratio was derived from the measurement of speed of sound v s by using the following equation, where f and λ are the frequency and wavelength

It was found that the saturated alcohol(s) obtained from C has no stereogenic carbons, but the one(s) from D has stereogenic carbon(s). a) Among all the isomeric organic compounds

It is activated in response to pawn tries and captures: in the former case, all the possible target cases are highlighted; in the latter, a fully opaque token is put on the case

[r]

For each positive integer n, determine the least integer m such that

[r]

[r]

The elements of these two sequences generate, by (??), infinite Pythagorean triples (a, b, c) which verify (??) and therefore solve