Piece/square table challenge

Discussion of chess software programming and technical issues.

Moderator: Ras

PK
Posts: 904
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Piece/square table challenge

Post by PK »

hi all,

of course all new entrants will be tested, but probably not tomorrow (I have some OTB chess to play). Current standings are:

Code: Select all

    Program                          Elo    +   -   Games   Score   Av.Op.  Draws

  1 Rodent 1.3 (build adam)        : 2089   12  12  2588    62.9 %   1997   18.0 %
  2 Rodent 1.3 (build pawel)       : 2068   12  12  2588    59.6 %   2000   24.1 %
  3 Rodent 1.3 (build ufo)         : 2000   11  11  3016    52.6 %   1982   25.0 %
  4 Rodent 1.3 (build mikko+)      : 1999   13  13  2066    49.8 %   2000   21.4 %
  5 Rodent 1.3 (build lucas)       : 1970   13  13  2026    42.1 %   2025   24.7 %
  6 Rodent 1.3 (build ERROR)       : 1940   14  14  2036    36.9 %   2033   22.0 %
  7 Rodent 1.3 (build daniel)      : 1825   21  21   992    26.7 %   2000   19.8 %
I retested Mikko's settings, since my typo was rather serious, as it changed queen value considerably. Now it scores almost the same as tables from chessprogramming wiki, and probably would be better suited for accomodating additional knowledge.

Daniel's strategy of centralizing everything failed miserably. Perhaps it would perform better if it could play the opening on its own.

Lucas' tables will be retested too. I've got one question, though. would you agree, in order to make competition closer, to add passed pawn bonus for 7th rank (and perhaps a fraction of this bonus for 6th rank?) Of course You may decline, if Your goal is to test the performance of pure tables.
PK
Posts: 904
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Piece/square table challenge

Post by PK »

As for ideas concerning king placement, one funny solution would be to use three sets of tables instead of two: symmetric endgame table and two midgame tables, scaled by file of enemy king (for example with black Kg8 white would use 7/8 of a table slanted kingside and 1/8 of a table slanted queenside). In a sense it would remind old preprocessor engines, but without the disadvantage of relying on characteristics of a root position.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Piece/square table challenge

Post by Lyudmil Tsvetkov »

Uri Blass wrote:
Lyudmil Tsvetkov wrote:
velmarin wrote:
Lyudmil Tsvetkov wrote:
If you decide however that you include only psqt, then you can add many more details to make such tables optimal, for example:
The challenge is simply that.
The value of the pieces and,
the PST, the 12 arrays, neither more nor less, just get it the best performance.
So I understand.
Of course there are many things to evaluate, are other discussions that.
It is possible to do that, but it is very much artificial and based on guesswork. You guess that the kings will usually castle long and weigh the table accordingly. What if they castle short or stay in the center? This could be much effort for nothing. For example, I decide to do a table like Adam's, with weighed in kingside attacks besides space, what if Adam or someone else supplies then her own new table version where in the king table the king gets huge penalty for landing on g1 and huge bonus for landing on b1. The king will castle all the way long and my table suddenly goes busted. That is why this is an artificial approach.

Btw., I could give my new version of the king table with huge penalty for g1 and huge bonus for b1 in the middlegame, match it against Adam's version and enjoy the results. :D
I do not see a reason why do you think castling is going to score better than short castling.

I prefer symmetric tables by file.
It is possible to do every table as symmetric by replacing 2 numbers by their average.

I also think that the value of the pieces should not be 1,3,3,5,9 but something like 1,3.2,3.3,4.8,9 to prevent trading of bishop and knight by a rook and a pawn that is a bad deal.

I wonder if modification of adam's table to be symmetric is not going to score better even without changes in piece values.
Because Adam's tables contain bonus for pieces attacking the king side, presuming in most cases the enemy king will castle short. Bonus for bishops attacking the king side, knights attacking the king side, etc. Placing pieces on such squares when other engines know nothing of king attack gives you some indisputable advantage. When you change the frequency of long castling to the frequency of short castling, everything changes and kingside slanted tables already do not work so good.

I do not know what happens if Adam's tables are symmetrical.
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Piece/square table challenge

Post by tpetzke »

I did something similar. I collected statistical data how likely iCE is moving a piece to a certain square and created psq tables with it that I used for move ordering.

However it was not better than my original ordering scheme with some psq tables I created out of thin air.

Thomas...
Thomas...

=======
http://macechess.blogspot.com - iCE Chess Engine
lucasart
Posts: 3241
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Piece/square table challenge

Post by lucasart »

PK wrote: Lucas' tables will be retested too. I've got one question, though. would you agree, in order to make competition closer, to add passed pawn bonus for 7th rank (and perhaps a fraction of this bonus for 6th rank?) Of course You may decline, if Your goal is to test the performance of pure tables.
No. Let's leave them as they are. I'm curious to see the result of the pure tables. Of course, I don't expect my tables to win here, as they were never tuned stand-alone, but in the presence of other eval factors. But still, I'm curious to know how they fare, especially as they are very minimalistic in temrs of information (ie. nb of true parameters used to generate them).
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Piece/square table challenge

Post by tpetzke »

Hi Pawel,

here are the current values from iCE from Whites Point of View. Material values below are MidGame Material Values. EndGame would be (100, 404, 400, 685, 1416).

Thomas...

Code: Select all

#define PAWN_VAL 100
#define KNIGHT_VAL 454
#define BISHOP_VAL 475
#define ROOK_VAL 646
#define QUEEN_VAL 1631 

const int pstPawnMg[64] = {-2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 15, 15, 0, -1, -2, -2, -1, 0, 29, 29, 0, -1, -2, -2, -1, 0, 15, 15, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2};
const int pstPawnEg[64] = {-2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2, -2, -1, 0, 1, 1, 0, -1, -2};

const int pstKnightMg[64] = {-100, -80, -60, -50, -50, -60, -80, -100, -70, -50, -30, -20, -20, -30, -50, -70, -40, -20, 0, 10, 10, 0, -20, -40, -20, 0, 20, 30, 30, 20, 0, -20, -10, 10, 30, 40, 40, 30, 10, -10, -10, 10, 30, 40, 40, 30, 10, -10, -40, -20, 0, 10, 10, 0, -20, -40, -70, -50, -30, -20, -20, -30, -50, -70};
const int pstKnightEg[64] = {-88, -66, -44, -33, -33, -44, -66, -88, -66, -44, -22, -11, -11, -22, -44, -66, -44, -22, 0, 11, 11, 0, -22, -44, -33, -11, 11, 22, 22, 11, -11, -33, -33, -11, 11, 22, 22, 11, -11, -33, -44, -22, 0, 11, 11, 0, -22, -44, -66, -44, -22, -11, -11, -22, -44, -66, -88, -66, -44, -33, -33, -44, -66, -88};

const int pstBishopMg[64] = {-33, -28, -21, -14, -14, -21, -28, -33, -28, -5, -7, 0, 0, -7, -5, -28, -21, -7, 9, 7, 7, 9, -7, -21, -14, 0, 7, 23, 23, 7, 0, -14, -14, 0, 7, 23, 23, 7, 0, -14, -21, -7, 9, 7, 7, 9, -7, -21, -28, -5, -7, 0, 0, -7, -5, -28, -33, -28, -21, -14, -14, -21, -28, -33};
const int pstBishopEg[64] = {-30, -20, -15, -10, -10, -15, -20, -30, -20, -10, -5, 0, 0, -5, -10, -20, -15, -5, 0, 5, 5, 0, -5, -15, -10, 0, 5, 10, 10, 5, 0, -10, -10, 0, 5, 10, 10, 5, 0, -10, -15, -5, 0, 5, 5, 0, -5, -15, -20, -10, -5, 0, 0, -5, -10, -20, -30, -20, -15, -10, -10, -15, -20, -30};

const int pstRookMg[64] = {-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, 4, 0, -4, -8};
const 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, 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};

const int pstQueenMg[64] = {-30, -20, -15, -10, -10, -15, -20, -30, -20, -10, -5, 0, 0, -5, -10, -20, -15, -5, 0, 5, 5, 0, -5, -15, -10, 0, 5, 10, 10, 5, 0, -10, -10, 0, 5, 10, 10, 5, 0, -10, -15, -5, 0, 5, 5, 0, -5, -15, -20, -10, -5, 0, 0, -5, -10, -20, -30, -20, -15, -10, -10, -15, -20, -30};
const int pstQueenEg[64] = {-84, -56, -42, -28, -28, -42, -56, -84, -56, -28, -14, 0, 0, -14, -28, -56, -42, -14, 0, 14, 14, 0, -14, -42, -28, 0, 14, 28, 28, 14, 0, -28, -28, 0, 14, 28, 28, 14, 0, -28, -42, -14, 0, 14, 14, 0, -14, -42, -56, -28, -14, 0, 0, -14, -28, -56, -84, -56, -42, -28, -28, -42, -56, -84};

const int pstKingMg[64] = {-12, -8, -6, -4, -4, -6, -8, -12, -8, -4, -2, 0, 0, -2, -4, -8, -6, -2, 0, 2, 2, 0, -2, -6, -4, 0, 2, 4, 4, 2, 0, -4, -4, 0, 2, 4, 4, 2, 0, -4, -6, -2, 0, 2, 2, 0, -2, -6, -8, -4, -2, 0, 0, -2, -4, -8, -12, -8, -6, -4, -4, -6,-8, -12};
const int pstKingEg[64] = {-84, -56, -42, -28, -28, -42, -56, -84, -56, -28, -14, 0, 0, -14, -28, -56, -42, -14, 0, 14, 14, 0, -14, -42, -28, 0, 14, 28, 28, 14, 0, -28, -28, 0, 14, 28, 28, 14, 0, -28, -42, -14, 0, 14, 14, 0, -14, -42, -56, -28, -14, 0,  0, -14, -28, -56, -84, -56, -42, -28, -28, -42, -56, -84};
Thomas...

=======
http://macechess.blogspot.com - iCE Chess Engine
User avatar
Steve Maughan
Posts: 1271
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: Piece/square table challenge

Post by Steve Maughan »

Hi Thomas,

Your king values for the middle game are all negative for the back rank - is this intended, or sensible? They seem to encourage some centralization of the king from the start.

Steve
http://www.chessprogramming.net - Juggernaut & Maverick Chess Engine
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Piece/square table challenge

Post by tpetzke »

Hi Steve,

The midgame piece square tables for the king are not used until the enemy material drops below a certain threshold

Code: Select all

if (evalbb.nonPawnMaterial[enemySide] < values::KING_TO_CENTER_THRESHOLD) 
{
	scoreMG += values::PSQ[PIECE<side>::KING][kSq].mg;
}
Then they enable a smoother transition to the endgame values where centralization is valued very strong.
Thomas...

=======
http://macechess.blogspot.com - iCE Chess Engine
User avatar
Rebel
Posts: 7298
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Piece/square table challenge

Post by Rebel »

tpetzke wrote:

Code: Select all

#define PAWN_VAL 100
#define KNIGHT_VAL 454
#define BISHOP_VAL 475
#define ROOK_VAL 646
#define QUEEN_VAL 1631 
Why is the queen value (16 pawns) so high?
User avatar
Rebel
Posts: 7298
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Piece/square table challenge

Post by Rebel »

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?

Last, in mine I have 2 extra tables, one extra pawn PST when castled long and a midgame to endgame transition King PST when queens are off but still too much material to evaluate from "Eg". The King in these cases is allowed to move to the 3th row only.