The actual algorithm, after 15 iterations, shows that the values that I've wrote are almost the best but of 3. The interesting part is that those 3 parameters are all related to rook (in 7th rank, on open column and so on) and this could means that the algorithm has found that rook positioning was the wrong part of my evaluation.

The actual code for the genetic algorithm does this:

Code: Select all

```
* at start
- creates N players
- assigns standard value to N/2 players, random values to the other
* play a match between any couple of players
- add 1 to the score of the winning player
- add -1 to loser
- 0 if draw
* at the end of any match:
- genetically cross N/4 players with another random player, but the last one
- set random values to the last player
- cross the last player with the first one
- cross the last player with another random one
(cross means assigning first (or last) random parameters of player b to player a)
```