What are good ranges for positional values of the pieces?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

What are good ranges for positional values of the pieces?

Post by Michael Sherwin »

I just have no clue about this. If the positional value for the pieces (N,B,R,Q) bottom out at zero then what should their max value be in the various stages of the game--opening, middlegame, endgame--and for--conservative, balanced, aggressive--or is this a secret also. :P

Anyway, some advice on this may save me :D (and others :) ) hundreds of hours of testing to find out. 8-)

Thanks!
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
User avatar
Bill Rogers
Posts: 3562
Joined: Thu Mar 09, 2006 3:54 am
Location: San Jose, California

Re: What are good ranges for positional values of the pieces

Post by Bill Rogers »

I can not say just how true this is but after examining dozens of source codes where players use positional points the highest number that I have seen for the center squares is about 30 to 35 for all pieces. Some programs give pawns more points as they progress towards the enemies back row and some give points according to how close a man is to the enemies king (rank and file).
Bill
grant
Posts: 67
Joined: Mon Aug 06, 2007 4:42 pm
Location: London, England

Re: What are good ranges for positional values of the pieces

Post by grant »

Hi

If you use the Scid database program with about a million IM and GM games, you can determine where the pieces go (in general) through each stage of the game. The knight, for example, will head towards the centre and very rarely to the edge or corner.

Grant
Harald
Posts: 318
Joined: Thu Mar 09, 2006 1:07 am

Re: What are good ranges for positional values of the pieces

Post by Harald »

Michael Sherwin wrote:I just have no clue about this. If the positional value for the pieces (N,B,R,Q) bottom out at zero then what should their max value be in the various stages of the game--opening, middlegame, endgame--and for--conservative, balanced, aggressive--or is this a secret also. :P
I have no good answer, just some thoughts.

- The piece square tables could be in the range -10 to 30 centipawns.
With value 0 at opening squares or common squares after a typical opening.

- What material would you sacrifice to get the positional advantage or
what material would your opponent sacrifice to prevent it?

- I have a lot of small values in the range of +- 5 to support small improvements.
some of them may increase to +-50 if there are supporting conditions.
Typical examples are double pawns (-50), rooks on open lines (+5..+10)
or pawns supporting pawns (+1..+3)

- Some of the values depend on the game stage. In my engine I use
individual tables when calculating it, like value += some_bonus[stage];
with stage in the range 0 (opening) to 7 (middlegame starts) to 13 (late endgame).
Others interpolate between two values depending on material.

- Passed pawns may get a positional bonus like (Q-P)*prob*prob,
where prob is the probability for the new queen to survive.
That is 0 to 800. In reality I do not calculate this probability but use some
values from tables and modify them depending on various facts.

- King safety is also low (0 to 30 centipawns) until some dangers are combined.
Then it can explode progressively to 1000 cp.

- Without passed pawns and king safety life would be easy. All the positional
values of all pieces of both players should not exceed 200 cp. This could
be used in the search as margin around alpha or beta for pruning.

- The values given above are not the real values in my engine but what I
consider good while writing now. If you think I am wrong somewhere
please tell me.

Harald
Ryan Benitez
Posts: 719
Joined: Thu Mar 09, 2006 1:21 am
Location: Portland Oregon

Re: What are good ranges for positional values of the pieces

Post by Ryan Benitez »

Not easy to answer really. Piece values are just a starting spot on what the pieces value might be based on how much of the board the piece can potentially affect. For example most people would say based on statistics that knights are worth more with more pawns on the board. Maybe the important question is why and to address the reason why. We know knights are able to maneuver around and over pawns when other pieces can not. This sounds like a mobility issue. So by this logic the knight is not really worth more with pawns it is the other pieces that are worth less because the pawns are affecting the long term mobility of the other pieces more than the knights. Now if we had a good way of detecting potential mobility of a piece we would be able to judge better how weak or strong it is then just adjusting score based on how many pawns are on the board.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: What are good ranges for positional values of the pieces

Post by Michael Sherwin »

Thanks for the answears! I hope that more authors will give their opinions on this as it seems that this aspect of the eval is not very well understood. If the max values are too high then they can accumulate to induce bad sacrifices and if they are too low then good sacrifices would be overlooked. It would seem that not only the contribution of indivigual pieces should be limited, but, also the total accumulated positional eval should also be limited.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Aleks Peshkov
Posts: 892
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia

Re: What are good ranges for positional values of the pieces

Post by Aleks Peshkov »

Harald wrote:- Without passed pawns and king safety life would be easy. All the positional values of all pieces of both players should not exceed 200 cp. This could be used in the search as margin around alpha or beta for pruning.
Kaissa's team adviced that no sum of simple positional factors should exceed material margin. It was 50 cp in their piece evaluation: 100-350-350-500-1000.
MartinBryant

Re: What are good ranges for positional values of the pieces

Post by MartinBryant »

I may not be interpreting your sentence correctly but by "bottoming out at zero", do you mean that you never give a piece a -ve positional score???
Surely that's not right?
Colossus often gives 'bad' pieces an overall -ve postional score (of course that may be no recommendation) :lol:
e.g. a rook on h8 with a king on g8 gets -50 and it probably has no mobility so that's it.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: What are good ranges for positional values of the pieces

Post by Michael Sherwin »

MartinBryant wrote:I may not be interpreting your sentence correctly but by "bottoming out at zero", do you mean that you never give a piece a -ve positional score???
Surely that's not right?
Colossus often gives 'bad' pieces an overall -ve postional score (of course that may be no recommendation) :lol:
e.g. a rook on h8 with a king on g8 gets -50 and it probably has no mobility so that's it.
Well I was just trying to simplify the concept. I tried limiting the values that each piece can have and that does not seem to work as information is lost. I am now thinking that choosing the ranges of the modifiers so that they will not exceed a maximum set value is the most correct. I think that negative values are best for special cases like the one you mentioned. For the most part though I prefer to not have negative values.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: What are good ranges for positional values of the pieces

Post by wgarvin »

If you don't have any negative values, the average value of that piece (for some probability distribution of that type of piece over the squares) will be higher than the base value of the piece.

It might be better to try and balance the values so that some squares have bonuses and other squares have penalties, and the average of them across a large number of typical positions is around zero?