Idea #13 [experiment]

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Idea #13 [experiment]

Post by Rebel »

Creating meaningful PST's from PGN

A new tool is available that creates the 12 Piece Square Tables (PST) for the MiddleGame from a PGN database. The tables can be used for 1) move ordering, 2) pruning decisions, 3) reduction decisions.

Example-1 : PST made from a 82.000 human game collection between players with a minimum elo rating of 2600.

Example-2 : PST made from a 66.000 comp-comp PGN between engines with a minimum elo rating of 3300.

http://rebel13.nl/rebel13/ideas.html#13
90% of coding is debugging, the other 10% is writing bugs.
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Idea #13 [experiment]

Post by Joost Buijs »

How does this work?

The PST's in your examples look totally different than the results that I get when I tune the PST's with logistic regression.
I don't use games from CCRL, this could be an explanation, and I tune a lot of other parameters with respect to pieces too, but I would expect the trend to be comparable.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Idea #13 [experiment]

Post by Rebel »

There is no tuning, just a raw statistic from a large quality PGN, not suited for evaluation.

Code: for each move : pst[piece_type][square_from]--; pst[piece_type][square_to]++;

That's basically all there is except handling a few side effects.
90% of coding is debugging, the other 10% is writing bugs.
Karlo Bala
Posts: 373
Joined: Wed Mar 22, 2006 10:17 am
Location: Novi Sad, Serbia
Full name: Karlo Balla

Re: Idea #13 [experiment]

Post by Karlo Bala »

Rebel wrote: Fri Aug 07, 2020 4:07 pm There is no tuning, just a raw statistic from a large quality PGN, not suited for evaluation.

Code: for each move : pst[piece_type][square_from]--; pst[piece_type][square_to]++;

That's basically all there is except handling a few side effects.
Thanks, It looks useful, especially for move ordering. I wouldn't however call them PST since it makes confusion. I would rather call them piece-square-difference (PSD) or something like that...
Best Regards,
Karlo Balla Jr.
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Idea #13 [experiment]

Post by Joerg Oster »

Rebel wrote: Fri Aug 07, 2020 4:07 pm There is no tuning, just a raw statistic from a large quality PGN, not suited for evaluation.

Code: for each move : pst[piece_type][square_from]--; pst[piece_type][square_to]++;

That's basically all there is except handling a few side effects.
How is this possible then?
A white pawn on d2, for example, can never get positive hits, no?
And afaik, a pawn can never go back ... :D

Code: Select all

PGN   : pgn\elo2600.pgn Games 82.208
Phase : Middle Game

White Pawn
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   7 |   6 |  12 |   8 |  10 |   7 |   3 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  14 |  22 |  32 |  41 |  44 |  49 |  33 |  15 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|  46 |  78 | 125 | 288 | 169 |  75 |  58 |  38 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
| 100 | 119 | 205 | 336 | 210 | 110 |  78 |  85 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
| 112 | 119 | 101 |  32 |  81 |  91 | 185 | 147 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|  55 |  69 |  93 | 141 | 102 |  67 |  72 |  57 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 
Jörg Oster
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Idea #13 [experiment]

Post by Rebel »

Joerg Oster wrote: Sat Aug 08, 2020 11:59 am
Rebel wrote: Fri Aug 07, 2020 4:07 pm There is no tuning, just a raw statistic from a large quality PGN, not suited for evaluation.

Code: for each move : pst[piece_type][square_from]--; pst[piece_type][square_to]++;

That's basically all there is except handling a few side effects.
How is this possible then?
A white pawn on d2, for example, can never get positive hits, no?
And afaik, a pawn can never go back ... :D

Code: Select all

PGN   : pgn\elo2600.pgn Games 82.208
Phase : Middle Game

White Pawn
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   7 |   6 |  12 |   8 |  10 |   7 |   3 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  14 |  22 |  32 |  41 |  44 |  49 |  33 |  15 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|  46 |  78 | 125 | 288 | 169 |  75 |  58 |  38 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
| 100 | 119 | 205 | 336 | 210 | 110 |  78 |  85 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
| 112 | 119 | 101 |  32 |  81 |  91 | 185 | 147 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|  55 |  69 |  93 | 141 | 102 |  67 |  72 |  57 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 
All pieces (not only pawns) on their original square from the start position end up in a large negative number and need correction.

That's why I spoke of "handling a few side effects" :wink:
90% of coding is debugging, the other 10% is writing bugs.
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Idea #13 [experiment]

Post by Joerg Oster »

Rebel wrote: Sat Aug 08, 2020 12:22 pm
Joerg Oster wrote: Sat Aug 08, 2020 11:59 am
Rebel wrote: Fri Aug 07, 2020 4:07 pm There is no tuning, just a raw statistic from a large quality PGN, not suited for evaluation.

Code: for each move : pst[piece_type][square_from]--; pst[piece_type][square_to]++;

That's basically all there is except handling a few side effects.
How is this possible then?
A white pawn on d2, for example, can never get positive hits, no?
And afaik, a pawn can never go back ... :D

Code: Select all

PGN   : pgn\elo2600.pgn Games 82.208
Phase : Middle Game

White Pawn
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   7 |   6 |  12 |   8 |  10 |   7 |   3 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  14 |  22 |  32 |  41 |  44 |  49 |  33 |  15 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|  46 |  78 | 125 | 288 | 169 |  75 |  58 |  38 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
| 100 | 119 | 205 | 336 | 210 | 110 |  78 |  85 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
| 112 | 119 | 101 |  32 |  81 |  91 | 185 | 147 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|  55 |  69 |  93 | 141 | 102 |  67 |  72 |  57 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 
All pieces (not only pawns) on their original square from the start position end up in a large negative number and need correction.

That's why I spoke of "handling a few side effects" :wink:
I see, thanks.
Is this a hint that the method can be improved?
Currently a pawn move d2-d3 or e2-e3 is penalized, while f2-f3 not.

How would the numbers change if you only count the to squares?

How would the numbers change if you take into account the game result?
This would probably result in some kind of "tuned" values.
Question is, how to count then ... +1 0 -1, or +2 +1 -2 ?
Jörg Oster
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Idea #13 [experiment]

Post by Rebel »

Joerg Oster wrote: Sat Aug 08, 2020 1:00 pm
Rebel wrote: Sat Aug 08, 2020 12:22 pm
Joerg Oster wrote: Sat Aug 08, 2020 11:59 am
Rebel wrote: Fri Aug 07, 2020 4:07 pm There is no tuning, just a raw statistic from a large quality PGN, not suited for evaluation.

Code: for each move : pst[piece_type][square_from]--; pst[piece_type][square_to]++;

That's basically all there is except handling a few side effects.
How is this possible then?
A white pawn on d2, for example, can never get positive hits, no?
And afaik, a pawn can never go back ... :D

Code: Select all

PGN   : pgn\elo2600.pgn Games 82.208
Phase : Middle Game

White Pawn
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   7 |   6 |  12 |   8 |  10 |   7 |   3 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  14 |  22 |  32 |  41 |  44 |  49 |  33 |  15 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|  46 |  78 | 125 | 288 | 169 |  75 |  58 |  38 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
| 100 | 119 | 205 | 336 | 210 | 110 |  78 |  85 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
| 112 | 119 | 101 |  32 |  81 |  91 | 185 | 147 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|  55 |  69 |  93 | 141 | 102 |  67 |  72 |  57 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 
All pieces (not only pawns) on their original square from the start position end up in a large negative number and need correction.

That's why I spoke of "handling a few side effects" :wink:
I see, thanks.
Is this a hint that the method can be improved?
Currently a pawn move d2-d3 or e2-e3 is penalized, while f2-f3 not.
Yep, the calculation of the root pawns needs improvement.
Joerg Oster wrote: Sat Aug 08, 2020 1:00 pm How would the numbers change if you only count the to squares?
Will try....
Joerg Oster wrote: Sat Aug 08, 2020 1:00 pm How would the numbers change if you take into account the game result?
This would probably result in some kind of "tuned" values.
Question is, how to count then ... +1 0 -1, or +2 +1 -2 ?
This is already taken care of, only moves from won games are counted.
90% of coding is debugging, the other 10% is writing bugs.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Idea #13 [experiment]

Post by Rebel »

Things are better now, maybe (in the end) it can be used for evaluation as well.

Code: Select all

PGN   : pgn\elo-2600.pgn Games 82.208
Phase : Middle Game

White Pawn
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   1 |   1 |   2 |   1 |   2 |   1 |   0 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   4 |   6 |   8 |   8 |   9 |   6 |   3 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   9 |  15 |  25 |  57 |  34 |  15 |  11 |   7 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|  20 |  23 |  41 |  67 |  42 |  22 |  15 |  17 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|  22 |  23 |  20 |   6 |  16 |  18 |  37 |  29 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White Night
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   1 |   6 |   3 |   4 |   4 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   5 |   6 |  20 |  16 |  11 |   5 |   1 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  13 |  50 |  30 |  32 |  38 |  19 |   5 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   7 |  20 |  32 |  86 |  77 |  36 |  28 |   7 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   9 |   6 |  27 |  72 |  71 |  17 |  12 |   9 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  14 |  64 |  13 |  17 |  44 |  13 |   2 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   1 |   3 |  22 |  15 |   3 |   1 |   1 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   1 |   1 |   2 |   2 |   3 |   3 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White Bishop
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   2 |   5 |   4 |   3 |  11 |   1 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  12 |   6 |  18 |  24 |   9 |  23 |   5 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  11 |  12 |  46 |  23 |  24 |  72 |  13 |  17 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  19 |  26 |  38 |  31 |  21 |  27 |   5 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  14 |  39 |  35 |  36 |  38 |  10 |   5 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   8 |  22 |  23 |  51 |  52 |  22 |  22 |   9 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  20 |  13 |  29 |  29 |   8 |  54 |   2 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   4 |   4 |   4 |   4 |   4 |   1 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White Rook
+-----+-----+-----+-----+-----+-----+-----+-----+
|  14 |   8 |  24 |  33 |  23 |  12 |   4 |   6 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|  11 |  13 |  17 |  23 |  17 |  14 |   9 |   6 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   7 |  14 |  20 |  15 |  11 |   6 |   5 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   5 |  12 |  19 |  15 |   9 |   4 |   5 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   5 |  10 |  18 |  13 |   8 |   5 |   5 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   7 |  10 |  15 |  14 |  12 |  10 |   6 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   6 |  15 |  22 |  14 |  11 |   5 |   2 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   9 |   9 |  24 |  39 |  29 |   6 |   6 |   6 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White Queen
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   6 |  20 |   7 |   5 |   2 |   3 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   6 |  10 |  11 |  12 |  10 |   6 |   5 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |  10 |  10 |  14 |  13 |  16 |  10 |   9 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   8 |  11 |  17 |  17 |  13 |  10 |   8 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   7 |  10 |  19 |  15 |  13 |  10 |   7 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |  11 |  14 |  11 |  14 |  15 |  10 |   3 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   5 |  12 |  17 |  13 |   7 |   4 |   1 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   2 |   4 |   3 |   3 |   2 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White King
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   1 |   1 |   1 |   3 |   4 |   7 |   6 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   6 |   5 |   6 |  10 |  17 |  54 |  43 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |  31 |  22 |   2 |   2 |  17 | 249 |  53 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Pawn
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  19 |  14 |  13 |  14 |  20 |  10 |  27 |  20 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|  12 |  20 |  22 |  38 |  25 |  15 |  10 |  10 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |  12 |  18 |  33 |  14 |   8 |   5 |   3 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   3 |   4 |   3 |   2 |   3 |   2 |   1 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   1 |   1 |   1 |   0 |   0 |   0 |   0 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Knight
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   1 |   2 |   4 |   4 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   3 |  23 |   9 |   3 |   2 |   1 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |  11 |  25 |   8 |  10 |  36 |  10 |   2 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   4 |  22 |  46 |  46 |  14 |   8 |   6 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  11 |  24 |  45 |  50 |  22 |  16 |   5 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   9 |  33 |  19 |  15 |  17 |  10 |   3 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   3 |   3 |  10 |   7 |   6 |   2 |   1 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   1 |   2 |   2 |   3 |   3 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Bishop
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   1 |   2 |   2 |   3 |   3 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  24 |   4 |  19 |  29 |   3 |  39 |   1 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  10 |   8 |  17 |  22 |  26 |  20 |  14 |   8 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  12 |  20 |  30 |  22 |  21 |  11 |   2 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  10 |  14 |  23 |  22 |  11 |   9 |   4 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   6 |  40 |  16 |  15 |  34 |   6 |   6 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   6 |   3 |   9 |   8 |   6 |  15 |   2 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   1 |   2 |   2 |   1 |   7 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Rook
+-----+-----+-----+-----+-----+-----+-----+-----+
|   7 |   7 |  15 |  21 |  17 |   4 |   4 |   4 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   4 |  10 |  12 |  10 |  11 |   4 |   1 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   4 |   6 |   8 |   8 |   6 |   5 |   2 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   6 |  10 |   9 |   6 |   3 |   3 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   7 |  10 |  10 |   4 |   3 |   3 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   9 |   8 |  10 |   7 |   4 |   2 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   6 |   9 |  11 |  11 |   9 |   8 |   4 |   3 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   8 |   6 |  15 |  18 |  14 |   8 |   3 |   4 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Queen
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   2 |   2 |   3 |   3 |   1 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   3 |   8 |   8 |   7 |   4 |   2 |   0 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   9 |   7 |   9 |   7 |   9 |   5 |   2 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   5 |   8 |  12 |  11 |   8 |   7 |   4 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   7 |  11 |  11 |   8 |   5 |   5 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   6 |   7 |   6 |   8 |   9 |   7 |   4 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   4 |   4 |   8 |   6 |   6 |   2 |   2 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   2 |   3 |   9 |   4 |   2 |   1 |   2 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black King
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   6 |   8 |   2 |   2 |  13 | 160 |  36 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   4 |   3 |   4 |   8 |  11 |  36 |  27 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   1 |   0 |   1 |   3 |   4 |   4 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

int wp[] = {
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   1,   1,   2,   1,   2,   1,   0, 
  2,   4,   6,   8,   8,   9,   6,   3, 
  9,  15,  25,  57,  34,  15,  11,   7, 
 20,  23,  41,  67,  42,  22,  15,  17, 
 22,  23,  20,   6,  16,  18,  37,  29, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0 };

int wn[] = {
  2,   1,   6,   3,   4,   4,   0,   0, 
  1,   5,   6,  20,  16,  11,   5,   1, 
  2,  13,  50,  30,  32,  38,  19,   5, 
  7,  20,  32,  86,  77,  36,  28,   7, 
  9,   6,  27,  72,  71,  17,  12,   9, 
  2,  14,  64,  13,  17,  44,  13,   2, 
  1,   1,   3,  22,  15,   3,   1,   1, 
  0,   1,   1,   2,   2,   3,   3,   0 };

int wb[] = {
  4,   2,   5,   4,   3,  11,   1,   0, 
  2,  12,   6,  18,  24,   9,  23,   5, 
 11,  12,  46,  23,  24,  72,  13,  17, 
  4,  19,  26,  38,  31,  21,  27,   5, 
  4,  14,  39,  35,  36,  38,  10,   5, 
  8,  22,  23,  51,  52,  22,  22,   9, 
  4,  20,  13,  29,  29,   8,  54,   2, 
  2,   4,   4,   4,   4,   4,   1,   0 };

int wr[] = {
 14,   8,  24,  33,  23,  12,   4,   6, 
 11,  13,  17,  23,  17,  14,   9,   6, 
  5,   7,  14,  20,  15,  11,   6,   5, 
  5,   5,  12,  19,  15,   9,   4,   5, 
  5,   5,  10,  18,  13,   8,   5,   5, 
  4,   7,  10,  15,  14,  12,  10,   6, 
  5,   6,  15,  22,  14,  11,   5,   2, 
  9,   9,  24,  39,  29,   6,   6,   6 };

int wq[] = {
  3,   4,   6,  20,   7,   5,   2,   3, 
  4,   6,  10,  11,  12,  10,   6,   5, 
  3,  10,  10,  14,  13,  16,  10,   9, 
  5,   8,  11,  17,  17,  13,  10,   8, 
  5,   7,  10,  19,  15,  13,  10,   7, 
  3,  11,  14,  11,  14,  15,  10,   3, 
  1,   5,  12,  17,  13,   7,   4,   1, 
  2,   2,   4,   3,   3,   2,   0,   0 };

int wk[] = {
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   1,   1,   1,   3,   4,   7,   6, 
  5,   6,   5,   6,  10,  17,  54,  43, 
  5,  31,  22,   2,   2,  17, 249,  53 };

int bp[] = {
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
 19,  14,  13,  14,  20,  10,  27,  20, 
 12,  20,  22,  38,  25,  15,  10,  10, 
  5,  12,  18,  33,  14,   8,   5,   3, 
  2,   3,   4,   3,   2,   3,   2,   1, 
  0,   1,   1,   1,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0 };

int bn[] = {
  0,   0,   0,   1,   2,   4,   4,   0, 
  0,   0,   3,  23,   9,   3,   2,   1, 
  3,  11,  25,   8,  10,  36,  10,   2, 
  4,   4,  22,  46,  46,  14,   8,   6, 
  4,  11,  24,  45,  50,  22,  16,   5, 
  1,   9,  33,  19,  15,  17,  10,   3, 
  1,   3,   3,  10,   7,   6,   2,   1, 
  1,   1,   2,   2,   3,   3,   0,   0 };

int bb[] = {
  2,   1,   2,   2,   3,   3,   0,   0, 
  2,  24,   4,  19,  29,   3,  39,   1, 
 10,   8,  17,  22,  26,  20,  14,   8, 
  2,  12,  20,  30,  22,  21,  11,   2, 
  4,  10,  14,  23,  22,  11,   9,   4, 
  4,   6,  40,  16,  15,  34,   6,   6, 
  1,   6,   3,   9,   8,   6,  15,   2, 
  1,   1,   2,   2,   1,   7,   0,   0 };

int br[] = {
  7,   7,  15,  21,  17,   4,   4,   4, 
  4,   4,  10,  12,  10,  11,   4,   1, 
  4,   4,   6,   8,   8,   6,   5,   2, 
  3,   4,   6,  10,   9,   6,   3,   3, 
  3,   4,   7,  10,  10,   4,   3,   3, 
  3,   4,   9,   8,  10,   7,   4,   2, 
  6,   9,  11,  11,   9,   8,   4,   3, 
  8,   6,  15,  18,  14,   8,   3,   4 };

int bq[] = {
  1,   2,   2,   3,   3,   1,   0,   0, 
  1,   3,   8,   8,   7,   4,   2,   0, 
  3,   9,   7,   9,   7,   9,   5,   2, 
  3,   5,   8,  12,  11,   8,   7,   4, 
  3,   4,   7,  11,  11,   8,   5,   5, 
  2,   6,   7,   6,   8,   9,   7,   4, 
  2,   4,   4,   8,   6,   6,   2,   2, 
  2,   2,   3,   9,   4,   2,   1,   2 };

int bk[] = {
  2,   6,   8,   2,   2,  13, 160,  36, 
  1,   4,   3,   4,   8,  11,  36,  27, 
  0,   0,   1,   0,   1,   3,   4,   4, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0 };
90% of coding is debugging, the other 10% is writing bugs.
Pio
Posts: 334
Joined: Sat Feb 25, 2012 10:42 pm
Location: Stockholm

Re: Idea #13 [experiment]

Post by Pio »

Rebel wrote: Sat Aug 08, 2020 9:23 pm Things are better now, maybe (in the end) it can be used for evaluation as well.

Code: Select all

PGN   : pgn\elo-2600.pgn Games 82.208
Phase : Middle Game

White Pawn
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   1 |   1 |   2 |   1 |   2 |   1 |   0 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   4 |   6 |   8 |   8 |   9 |   6 |   3 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   9 |  15 |  25 |  57 |  34 |  15 |  11 |   7 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|  20 |  23 |  41 |  67 |  42 |  22 |  15 |  17 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|  22 |  23 |  20 |   6 |  16 |  18 |  37 |  29 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White Night
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   1 |   6 |   3 |   4 |   4 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   5 |   6 |  20 |  16 |  11 |   5 |   1 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  13 |  50 |  30 |  32 |  38 |  19 |   5 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   7 |  20 |  32 |  86 |  77 |  36 |  28 |   7 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   9 |   6 |  27 |  72 |  71 |  17 |  12 |   9 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  14 |  64 |  13 |  17 |  44 |  13 |   2 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   1 |   3 |  22 |  15 |   3 |   1 |   1 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   1 |   1 |   2 |   2 |   3 |   3 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White Bishop
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   2 |   5 |   4 |   3 |  11 |   1 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  12 |   6 |  18 |  24 |   9 |  23 |   5 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  11 |  12 |  46 |  23 |  24 |  72 |  13 |  17 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  19 |  26 |  38 |  31 |  21 |  27 |   5 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  14 |  39 |  35 |  36 |  38 |  10 |   5 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   8 |  22 |  23 |  51 |  52 |  22 |  22 |   9 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  20 |  13 |  29 |  29 |   8 |  54 |   2 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   4 |   4 |   4 |   4 |   4 |   1 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White Rook
+-----+-----+-----+-----+-----+-----+-----+-----+
|  14 |   8 |  24 |  33 |  23 |  12 |   4 |   6 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|  11 |  13 |  17 |  23 |  17 |  14 |   9 |   6 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   7 |  14 |  20 |  15 |  11 |   6 |   5 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   5 |  12 |  19 |  15 |   9 |   4 |   5 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   5 |  10 |  18 |  13 |   8 |   5 |   5 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   7 |  10 |  15 |  14 |  12 |  10 |   6 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   6 |  15 |  22 |  14 |  11 |   5 |   2 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   9 |   9 |  24 |  39 |  29 |   6 |   6 |   6 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White Queen
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   6 |  20 |   7 |   5 |   2 |   3 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   6 |  10 |  11 |  12 |  10 |   6 |   5 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |  10 |  10 |  14 |  13 |  16 |  10 |   9 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   8 |  11 |  17 |  17 |  13 |  10 |   8 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   7 |  10 |  19 |  15 |  13 |  10 |   7 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |  11 |  14 |  11 |  14 |  15 |  10 |   3 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   5 |  12 |  17 |  13 |   7 |   4 |   1 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   2 |   4 |   3 |   3 |   2 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

White King
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   1 |   1 |   1 |   3 |   4 |   7 |   6 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |   6 |   5 |   6 |  10 |  17 |  54 |  43 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |  31 |  22 |   2 |   2 |  17 | 249 |  53 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Pawn
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  19 |  14 |  13 |  14 |  20 |  10 |  27 |  20 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|  12 |  20 |  22 |  38 |  25 |  15 |  10 |  10 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   5 |  12 |  18 |  33 |  14 |   8 |   5 |   3 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   3 |   4 |   3 |   2 |   3 |   2 |   1 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   1 |   1 |   1 |   0 |   0 |   0 |   0 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Knight
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   1 |   2 |   4 |   4 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   3 |  23 |   9 |   3 |   2 |   1 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |  11 |  25 |   8 |  10 |  36 |  10 |   2 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   4 |  22 |  46 |  46 |  14 |   8 |   6 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  11 |  24 |  45 |  50 |  22 |  16 |   5 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   9 |  33 |  19 |  15 |  17 |  10 |   3 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   3 |   3 |  10 |   7 |   6 |   2 |   1 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   1 |   2 |   2 |   3 |   3 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Bishop
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   1 |   2 |   2 |   3 |   3 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  24 |   4 |  19 |  29 |   3 |  39 |   1 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|  10 |   8 |  17 |  22 |  26 |  20 |  14 |   8 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |  12 |  20 |  30 |  22 |  21 |  11 |   2 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |  10 |  14 |  23 |  22 |  11 |   9 |   4 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   6 |  40 |  16 |  15 |  34 |   6 |   6 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   6 |   3 |   9 |   8 |   6 |  15 |   2 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   1 |   2 |   2 |   1 |   7 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Rook
+-----+-----+-----+-----+-----+-----+-----+-----+
|   7 |   7 |  15 |  21 |  17 |   4 |   4 |   4 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   4 |  10 |  12 |  10 |  11 |   4 |   1 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   4 |   4 |   6 |   8 |   8 |   6 |   5 |   2 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   6 |  10 |   9 |   6 |   3 |   3 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   7 |  10 |  10 |   4 |   3 |   3 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   9 |   8 |  10 |   7 |   4 |   2 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   6 |   9 |  11 |  11 |   9 |   8 |   4 |   3 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   8 |   6 |  15 |  18 |  14 |   8 |   3 |   4 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black Queen
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   2 |   2 |   3 |   3 |   1 |   0 |   0 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   3 |   8 |   8 |   7 |   4 |   2 |   0 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   9 |   7 |   9 |   7 |   9 |   5 |   2 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   5 |   8 |  12 |  11 |   8 |   7 |   4 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   3 |   4 |   7 |  11 |  11 |   8 |   5 |   5 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   6 |   7 |   6 |   8 |   9 |   7 |   4 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   4 |   4 |   8 |   6 |   6 |   2 |   2 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   2 |   3 |   9 |   4 |   2 |   1 |   2 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

Black King
+-----+-----+-----+-----+-----+-----+-----+-----+
|   2 |   6 |   8 |   2 |   2 |  13 | 160 |  36 | 8
+-----+-----+-----+-----+-----+-----+-----+-----+
|   1 |   4 |   3 |   4 |   8 |  11 |  36 |  27 | 7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   1 |   0 |   1 |   3 |   4 |   4 | 6
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 5
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 4
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 3
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 2
+-----+-----+-----+-----+-----+-----+-----+-----+
|   0 |   0 |   0 |   0 |   0 |   0 |   0 |   0 | 1
+-----+-----+-----+-----+-----+-----+-----+-----+
    a     b     c     d     e     f     g     h 

int wp[] = {
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   1,   1,   2,   1,   2,   1,   0, 
  2,   4,   6,   8,   8,   9,   6,   3, 
  9,  15,  25,  57,  34,  15,  11,   7, 
 20,  23,  41,  67,  42,  22,  15,  17, 
 22,  23,  20,   6,  16,  18,  37,  29, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0 };

int wn[] = {
  2,   1,   6,   3,   4,   4,   0,   0, 
  1,   5,   6,  20,  16,  11,   5,   1, 
  2,  13,  50,  30,  32,  38,  19,   5, 
  7,  20,  32,  86,  77,  36,  28,   7, 
  9,   6,  27,  72,  71,  17,  12,   9, 
  2,  14,  64,  13,  17,  44,  13,   2, 
  1,   1,   3,  22,  15,   3,   1,   1, 
  0,   1,   1,   2,   2,   3,   3,   0 };

int wb[] = {
  4,   2,   5,   4,   3,  11,   1,   0, 
  2,  12,   6,  18,  24,   9,  23,   5, 
 11,  12,  46,  23,  24,  72,  13,  17, 
  4,  19,  26,  38,  31,  21,  27,   5, 
  4,  14,  39,  35,  36,  38,  10,   5, 
  8,  22,  23,  51,  52,  22,  22,   9, 
  4,  20,  13,  29,  29,   8,  54,   2, 
  2,   4,   4,   4,   4,   4,   1,   0 };

int wr[] = {
 14,   8,  24,  33,  23,  12,   4,   6, 
 11,  13,  17,  23,  17,  14,   9,   6, 
  5,   7,  14,  20,  15,  11,   6,   5, 
  5,   5,  12,  19,  15,   9,   4,   5, 
  5,   5,  10,  18,  13,   8,   5,   5, 
  4,   7,  10,  15,  14,  12,  10,   6, 
  5,   6,  15,  22,  14,  11,   5,   2, 
  9,   9,  24,  39,  29,   6,   6,   6 };

int wq[] = {
  3,   4,   6,  20,   7,   5,   2,   3, 
  4,   6,  10,  11,  12,  10,   6,   5, 
  3,  10,  10,  14,  13,  16,  10,   9, 
  5,   8,  11,  17,  17,  13,  10,   8, 
  5,   7,  10,  19,  15,  13,  10,   7, 
  3,  11,  14,  11,  14,  15,  10,   3, 
  1,   5,  12,  17,  13,   7,   4,   1, 
  2,   2,   4,   3,   3,   2,   0,   0 };

int wk[] = {
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   1,   1,   1,   3,   4,   7,   6, 
  5,   6,   5,   6,  10,  17,  54,  43, 
  5,  31,  22,   2,   2,  17, 249,  53 };

int bp[] = {
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
 19,  14,  13,  14,  20,  10,  27,  20, 
 12,  20,  22,  38,  25,  15,  10,  10, 
  5,  12,  18,  33,  14,   8,   5,   3, 
  2,   3,   4,   3,   2,   3,   2,   1, 
  0,   1,   1,   1,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0 };

int bn[] = {
  0,   0,   0,   1,   2,   4,   4,   0, 
  0,   0,   3,  23,   9,   3,   2,   1, 
  3,  11,  25,   8,  10,  36,  10,   2, 
  4,   4,  22,  46,  46,  14,   8,   6, 
  4,  11,  24,  45,  50,  22,  16,   5, 
  1,   9,  33,  19,  15,  17,  10,   3, 
  1,   3,   3,  10,   7,   6,   2,   1, 
  1,   1,   2,   2,   3,   3,   0,   0 };

int bb[] = {
  2,   1,   2,   2,   3,   3,   0,   0, 
  2,  24,   4,  19,  29,   3,  39,   1, 
 10,   8,  17,  22,  26,  20,  14,   8, 
  2,  12,  20,  30,  22,  21,  11,   2, 
  4,  10,  14,  23,  22,  11,   9,   4, 
  4,   6,  40,  16,  15,  34,   6,   6, 
  1,   6,   3,   9,   8,   6,  15,   2, 
  1,   1,   2,   2,   1,   7,   0,   0 };

int br[] = {
  7,   7,  15,  21,  17,   4,   4,   4, 
  4,   4,  10,  12,  10,  11,   4,   1, 
  4,   4,   6,   8,   8,   6,   5,   2, 
  3,   4,   6,  10,   9,   6,   3,   3, 
  3,   4,   7,  10,  10,   4,   3,   3, 
  3,   4,   9,   8,  10,   7,   4,   2, 
  6,   9,  11,  11,   9,   8,   4,   3, 
  8,   6,  15,  18,  14,   8,   3,   4 };

int bq[] = {
  1,   2,   2,   3,   3,   1,   0,   0, 
  1,   3,   8,   8,   7,   4,   2,   0, 
  3,   9,   7,   9,   7,   9,   5,   2, 
  3,   5,   8,  12,  11,   8,   7,   4, 
  3,   4,   7,  11,  11,   8,   5,   5, 
  2,   6,   7,   6,   8,   9,   7,   4, 
  2,   4,   4,   8,   6,   6,   2,   2, 
  2,   2,   3,   9,   4,   2,   1,   2 };

int bk[] = {
  2,   6,   8,   2,   2,  13, 160,  36, 
  1,   4,   3,   4,   8,  11,  36,  27, 
  0,   0,   1,   0,   1,   3,   4,   4, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0, 
  0,   0,   0,   0,   0,   0,   0,   0 };
I like most of your posts (and your excellent webpage) and this is also interesting. I have a couple of ideas/suggestions to make it even better:

1) make the bonuses relative. What I mean is for each position reduce all the (piece, tosq) combinations that could have been played by one and add the negated negative sum to the (piece, tosq) that was made. This will make a pawn moving to last rank a huge bonus while it gives an extremely small bonus in your current scheme since most pawns won’t reach rank six or seven.
2) make each game count as much. What I mean is that a half as long game’s positions should count double as much so each game give the same amount of bonuses.
3) make two tables for each piece type, one for early stage and one for late stage and the bonuses should be distributed to the two tables depending on how much the position belongs to either stage. This will make a Hugh gain in the endgame for the king and will also change the other pieces quite a lot. The only problem is that not everyone counts gamephase the same.

Good luck!
/Pio