The Xiphos Material Evaluator

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
D Sceviour
Posts: 441
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

The Xiphos Material Evaluator

Post by D Sceviour » Mon Nov 05, 2018 10:05 pm

I spent a lot of frustrating time on the previous version of Schooner with Texel's tuning, and got no elo change. This inspired me to start again with another evaluator. The simplicity of the Xiphos material evaluation is stunning:

pawn value = 100
knight value = 310
bishop value = 330
rook value = 500
queen value = 1000

That's it! There is nothing to tune. The basic formula for piece values was proposed in 1958 by Larry Evans in his book "New Ideas In Chess". It has changed little since.

Compare this with the obscure imbalance formula used by Bob Hyatt in Crafty, or the esoteric quadratic formula use by Stockfish. There is a lesson to learn from beginning programmers to the Stockfish team. You do not need a fancy material formula to have a strong 3000+ engine. There is a temptation to want to change and improve on the formula. However, remember the advice of Robert Fischer when asked the secret of finding good moves - "Sit on your hands".

mar
Posts: 1986
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: The Xiphos Material Evaluator

Post by mar » Tue Nov 06, 2018 8:12 am

So you tuned what exactly with Texel method? Piece values or imbalance?

"There is nothing to tune." really?! Then you must have some unknown source of elo, sitting on your hands and improving :D

I was out of luck with imbalance but for everything else Texel tuning worked extremely well.
Martin Sedlak

D Sceviour
Posts: 441
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: The Xiphos Material Evaluator

Post by D Sceviour » Tue Nov 06, 2018 11:16 am

mar wrote:
Tue Nov 06, 2018 8:12 am
I was out of luck with imbalance but for everything else Texel tuning worked extremely well.
Texel tuning was useful for exposing bad patches. For example, Texel tuning did not like a formula for Kaufman's redundant rook. It gave oscillating values between 500 and -500. Maybe the formula was wrong, but it was deleted it anyway.

Joost Buijs
Posts: 925
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: The Xiphos Material Evaluator

Post by Joost Buijs » Tue Nov 06, 2018 1:06 pm

In my experience Texel tuning works extremely well, especially for tuning the material values.
The only thing that gave me some trouble was the king-attack-multiplier table which is nonlinear in my program.
For my program I found the following piece values to be optimal, of course they also depend upon the PSQ and other position values.

Code: Select all

// midgame
int valuePawnMG   =   85;
int valueKnightMG =  353;
int valueBishopMG =  352;
int valueRookMG   =  477;
int valueQueenMG  =  913;

// endgame								
int valuePawnEG   =  115;
int valueKnightEG =  285;
int valueBishopEG =  316;
int valueRookEG   =  556;
int valueQueenEG  = 1185;
The only thing that strikes me is that a queen seems to be worth 2 rooks + 0.63 pawn near the endgame, I always thought that 2 rooks were a little bit stronger than a queen near the endgame. Of course it also depends upon the positions you use for the tuning process.

tomitank
Posts: 199
Joined: Sat Mar 04, 2017 11:24 am
Location: Hungary

Re: The Xiphos Material Evaluator

Post by tomitank » Tue Nov 06, 2018 2:36 pm

D Sceviour wrote:
Mon Nov 05, 2018 10:05 pm
I spent a lot of frustrating time on the previous version of Schooner with Texel's tuning, and got no elo change. This inspired me to start again with another evaluator. The simplicity of the Xiphos material evaluation is stunning:

pawn value = 100
knight value = 310
bishop value = 330
rook value = 500
queen value = 1000

That's it! There is nothing to tune. The basic formula for piece values was proposed in 1958 by Larry Evans in his book "New Ideas In Chess". It has changed little since.

Compare this with the obscure imbalance formula used by Bob Hyatt in Crafty, or the esoteric quadratic formula use by Stockfish. There is a lesson to learn from beginning programmers to the Stockfish team. You do not need a fancy material formula to have a strong 3000+ engine. There is a temptation to want to change and improve on the formula. However, remember the advice of Robert Fischer when asked the secret of finding good moves - "Sit on your hands".
The other parameters compensate the values. eg: PST, Mobility etc.
For example:
if you use a separate value (material) in the end game, they would get similar results, because the other parameters compensate that.

jdart
Posts: 3803
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: The Xiphos Material Evaluator

Post by jdart » Tue Nov 06, 2018 2:43 pm

I have fixed piece values and they are not very different from the ones quoted here.
But I have a lot of adjustments on top of those: for example, a "trade down" term that encourages trades of pieces when ahead, and a bunch of special-case endgame code that evaluates piece configurations when low in material.

--Jon

D Sceviour
Posts: 441
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: The Xiphos Material Evaluator

Post by D Sceviour » Tue Nov 06, 2018 2:58 pm

jdart wrote:
Tue Nov 06, 2018 2:43 pm
I have fixed piece values and they are not very different from the ones quoted here.
But I have a lot of adjustments on top of those: for example, a "trade down" term that encourages trades of pieces when ahead, and a bunch of special-case endgame code that evaluates piece configurations when low in material.
That is a weakness of the Xiphos material values. They do not consider endgame imbalances. For endgame, there is an examination of specific material imbalance which equate to forced draw. Even though simple, everyone seems to be pleased with Schooner's understanding of the endgame. This was also faster than interrupting the evaluator with an EGTB WDL probe.

KK
KNK
KBK
KNKP
KBKP
KNNK
KRKN
KRKB
KBBKB
KRNKR
KRBKR
KBNKB
KBNKN
KBNKR

jdart
Posts: 3803
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: The Xiphos Material Evaluator

Post by jdart » Tue Nov 06, 2018 6:18 pm

IMO you have to look not just at forced draws but also consider that some configurations with pawns might be hard to win or could be exchanged down into a drawn ending. See adjustMaterialScore in https://github.com/jdart1/arasan-chess/ ... coring.cpp.

--Jon

Daniel Anulliero
Posts: 683
Joined: Fri Jan 04, 2013 3:55 pm
Location: Nice

Re: The Xiphos Material Evaluator

Post by Daniel Anulliero » Wed Nov 07, 2018 9:13 am

Hi
I run à "just to see" test , games at STC 1'+ 250 ms between Isa 2.0.64 and a dev version with xiphos material values .
I stopped after 120 games and -50 elo for the de one .

User avatar
hgm
Posts: 23455
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: The Xiphos Material Evaluator

Post by hgm » Wed Nov 07, 2018 12:00 pm

D Sceviour wrote:
Mon Nov 05, 2018 10:05 pm
Compare this with the obscure imbalance formula used by Bob Hyatt in Crafty, or the esoteric quadratic formula use by Stockfish.
Now try who it thinks is ahead with 3 Queens vs 7 Knights. :lol:

Having the value of all pieces go up towards the end-game is a simple and usuful method for encouraging piece trading when ahead. Trading Pawns should not be considered advancing the game phase, however. Actually more the opposite.

It is important to not only score KRNKR as draw, but also KRNKRP. Otherwise the engine will happily trade into KRNKRP (e.g. from KRNPPKRNP) and think it is OK as long as it refrains from capturing the last Pawn.

Post Reply