To avoid too random games, I use a 300ms per move time and I filter starting positions, accepting only those with no more than one pawn difference (from a large set of real games). The new GA follows this rules:
1) at start (generation 0), one half of the individual gets original parameters and one half random ones
2) the ORIGINAL engine always appears (one individual) in the population and its parameters are constant
3) any individual plays a game starting from a random position, with white and then with black, against any other engine that follows in the actual ranking; the starting position changes at any individual couple
4) after all games in a generation, sort individuals by score
5) the GA start "crossing" individuals, with this actions:
a) it chooses two random individuals (for 1/8 of the times); lets' say PlayerA and PlayerB
b) re-order the two individuals so that only the weakest would be changed
c) merge values from PlayerB to PlayerA (the weakest) with: random mutations (2%), average (6%), copy (60%), no changes (30%)
Code: Select all
for (int i = 0; i<ARRAY_COUNT(iiValues); i++)
{
int k = objRandom.Rand(100);
if(k < 2) // mutazione
{
iiValues[i] = objRandom.Rand(0, valPawn);
}else if(k<10) // media dei valori
{
iiValues[i] = (iiValues[i] + pEngine->iiValues[i]) / 2;
}else if(k<70) // copia
{
iiValues[i] = pEngine->iiValues[i];
} // else: invariato
}
7) next generation
This way, the best engine wouldn't be changed by GA, until it rest the best one. The good genes "migrates" from top to bottom. The original parameters always occurs in the population, so that I can know that individuals are not competing around a local maximum worst that actual engine 8they could do it but I'll notice immediately, because ORIGINAL becomes the first).
Do to "long" time control, it requires more time to complete but still I can get some interesting result, because one individual seems to becomes stronger at any generation. As said in our G6 group, maybe it is only lucky... and in effect it is called "Lucky Man" (name choosen at random, not by me!).
Here's actual results:
Code: Select all
0 1 The Three Fates' 16 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 2 Battlefield' 14 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 3 Jeremy Bender' 13 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 4 Take a Pebble' 12 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 5 Tank' 12 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 6 Lucky Man' 12 1 27 90 66 27 7 19 38 35 75 42 27 66 87 87 2 9 57 47 3 3
0 7 Mass' 11 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 8 Stones of Years' 10 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 9 Lachesis' 8 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 10 ORIGINAL' 6 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 11 Tarkus' 4 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
0 12 Iconoclast' -2 61 17 92 103 33 13 26 59 40 95 69 101 98 34 32 19 16 82 18 49 73
0 13 Bitches Crystal' -5 60 34 26 1 97 84 12 53 88 49 26 32 58 38 103 1 38 84 71 21 2
0 14 The Barbarian' -10 58 5 63 62 71 55 78 94 103 22 33 51 72 61 20 53 49 34 53 37 56
0 15 Aquatarkus' -13 21 50 103 21 78 73 93 79 104 35 65 65 47 66 92 65 15 93 39 88 92
0 16 Eruption' -13 90 87 5 17 43 87 81 34 90 44 54 10 56 35 27 62 10 8 23 22 28
0 17 Clotho' -16 20 0 7 13 8 50 35 75 4 21 36 13 82 19 65 7 67 98 20 70 89
0 18 Manticore' -18 90 12 73 90 16 100 26 3 5 97 44 69 63 59 0 92 51 9 29 47 35
0 19 Knife Edge' -20 54 99 55 16 90 33 65 3 98 34 10 87 5 81 64 9 94 15 37 13 104
0 20 Atropos' -21 21 76 67 31 1 24 63 94 37 18 67 45 69 10 12 100 37 88 70 70 40
1 1 Stones of Years' 20 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
1 2 The Three Fates' 17 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
1 3 Take a Pebble' 14 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
1 4 Jeremy Bender' 13 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
1 5 Battlefield' 11 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
1 6 Mass' 9 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
1 7 Lucky Man' 9 1 27 90 66 27 7 19 38 35 75 42 27 66 87 87 2 9 57 47 3 3
1 8 Lachesis' 8 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
1 9 Tank' 5 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
1 10 Bitches Crystal' 1 60 34 26 1 97 84 12 53 88 49 26 32 58 38 103 1 38 84 71 21 2
1 11 ORIGINAL' 0 7 88 2 66 27 26 19 38 35 75 42 8 66 10 87 2 1 57 10 3 10
1 12 Iconoclast' -3 61 17 92 103 33 13 26 59 40 95 69 101 98 34 32 19 16 82 18 49 73
1 13 The Barbarian' -7 58 5 63 62 71 55 78 94 103 22 33 51 72 61 20 53 49 34 53 37 56
1 14 Aquatarkus' -7 21 50 103 21 78 73 93 79 104 35 65 65 47 66 92 65 15 93 39 88 92
1 15 Tarkus' -9 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 91 1 5 10 5 10
1 16 Eruption' -11 90 87 5 17 43 87 81 34 90 44 54 10 56 35 27 62 10 8 23 22 28
1 17 Knife Edge' -16 54 99 55 16 90 33 65 3 98 34 10 87 5 81 64 9 94 15 37 13 104
1 18 Clotho' -16 20 0 7 13 8 50 35 75 4 21 36 13 82 19 65 7 67 98 20 70 89
1 19 Manticore' -18 90 12 73 90 16 100 26 3 5 97 44 69 63 59 0 92 51 9 29 47 35
1 20 Atropos' -20 21 76 67 31 1 24 63 94 37 18 67 45 69 10 12 100 37 88 70 70 40
2 1 Jeremy Bender' 16 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
2 2 The Three Fates' 15 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
2 3 Stones of Years' 14 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
2 4 Take a Pebble' 13 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
2 5 Mass' 11 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
2 6 Lucky Man' 11 7 70 90 20 27 7 5 2 35 8 42 8 10 87 53 5 1 5 47 4 10
2 7 Battlefield' 10 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
2 8 Tank' 9 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
2 9 Lachesis' 8 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
2 10 Iconoclast' 7 61 70 92 20 4 26 5 2 5 8 1 29 10 22 20 12 16 5 10 5 10
2 11 ORIGINAL' 7 7 88 2 66 27 26 19 38 35 75 42 8 66 10 87 2 1 57 10 3 10
2 12 Bitches Crystal' -2 60 34 26 1 97 84 12 53 88 49 26 32 58 38 103 1 38 84 71 21 2
2 13 The Barbarian' -6 58 5 63 20 4 26 5 2 5 15 1 8 72 10 20 5 1 34 10 37 56
2 14 Eruption' -10 90 87 5 17 43 87 81 34 90 44 54 10 56 35 27 62 10 8 23 22 28
2 15 Aquatarkus' -14 21 50 103 21 78 73 93 79 104 35 65 65 47 66 92 65 15 93 39 88 92
2 16 Atropos' -15 21 76 67 31 1 24 63 94 37 18 67 45 69 10 12 100 37 88 70 70 40
2 17 Clotho' -15 20 0 7 13 8 50 35 75 4 21 36 13 82 19 65 7 67 98 20 70 89
2 18 Manticore' -17 90 12 73 90 16 100 26 3 5 97 44 69 63 59 0 92 51 9 29 47 35
2 19 Tarkus' -20 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 91 1 5 10 5 10
2 20 Knife Edge' -22 54 99 55 16 90 33 65 3 98 34 10 87 5 81 64 9 94 15 37 13 104
3 1 Take a Pebble' 13 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
3 2 Stones of Years' 13 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
3 3 Lucky Man' 13 7 70 90 20 27 7 5 2 35 8 42 8 10 87 53 5 1 5 47 4 10
3 4 The Three Fates' 12 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
3 5 Battlefield' 10 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
3 6 Jeremy Bender' 10 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
3 7 Mass' 9 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
3 8 ORIGINAL' 9 7 88 2 66 27 26 19 38 35 75 42 8 66 10 87 2 1 57 10 3 10
3 9 Atropos' 8 7 70 2 20 4 25 63 94 37 18 1 45 10 10 12 5 37 5 40 5 52
3 10 Iconoclast' 3 7 70 92 20 27 7 5 2 35 8 1 8 10 87 53 5 1 5 47 5 10
3 11 Bitches Crystal' 0 60 34 26 1 97 84 12 53 88 49 26 32 58 38 103 1 38 84 71 21 2
3 12 The Barbarian' 0 60 34 26 1 4 84 8 53 88 15 1 8 58 38 103 5 38 84 10 37 37
3 13 Tank' 0 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
3 14 Lachesis' 0 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
3 15 Eruption' -4 90 87 5 17 43 87 81 34 90 44 54 10 56 35 27 62 10 8 23 22 28
3 16 Aquatarkus' -14 21 50 103 21 78 73 93 79 104 35 65 65 47 66 92 65 15 93 39 88 92
3 17 Tarkus' -17 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 91 1 5 10 5 10
3 18 Clotho' -17 20 0 7 13 8 50 35 75 4 21 36 13 82 19 65 7 67 98 20 70 89
3 19 Manticore' -19 90 12 73 90 16 100 26 3 5 97 44 69 63 59 0 92 51 9 29 47 35
3 20 Knife Edge' -29 54 99 55 16 90 33 65 3 98 34 10 87 5 81 64 9 94 15 37 13 104
4 1 Lucky Man' 15 7 70 90 20 27 7 5 2 35 8 42 8 10 87 53 5 1 5 47 4 10
4 2 Jeremy Bender' 10 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
4 3 Stones of Years' 9 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
4 4 Bitches Crystal' 9 33 80 2 20 4 26 5 2 88 8 1 32 10 10 20 5 1 5 10 5 10
4 5 Iconoclast' 8 7 70 92 20 27 7 5 2 35 8 1 8 10 87 53 5 1 5 47 5 10
4 6 Battlefield' 8 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
4 7 ORIGINAL' 6 7 88 2 66 27 26 19 38 35 75 42 8 66 10 87 2 1 57 10 3 10
4 8 The Three Fates' 6 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
4 9 Take a Pebble' 5 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
4 10 Mass' 5 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
4 11 Tank' 3 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
4 12 Lachesis' 2 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
4 13 Manticore' 1 90 12 90 90 16 7 26 3 20 97 42 8 63 87 53 5 1 9 47 47 10
4 14 Atropos' -2 7 70 2 20 4 25 63 94 37 18 1 45 10 10 12 5 37 5 40 5 52
4 15 Aquatarkus' -5 21 50 103 21 78 73 93 79 104 35 65 65 47 66 92 65 15 93 39 88 92
4 16 The Barbarian' -7 60 34 26 1 4 84 8 53 88 15 1 8 58 38 103 5 38 84 10 37 37
4 17 Eruption' -13 90 87 5 17 43 87 81 34 90 44 54 10 56 35 27 62 10 8 23 22 28
4 18 Tarkus' -17 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 91 1 5 10 5 10
4 19 Clotho' -20 20 0 7 13 8 50 35 75 4 21 36 13 82 19 65 7 67 98 20 70 89
4 20 Knife Edge' -23 54 99 55 16 90 33 65 3 98 34 10 87 5 81 64 9 94 15 37 13 104
5 1 Lucky Man' 22 7 70 90 20 27 7 5 2 35 8 42 8 10 87 53 5 1 5 47 4 10
5 2 Mass' 19 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 3 Battlefield' 19 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 4 Take a Pebble' 18 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 5 Iconoclast' 18 7 70 92 20 27 7 5 2 35 8 1 8 10 87 53 5 1 5 47 5 10
5 6 Jeremy Bender' 18 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 7 ORIGINAL' 16 7 20 2 20 4 1 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 8 Bitches Crystal' 15 33 80 2 20 4 26 5 2 88 8 1 32 10 10 20 5 1 5 10 5 10
5 9 Stones of Years' 14 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 10 Lachesis' 14 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 11 The Three Fates' 12 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 12 Tank' 10 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 5 1 5 10 5 10
5 13 Manticore' 3 90 12 90 90 16 7 26 3 20 97 42 8 63 87 53 5 1 9 47 47 10
5 14 Atropos' -5 7 70 2 20 4 25 63 94 37 18 1 45 10 10 12 5 37 5 40 5 52
5 15 The Barbarian' -10 60 34 26 1 4 84 8 53 88 15 1 8 58 38 103 5 38 84 10 37 37
5 16 Eruption' -27 90 87 5 17 43 87 81 34 90 44 54 10 56 35 27 62 10 8 23 22 28
5 17 Aquatarkus' -27 21 50 103 21 78 73 93 79 104 35 65 65 47 66 92 65 15 93 39 88 92
5 18 Clotho' -39 20 0 7 13 8 50 35 75 4 21 36 13 82 19 65 7 67 98 20 70 89
5 19 Tarkus' -41 7 70 2 20 4 26 5 2 5 8 1 8 10 10 20 91 1 5 10 5 10
5 20 Knife Edge' -49 54 99 55 16 90 33 65 3 98 34 10 87 5 81 64 9 94 15 37 13 104
Notice that many individuals still have original parameters (so ORIGINAL has other clones still alive) but "Lucky Man" looks to be stronger.
Of course, a tournament of "Lucky Man" with real engines could negate this partial result but I'll do it when more generations has been completed.
PS: in the first generations, there were a bug and ORIGINAL gets changed; this bug has been corrected and the session has been re-started with its original values