Best values for wood?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Dann Corbit
Posts: 12608
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Best values for wood?

Post by Dann Corbit »

I wonder what the currently accepted best values for chess pieces are.
I did some internet searches and got wildly varying answers including knights less than a pawn from a rook value here:
https://royalchessmall.com/blogs/blog/u ... eces-value

So I am wondering, what is a good, logical set of values for chessmen?

I want to do SQL queries based on wood imbalance. I currently have a super primitive SQL call to estimate the values, but I am not at all satisfied that it is correct:

Code: Select all

USE [Chess]
GO
/****** Object:  UserDefinedFunction [dbo].[Imbalance]    Script Date: 3/27/2024 10:16:07 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[Imbalance](@Epd varchar(1024))
RETURNS float
AS
BEGIN
    DECLARE @WhiteQueens float;
    DECLARE @BlackQueens float;
    DECLARE @WhiteRooks float;
    DECLARE @BlackRooks float;
    DECLARE @WhiteBishops float;
    DECLARE @BlackBishops float;
    DECLARE @WhiteKnights float;
    DECLARE @BlackKnights float;
    DECLARE @WhitePawns float;
    DECLARE @BlackPawns float;
    DECLARE @imb float;
    SET  @WhiteQueens = LEN(@Epd) - LEN(REPLACE(@Epd, 'Q', ''));
    SET  @BlackQueens = LEN(@Epd) - LEN(REPLACE(@Epd, 'q', ''));
    SET  @WhiteRooks = LEN(@Epd) - LEN(REPLACE(@Epd, 'R', ''));
    SET  @BlackRooks = LEN(@Epd) - LEN(REPLACE(@Epd, 'r', ''));
    SET  @WhiteBishops = LEN(@Epd) - LEN(REPLACE(@Epd, 'B', ''));
    SET  @BlackBishops = LEN(@Epd) - LEN(REPLACE(@Epd, 'b', ''));
    SET  @WhiteKnights = LEN(@Epd) - LEN(REPLACE(@Epd, 'N', ''));
    SET  @BlackKnights = LEN(@Epd) - LEN(REPLACE(@Epd, 'n', ''));
    SET  @WhitePawns = LEN(@Epd) - LEN(REPLACE(@Epd, 'P', ''));
    SET  @BlackPawns = LEN(@Epd) - LEN(REPLACE(@Epd, 'p', ''));
    SET @imb = @WhiteQueens*10.0 - @WhiteQueens*10.0 + @WhiteRooks * 5.25 - @BlackRooks * 5.25 + @WhiteBishops * 3.5 - @BlackBishops * 3.5 + @WhiteKnights * 3.75 - @BlackKnights * 3.75 + @WhitePawns * 1.0 - @BlackPawns * 1.0 ;
    RETURN(@imb);
END;
Obviously, something much more sophisticated could be done but I want to start simple.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Dann Corbit
Posts: 12608
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Best values for wood?

Post by Dann Corbit »

Just added an embarrassingly obvious optimization:

Code: Select all

USE [Chess]
GO
/****** Object:  UserDefinedFunction [dbo].[Imbalance]    Script Date: 3/27/2024 10:20:25 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[Imbalance](@Epd varchar(1024))
RETURNS float
AS
BEGIN
    DECLARE @origialLength int;
    DECLARE @WhiteQueens float;
    DECLARE @BlackQueens float;
    DECLARE @WhiteRooks float;
    DECLARE @BlackRooks float;
    DECLARE @WhiteBishops float;
    DECLARE @BlackBishops float;
    DECLARE @WhiteKnights float;
    DECLARE @BlackKnights float;
    DECLARE @WhitePawns float;
    DECLARE @BlackPawns float;
    DECLARE @imb float;
    SET  @origialLength = LEN(@Epd);
    SET  @WhiteQueens = @origialLength - LEN(REPLACE(@Epd, 'Q', ''));
    SET  @BlackQueens = @origialLength - LEN(REPLACE(@Epd, 'q', ''));
    SET  @WhiteRooks = @origialLength - LEN(REPLACE(@Epd, 'R', ''));
    SET  @BlackRooks = @origialLength - LEN(REPLACE(@Epd, 'r', ''));
    SET  @WhiteBishops = @origialLength - LEN(REPLACE(@Epd, 'B', ''));
    SET  @BlackBishops = @origialLength - LEN(REPLACE(@Epd, 'b', ''));
    SET  @WhiteKnights = @origialLength - LEN(REPLACE(@Epd, 'N', ''));
    SET  @BlackKnights = @origialLength - LEN(REPLACE(@Epd, 'n', ''));
    SET  @WhitePawns = @origialLength - LEN(REPLACE(@Epd, 'P', ''));
    SET  @BlackPawns = @origialLength - LEN(REPLACE(@Epd, 'p', ''));
    SET @imb = @WhiteQueens*10.0 - @WhiteQueens*10.0 + @WhiteRooks * 5.25 - @BlackRooks * 5.25 + @WhiteBishops * 3.5 - @BlackBishops * 3.5 + @WhiteKnights * 3.75 - @BlackKnights * 3.75 + @WhitePawns * 1.0 - @BlackPawns * 1.0 ;
    RETURN(@imb);
END;
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Ajedrecista
Posts: 1985
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Best values for wood?

Post by Ajedrecista »

Hello Dann:
Dann Corbit wrote: Wed Mar 27, 2024 6:18 pmI wonder what the currently accepted best values for chess pieces are.
[...]
I guess that there will be multiple values that can be valid, all within some ranges. Are you aware of this CPW article?

Point Value by Regression Analysis

It contains valuable info and links to some threads at TalkChess, including regressions for 234 players made by me with a third-party tool:

Results of 234 players.

I see that you posted on that thread, but it was almost nine years ago.

Good luck with your research!

Regards from Spain.

Ajedrecista.
Mike Sherwin
Posts: 871
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Best values for wood?

Post by Mike Sherwin »

I do not think that there is a one size fits all answer. For example a knight can be worth less than 3 pawns in some situations and worth more than a rook in other situations. If I'm going for a best generalization that is optimal say 80% of the time and that is just a guess I'd use the values.

Pawn = 100
Knight = 290
Bishop = 320
Rook = 450
Queen = 850

But that is just what I will be trying next.
Dann Corbit
Posts: 12608
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Best values for wood?

Post by Dann Corbit »

I forgot about that regression program.
I ran it on some chess PGN data sets:

Code: Select all

Reading file: E:\lichess\lichess.pgn
Games: 8139424
Created file: E:\lichess\lichess.mat
Loading dataset...
[ 34674364 x 5 ]
Solving (gradient method)...
Iter 0: [ 0 0 0 0 0 ] -> 0.693147
Iter 1000: [ 0.332915 0.742756 0.809699 1.2125 2.20111 ] -> 0.653341
Iter 2000: [ 0.333204 0.74502 0.812028 1.21605 2.21198 ] -> 0.653341
Iter 3000: [ 0.333206 0.745036 0.812044 1.21607 2.21206 ] -> 0.653341
Iter 4000: [ 0.333206 0.745036 0.812044 1.21607 2.21206 ] -> 0.653341
Iter 5000: [ 0.333206 0.745036 0.812044 1.21607 2.21206 ] -> 0.653341
Iter 6000: [ 0.333206 0.745036 0.812044 1.21607 2.21206 ] -> 0.653341
Iter 7000: [ 0.333206 0.745036 0.812044 1.21607 2.21206 ] -> 0.653341
Iter 8000: [ 0.333206 0.745036 0.812044 1.21607 2.21206 ] -> 0.653341
Iter 9000: [ 0.333206 0.745036 0.812044 1.21607 2.21206 ] -> 0.653341
Iter 10000: [ 0.333206 0.745036 0.812044 1.21607 2.21206 ] -> 0.653341

PIECE VALUES:

Pawn:   100
Knight: 223.596
Bishop: 243.706
Rook:   364.962
Queen:  663.871
Press ENTER to finish

Reading file: E:\scid-db\corr.pgn
Games: 2022463
Created file: E:\scid-db\corr.mat
Loading dataset...
[ 7337310 x 5 ]
Solving (gradient method)...
Iter 0: [ 0 0 0 0 0 ] -> 0.693147
Iter 1000: [ 0.346917 0.735908 0.984901 1.25984 2.6504 ] -> 0.661995
Iter 2000: [ 0.351692 0.767733 1.01839 1.31568 2.83246 ] -> 0.661939
Iter 3000: [ 0.352124 0.770603 1.02141 1.32072 2.84897 ] -> 0.661939
Iter 4000: [ 0.352164 0.770869 1.02169 1.32119 2.8505 ] -> 0.661939
Iter 5000: [ 0.352168 0.770894 1.02172 1.32123 2.85064 ] -> 0.661939
Iter 6000: [ 0.352169 0.770896 1.02172 1.32124 2.85066 ] -> 0.661939
Iter 7000: [ 0.352169 0.770896 1.02172 1.32124 2.85066 ] -> 0.661939
Iter 8000: [ 0.352169 0.770896 1.02172 1.32124 2.85066 ] -> 0.661939
Iter 9000: [ 0.352169 0.770896 1.02172 1.32124 2.85066 ] -> 0.661939
Iter 10000: [ 0.352169 0.770896 1.02172 1.32124 2.85066 ] -> 0.661939

PIECE VALUES:

Pawn:   100
Knight: 218.9
Bishop: 290.122
Rook:   375.171
Queen:  809.458
Press ENTER to finish

Reading file: k:\pgn\tcec\seasons\24\24x.pgn
Games: 2269
Created file: k:\pgn\tcec\seasons\24\24x.mat
Loading dataset...
[ 15032 x 5 ]
Solving (gradient method)...
Iter 0: [ 0 0 0 0 0 ] -> 0.693147
Iter 1000: [ 0.653573 1.70921 2.00095 2.76326 5.50104 ] -> 0.513966
Iter 2000: [ 0.666286 1.78376 2.07829 2.87896 5.80115 ] -> 0.513805
Iter 3000: [ 0.667673 1.79186 2.0867 2.89155 5.83386 ] -> 0.513803
Iter 4000: [ 0.667829 1.79278 2.08765 2.89297 5.83756 ] -> 0.513803
Iter 5000: [ 0.667847 1.79288 2.08775 2.89313 5.83798 ] -> 0.513803
Iter 6000: [ 0.667849 1.79289 2.08777 2.89315 5.83803 ] -> 0.513803
Iter 7000: [ 0.667849 1.7929 2.08777 2.89315 5.83803 ] -> 0.513803
Iter 8000: [ 0.667849 1.7929 2.08777 2.89315 5.83803 ] -> 0.513803
Iter 9000: [ 0.667849 1.7929 2.08777 2.89315 5.83803 ] -> 0.513803
Iter 10000: [ 0.667849 1.7929 2.08777 2.89315 5.83803 ] -> 0.513803

PIECE VALUES:

Pawn:   100
Knight: 268.458
Bishop: 312.611
Rook:   433.204
Queen:  874.154
Press ENTER to finish

Reading file: k:\pgn\tcec\seasons\24\Division_P.pgn
Games: 224
Created file: k:\pgn\tcec\seasons\24\Division_P.mat
Loading dataset...
[ 1500 x 5 ]
Solving (gradient method)...
Iter 0: [ 0 0 0 0 0 ] -> 0.693147
Iter 1000: [ 0.644742 1.49349 2.15132 3.49964 6.32484 ] -> 0.498818
Iter 2000: [ 0.67971 1.6429 2.31273 3.78386 7.05179 ] -> 0.498022
Iter 3000: [ 0.687113 1.6744 2.34686 3.84404 7.20489 ] -> 0.497987
Iter 4000: [ 0.688775 1.68146 2.35452 3.85755 7.23924 ] -> 0.497985
Iter 5000: [ 0.689152 1.68307 2.35626 3.86062 7.24704 ] -> 0.497985
Iter 6000: [ 0.689238 1.68343 2.35665 3.86132 7.24882 ] -> 0.497985
Iter 7000: [ 0.689258 1.68352 2.35674 3.86148 7.24923 ] -> 0.497985
Iter 8000: [ 0.689263 1.68354 2.35676 3.86152 7.24932 ] -> 0.497985
Iter 9000: [ 0.689264 1.68354 2.35677 3.86153 7.24934 ] -> 0.497985
Iter 10000: [ 0.689264 1.68354 2.35677 3.86153 7.24934 ] -> 0.497985

PIECE VALUES:

Pawn:   100
Knight: 244.252
Bishop: 341.926
Rook:   560.24
Queen:  1051.75
Press ENTER to finish

Reading file: k:\pgn\tcec\seasons\24\Superfinal.pgn
Games: 100
Created file: k:\pgn\tcec\seasons\24\Superfinal.mat
Loading dataset...
[ 645 x 5 ]
Solving (gradient method)...
Iter 0: [ 0 0 0 0 0 ] -> 0.693147
Iter 1000: [ 0.899633 1.5995 1.95944 1.45137 5.65143 ] -> 0.493338
Iter 2000: [ 0.906217 1.68424 2.0433 1.57884 6.66308 ] -> 0.492222
Iter 3000: [ 0.908093 1.70943 2.06827 1.6171 7.19832 ] -> 0.491927
Iter 4000: [ 0.908921 1.7208 2.07955 1.63446 7.55403 ] -> 0.491799
Iter 5000: [ 0.909378 1.72715 2.08585 1.64419 7.81748 ] -> 0.491729
Iter 6000: [ 0.909665 1.73116 2.08984 1.65035 8.02523 ] -> 0.491686
Iter 7000: [ 0.909861 1.73392 2.09258 1.65459 8.19587 ] -> 0.491656
Iter 8000: [ 0.910003 1.73593 2.09457 1.65767 8.34006 ] -> 0.491636
Iter 9000: [ 0.91011 1.73745 2.09608 1.66001 8.4645 ] -> 0.49162
Iter 10000: [ 0.910194 1.73864 2.09726 1.66184 8.57362 ] -> 0.491608

PIECE VALUES:

Pawn:   100
Knight: 191.019
Bishop: 230.419
Rook:   182.581
Queen:  941.956
Press ENTER to finish

Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Dann Corbit
Posts: 12608
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Best values for wood?

Post by Dann Corbit »

Averaging gives 100 for pawn and:
select ( 223.596+ 218.9 +268.458+ 244.252+ 191.019 )/5 ; 229 knight
select ( 243.706+ 290.122+312.611+ 341.926+ 230.419 )/5 ; 284 bishop
select ( 364.962+ 375.171+433.204+ 560.24 + 182.581 )/5 ; 383 rook
select ( 663.871+ 809.458+874.154+ 1051.75+ 941.956 )/5 ; 868 queen
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Cumnor
Posts: 107
Joined: Fri Jan 27, 2012 4:23 pm
Location: Cumnor, Oxford, UK
Full name: Kevin D Plant

Re: Best values for wood?

Post by Cumnor »

Deep Mind estimated Alpha Zero piece values as :

Pawn = 100
Knight = 305
Bishop = 333
Rook = 563
Queen = 950
Moderator of Rybka forum (Site no longer active)
Admin of Infinitychess playing server and Forum (Site suspended, maybe be back in the Future)
Dann Corbit
Posts: 12608
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Best values for wood?

Post by Dann Corbit »

That's interesting. I guess to know which set is best one would need a thousand games at the desired time control for each proposed set to find out.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
chrisw
Posts: 4348
Joined: Tue Apr 03, 2012 4:28 pm

Re: Best values for wood?

Post by chrisw »

That reminds me of an experiment I did once, possibly the source is on GitHub.

The idea was to use piece value regression analysis on the (move, score) put out by an engine, as you’ve done it. Except, for each engine under test, you give it 10,000 positions split up into 8 game phases and get the PNBRQ piece value for each phase.
Graph the five pieces against phase.
Just for one engine that gave really interesting data.

For multiple engines one could then compare the graph shape wrt phase, and, I think, though I never published it, determine how similar various engines (looking just at the nnue ones) were. One could even hazard quite good guesses at which engine datasets were used to generate the various nnues.
Dann Corbit
Posts: 12608
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Best values for wood?

Post by Dann Corbit »

I have a theory that if you could search deep enough, all the piece values would become zero.
The values are a static tag we stick on them because of the strength of their movement and the board control that implies.
If we search deeply enough, we no longer need the static tag.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.