Hi Ed,
this is what the last tuning run converged the value to. Unlike others I don't start the tuning process with material, then add PSQ, then mobility etc...
My tuning method tunes all parameters at once. So in combination with other piece related terms this value seemed to be at least not bad.
One reason might also be that it makes only little difference whether the queen is 12, 13 or 16 pawns. The engine should better not exchange it against any number of pawns. If the term (as long as it is in the right ball park) has only little effect on ELO the tuning might converge it to a strange looking number.
But I was also so surprised that the value ended up being so high, so I modified my tuner framework a bit. Now the accepted solutions for the material values are centered around the classical values. I was wondering whether a set closer to the classical values performs better than a set where I allowed full freedom. But I don't have the results yet. I just started the evolution.
Thomas...
Piece/square table challenge
Moderator: Ras
-
- Posts: 686
- Joined: Thu Mar 03, 2011 4:57 pm
- Location: Germany
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: Piece/square table challenge
Hi Thomas,tpetzke wrote:Hi Ed,
this is what the last tuning run converged the value to. Unlike others I don't start the tuning process with material, then add PSQ, then mobility etc...
My tuning method tunes all parameters at once. So in combination with other piece related terms this value seemed to be at least not bad.
One reason might also be that it makes only little difference whether the queen is 12, 13 or 16 pawns. The engine should better not exchange it against any number of pawns. If the term (as long as it is in the right ball park) has only little effect on ELO the tuning might converge it to a strange looking number.
But I was also so surprised that the value ended up being so high, so I modified my tuner framework a bit. Now the accepted solutions for the material values are centered around the classical values. I was wondering whether a set closer to the classical values performs better than a set where I allowed full freedom. But I don't have the results yet. I just started the evolution.
Thomas...
I think one of the most surprising points is not that the queen is valued ~16 pawns but that it equals roughly 2.5 rooks in middle game. As you say, the number of pawns is not of much relevance but 2.5 rooks is quite a lot different from current understanding of chess theory.
Another surprise for me is that your tuning process has resulted in an EG queen score that is lower than the MG queen score. Isn't it just the other way round in other engines?
Sven
-
- Posts: 1600
- Joined: Mon Feb 21, 2011 9:48 am
Re: Piece/square table challenge
Rebel wrote:
I like to extend this list with the Fruit and Ippo PST's. Can someone post them?
.
I think Ippo is very dependent on many things, but this is:
#define PAWN_VAL 100
#define KNIGHT_VAL 325
#define BISHOP_VAL 325
#define ROOK_VAL 500
#define QUEEN_VAL 975
Code: Select all
int pstPawnMg[64]=
{
0, 0, 0, 0, 0, 0, 0, 0,
-23, -11, -5, 2, 2, -5, -11, -23,
-22, -10, -4, 3, 3, -4, -10, -22,
-21, -9, -3, 4, 4, -3, -9, -21,
-19, -7, -1, 6, 6, -1, -7, -19,
-18, -6, 0, 7, 7, 0, -6, -18,
-17, -5, 1, 8, 8, 1, -5, -17,
0, 0, 0, 0, 0, 0, 0, 0
};
int pstPawnEg[64] =
{
0, 0, 0, 0, 0, 0, 0, 0,
-2, -4, -6, -8, -8, -6, -4, -2,
-4, -6, -8, -10, -10, -8, -6, -4,
-5, -7, -9, -11, -11, -9, -7, -5,
-6, -8, -10, -12, -12, -10, -8, -6,
-7, -9, -11, -13, -13, -11, -9, -7,
-7, -9, -11, -13, -13, -11, -9, -7,
0, 0, 0, 0, 0, 0, 0, 0
};
int pstKnightMg[64] =
{
-58, -42, -31, -27, -27, -31, -42, -58,
-36, -20, -9, -5, -5, -9, -20, -36,
-20, -4, 7, 11, 11, 7, -4, -20,
-11, 5, 16, 20, 20, 16, 5, -11,
-5, 11, 22, 26, 26, 22, 11, -5,
-7, 9, 20, 24, 24, 20, 9, -7,
-16, 10, 11, 15, 15, 11, 10, -16,
-120,-21, -10, -6, -6, -10, -21,-120
};
int pstKnightEg[64] =
{
-22, -17, -12, -9, -9, -12, -17, -22,
-15, -8, -4, -2, -2, -4, -8, -15,
-10, -4, 1, 3, 3, 1, -4, -10,
-6, -1, 4, 8, 8, 4, -1, -6,
-4, 1, 6, 10, 10, 6, 1, -4,
-3, 3, 8, 10, 10, 8, 3, -3,
-8, -1, 3, 5, 5, 3, -1, -8,
-15, -10, -5, -2, -2, -5, -10, -15
};
int pstBishopMg[64] =
{
-7, -8, -11, -13, -13, -11, -8, -7,
-3, 3, 0, -2, -2, 0, 3, -3,
-6, 0, 7, 6, 6, 7, 0, -6,
-8, -2, 6, 15, 15, 6, -2, -8,
-8, -2, 6, 15, 15, 6, -2, -8,
-6, 0, 7, 6, 6, 7, 0, -6,
-3, 3, 0, -2, -2, 0, 3, -3,
-2, -3, -6, -8, -8, -6, -3, -2
};
int pstBishopEg[64] =
{
0, -1, -2, -2, -2, -2, -1, 0,
-1, 1, 0, 0, 0, 0, 1, -1,
-2, 0, 3, 2, 2, 3, 0, -2,
-2, 0, 2, 5, 5, 2, 0, -2,
-2, 0, 2, 5, 5, 2, 0, -2,
-2, 0, 3, 2, 2, 3, 0, -2,
-1, 1, 0, 0, 0, 0, 1, -1,
0, -1, -2, -2, -2, -2, -1, 0
};
int pstRookMg[64] =
{
-4, 0, 4, 8, 8, 4, 0, -4,
-4, 0, 4, 8, 8, 4, 0, -4,
-4, 0, 4, 8, 8, 4, 0, -4,
-4, 0, 4, 8, 8, 4, 0, -4,
-4, 0, 4, 8, 8, 4, 0, -4,
-4, 0, 4, 8, 8, 4, 0, -4,
-4, 0, 4, 8, 8, 4, 0, -4,
-4, 0, 4, 8, 8, 4, 0, -4
};
int pstRookEg[64] =
{
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, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
-2, -2, -2, -2, -2, -2, -2, -2
};
int pstQueenMg[64] =
{
-16, -12, -9, -7, -7, -9, -12, -16,
-7, -1, 1, 3, 3, 1, -1, -7,
-4, 1, 5, 6, 6, 5, 1, -4,
-2, 3, 6, 9, 9, 6, 3, -2,
-2, 3, 6, 9, 9, 6, 3, -2,
-4, 1, 5, 6, 6, 5, 1, -4,
-7, -1, 1, 3, 3, 1, -1, -7,
-11, -7, -4, -2, -2, -4, -7, -11
};
int pstQueenEg[64] =
{
-15, -10, -8, -7, -7, -8, -10, -15,
-10, -5, -3, -2, -2, -3, -5, -10,
-8, -3, 0, 2, 2, 0, -3, -8,
-7, -2, 2, 5, 5, 2, -2, -7,
-7, -2, 2, 5, 5, 2, -2, -7,
-8, -3, 0, 2, 2, 0, -3, -8,
-10, -5, -3, -2, -2, -3, -5, -10,
-15, -10, -8, -7, -7, -8, -10, -15,
};
int pstKingMg[64] =
{
44, 49, 19, -1, -1, 19, 49, 44,
44, 49, 19, -1, -1, 19, 49, 44,
38, 43, 13, -7, -7, 13, 43, 38,
35, 40, 10, -10, -10, 10, 40, 35,
30, 35, 5, -15, -15, 5, 35, 30,
25, 30, 0, -20, -20, 0, 30, 25,
15, 20, -10, -30, -30, -10, 20, 15,
5, 10, -20, -40, -40, -20, 10, 5
};
int pstKingEg[64] =
{
-73, -50, -34, -28, -28, -34, -50, -73,
-40, -15, -3, 3, 3, -3, -15, -40,
-29, -8, 7, 13, 13, 7, -8, -29,
-23, -2, 13, 22, 22, 13, -2, -23,
-18, 3, 18, 27, 27, 18, 3, -18,
-24, -3, 12, 18, 18, 12, -3, -24,
-35, -10, 2, 8, 8, 2, -10, -35,
-53, -30, -14, -8, -8, -14, -30, -53
};
-
- Posts: 686
- Joined: Thu Mar 03, 2011 4:57 pm
- Location: Germany
Re: Piece/square table challenge
Hi Sven,
the values for rook mobility are higher than than the values for queen mobility. In addition rooks have a lot of other terms that give them some extra points like being on a open file, at the 7th rank, attacking a weak pawn, being behind a passed pawn ...
The queen does not have that, so probably their material value is pushed up a bit to compensate that.
Are you sure that the queen value improves in the endgame. I did some imbalance tests and the queen value decreased along with the number of pawns. This should make the endgame value smaller than then its midgame value.
But this is just me trying to interpret the data that was calculated. I did already several runs and the value sets finally produced are never the same but of very similar strength.
Thomas...
the values for rook mobility are higher than than the values for queen mobility. In addition rooks have a lot of other terms that give them some extra points like being on a open file, at the 7th rank, attacking a weak pawn, being behind a passed pawn ...
The queen does not have that, so probably their material value is pushed up a bit to compensate that.
Are you sure that the queen value improves in the endgame. I did some imbalance tests and the queen value decreased along with the number of pawns. This should make the endgame value smaller than then its midgame value.
But this is just me trying to interpret the data that was calculated. I did already several runs and the value sets finally produced are never the same but of very similar strength.
Thomas...
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Piece/square table challenge
Just out of interest: are you planning to post yours for this competition?Rebel wrote:This is a fun project. I am planning to make a special ProDeo release where you can load the here contributed PST's. Currently I have running:
1. Disco Check
2. CPW
3. Adam Hair
4. Rodent
5. Hakkapeliitta
6. Ice
Any author objection?
I like to extend this list with the Fruit and Ippo PST's. Can someone post them?
It seems fair if you're going to have the option of including the ones posted here in your program.
-
- Posts: 7298
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Piece/square table challenge
I don't see this as a competition, just fun. But I will post mine, no problem.Evert wrote:Just out of interest: are you planning to post yours for this competition?Rebel wrote:This is a fun project. I am planning to make a special ProDeo release where you can load the here contributed PST's. Currently I have running:
1. Disco Check
2. CPW
3. Adam Hair
4. Rodent
5. Hakkapeliitta
6. Ice
Any author objection?
I like to extend this list with the Fruit and Ippo PST's. Can someone post them?
It seems fair if you're going to have the option of including the ones posted here in your program.
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Piece/square table challenge
I don't know how relevant it is, but I recently measured the value of the Q-RR imbalance using HGM's method for determining opening values (ie, with all pawns on the board). In that setup the queen completely dominated the two rooks, which needed more than an extra pawn to equalise.Sven Schüle wrote:I think one of the most surprising points is not that the queen is valued ~16 pawns but that it equals roughly 2.5 rooks in middle game. As you say, the number of pawns is not of much relevance but 2.5 rooks is quite a lot different from current understanding of chess theory.
Of course the situation is a bit artificial and with fewer pawns on the board and more pieces exchanged things (probably) balance out quickly.
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Piece/square table challenge
Well, in theory you want to order the moves that improve your evaluation near the top of your move list. That means that you want to order based on Delta-static eval ~ SEE(move) + Delta-PST(move), if you approximate the evaluation as material+PST. Of course replacing the static eval with the result from a (shallower) search is better, which is why the transposition table and killer moves come in handy. Using the full evaluation may also be better than the approximation used here, but that will be prohibitively expensive (remember, you're basically doing it for every move in every node).Harald wrote:Did you (anybody) ever think of two kinds of piece square tables, one for
move ordering and one for evaluation?
The one for move ordering may includes some asymmetry and is a little bit speculative,
and the one for evaluation is more restricted because the other evaluation
terms do the rest.
From that perspective, using anything other than the PST you use in evaluation is "wrong". However, approximating the evaluation as "material + PST" is also wrong (as is approximating search by SEE+static eval). So it may pay to use tables that include crude versions of chess knowledge that in your evaluation is not part of the PSTs, such as Adam's tables posted earlier (as a refinement, suitably modified for the location of the king). May be worth trying, however I'd personally rather avoid the interpolation between MG and EG tables during move ordering.
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Piece/square table challenge
Well, in theory you want to order the moves that improve your evaluation near the top of your move list. That means that you want to order based on Delta-static eval ~ SEE(move) + Delta-PST(move), if you approximate the evaluation as material+PST. Of course replacing the static eval with the result from a (shallower) search is better, which is why the transposition table and killer moves come in handy. Using the full evaluation may also be better than the approximation used here, but that will be prohibitively expensive (remember, you're basically doing it for every move in every node).Harald wrote:Did you (anybody) ever think of two kinds of piece square tables, one for
move ordering and one for evaluation?
The one for move ordering may includes some asymmetry and is a little bit speculative,
and the one for evaluation is more restricted because the other evaluation
terms do the rest.
From that perspective, using anything other than the PST you use in evaluation is "wrong". However, approximating the evaluation as "material + PST" is also wrong (as is approximating search by SEE+static eval). So it may pay to use tables that include crude versions of chess knowledge that in your evaluation is not part of the PSTs, such as Adam's tables posted earlier (as a refinement, suitably modified for the location of the king). May be worth trying, however I'd personally rather avoid the interpolation between MG and EG tables during move ordering.
-
- Posts: 7298
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Piece/square table challenge
On request here are my antique ones, they haven't been touched for 25 years or so. All values are binary based, 1 pawn = 256.
The WPLC and WKTR tables can be skipped in case of testing them.
The WPLC and WKTR tables can be skipped in case of testing them.
Code: Select all
MIDG ENDG
PAWN_VAL 0xc0 0xc0
KNIGHT_VAL 0x2ec 0x28c
BISHOP_VAL 0x30a 0x2a0
ROOK_VAL 0x4a0 0x460
QUEEN_VAL 0x8e2 0x8B6
static int wpMg[]= { 00,10,12, 6,10,14,36,36, // a1-a8
00,10,12,12,13,14,36,36, // b1-b8
00,10,10,12,13,20,36,36,
00,00,12,20,20,24,36,36,
00,00,12,20,20,24,36,36,
00,14,10,10,18,20,36,36,
00,55,55,10,12,16,36,36,
00,50,50,10,12,16,36,36 } // h1-h8
static int wpEg[]= { 00, 4, 4, 4, 8,12,16,16,
00, 8, 8, 8,12,16,20,20,
00,12,12,12,16,20,24,24,
00,16,16,16,20,24,28,28,
00,16,16,16,20,24,28,28,
00,12,12,12,16,20,24,24,
00, 8, 8, 8,12,16,20,20,
00, 4, 4, 4, 8,12,16,16 }
static int WPLC[]= { 00,55,51,10,12,16,22,22, // long castle
00,55,51,10,12,16,22,22,
00,45,41,12,12,16,22,22,
00,00,12,20,20,24,30,30,
00,00,12,20,20,24,30,30,
00,00, 4,10,16,20,30,30,
00,00, 4,10,16,20,30,30,
00,00, 4,10,16,20,30,30 }
static int wnMg[]= { 00, 5,00,10,10,10,10,00,
5,20,26,22,23,28,24,10,
15,20,26,28,36,40,26,20,
15,23,30,30,40,50,26,20,
15,20,30,30,40,50,26,20,
15,20,26,28,36,40,26,20,
00,20,26,22,23,28,24,10,
00, 5,00,10,10,10,10,00 };
static int wnEg[]= { 00,05,10,10,10,10,10,00,
05,20,26,26,26,24,20,05,
16,24,28,28,28,28,24,16,
16,24,32,32,32,32,24,16,
16,24,32,32,32,32,24,16,
16,24,28,28,28,28,24,16,
05,20,26,26,26,24,20,05,
00,05,10,10,10,10,10,00 };
static int wbMg[]= { 24,30,35,38,41,42,00,10,
30,48,45,45,42,48,22,10,
24,42,45,42,45,50,24,10,
30,35,42,48,48,52,24,10,
30,35,42,48,48,52,24,10,
20,42,45,42,45,50,24,10,
30,48,45,45,42,48,22,10,
24,30,35,38,41,42,00,10 };
static int wbEg[]= { 24,30,32,34,34,32,00,24,
30,40,40,40,40,36,32,24,
30,42,44,44,44,42,34,24,
30,42,44,44,44,42,34,24,
30,42,44,44,44,42,34,24,
30,42,44,44,44,42,34,24,
30,40,40,40,40,36,32,24,
24,30,32,34,34,32,00,24 };
static int wrMg[]= { 00,00,00,00,00, 8,50,30,
00,00,00,00,00, 8,50,30,
4, 4, 4, 4, 4,12,50,30,
6, 6, 6, 6, 6,20,50,30,
6, 6, 6, 6, 6,20,50,30,
4, 4, 4, 4, 4,12,50,30,
00,00,00,00,00, 8,50,30,
00,00,00,00,00, 8,50,30 };
static int wrEg[]= { 00,00,00,00,00,00,00,00,
00,00,00,00,00,00,00,00,
00,00,00,00,00,00,00,00,
00,00,00,00,00,00,00,00,
00,00,00,00,00,00,00,00,
00,00,00,00,00,00,00,00,
00,00,00,00,00,00,00,00,
00,00,00,00,00,00,00,00 };
static int wqMg[]= { 20,32,32,32,32,34,38,38,
30,32,34,34,36,42,46,46,
30,36,34,34,34,46,54,50,
30,36,38,34,34,60,60,54,
30,36,38,34,34,60,60,54,
30,32,36,38,42,50,54,50,
30,32,34,36,40,50,54,46,
20,32,34,36,40,46,50,42 };
static int wqEg[]= { 20,24,24,24,24,24,24,20,
22,26,28,28,28,28,26,22,
26,28,30,30,30,30,28,26,
28,30,32,32,32,32,30,28,
28,30,32,32,32,32,30,28,
26,28,30,30,30,30,28,26,
22,26,28,28,28,28,26,22,
20,24,24,24,24,24,24,20 };
static int wkMg[]= { 88,86,60,50,35,20,10,00,
92,90,60,50,35,20,10,00,
90,84,60,50,35,20,10,00,
80,80,60,50,35,20,10,00,
90,80,60,50,35,20,10,00,
80,80,60,50,35,20,10,00,
90,88,60,50,35,20,10,00,
88,88,60,50,35,20,10,00 };
static int WKTR[]= { 0,12,12, 8, 8,12,12,00, // transition from mid to endgame
12,20,20,12,12,20,20,12,
16,20,24,12,12,24,20,16,
16,20,24, 4, 4,24,20,16,
16,20,24, 4, 4,24,20,16,
16,20,24,12,12,20,20,12,
12,20,20,12,12,20,20,12,
0,12,12, 8, 8,12,12,00 };
static int wkEg[]= { 0,20,28,32,32,28,20, 0,
8,36,40,44,44,40,36, 8,
12,40,52,60,60,52,40,12,
16,44,60,72,72,60,44,16,
16,44,60,72,72,60,44,16,
12,40,52,60,60,52,40,12,
8,36,40,44,44,40,36, 8,
0,20,28,32,32,28,20, 0 };