Stockfish's High Evaluation before Mate Score Announced...

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Stockfish's High Evaluation before Mate Score Announced...

Post by Steve Maughan »

When Stockfish is close to a mate announcement its score starts to climb high. The "score" on a pawn scale can reach +50 or even +100 pawns for the side which is ahead.

My question is...

At a high level what is driving the score so high? It can't be material - there are only ~40 pawns worth of material on the board. It must be some positional terms. Yet I find it hard to believe positional terms could climb so high.

Anyone with a high level explanation?

Thanks - Steve
http://www.chessprogramming.net - Maverick Chess Engine
D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Re: Stockfish's High Evaluation before Mate Score Announced.

Post by D Sceviour »

Steve Maughan wrote:When Stockfish is close to a mate announcement its score starts to climb high. The "score" on a pawn scale can reach +50 or even +100 pawns for the side which is ahead.

My question is...

At a high level what is driving the score so high? It can't be material - there are only ~40 pawns worth of material on the board. It must be some positional terms. Yet I find it hard to believe positional terms could climb so high.

Anyone with a high level explanation?

Thanks - Steve
Stockfish scores queen contact safety very high. Queen contact is very dangerous.
mkchan
Posts: 88
Joined: Thu Oct 06, 2016 9:17 pm
Location: India

Re: Stockfish's High Evaluation before Mate Score Announced.

Post by mkchan »

Pretty sure it's their king safety evaluation, not so sure if it's only due to queen contact check. From their code i can see some huge multipliers that could easily cause this(also their phased evaluation of the king safety)
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Stockfish's High Evaluation before Mate Score Announced.

Post by velmarin »

Make position in console Stockfish.
Type "eval". :wink:
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: Stockfish's High Evaluation before Mate Score Announced.

Post by elcabesa »

Stockfish use big values to encode checkmate or won endgame. So when the search is near a checkmate or won endgame the search report very high values
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Stockfish's High Evaluation before Mate Score Announced.

Post by syzygy »

Steve Maughan wrote:At a high level what is driving the score so high?
Those very high scores that you see are probably fail-highs. So they do not actually correspond to the evaluation score of the node at the end of the PV.
User avatar
Eelco de Groot
Posts: 4564
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Stockfish's High Evaluation before Mate Score Announced.

Post by Eelco de Groot »

syzygy wrote:
Steve Maughan wrote:At a high level what is driving the score so high?
Those very high scores that you see are probably fail-highs. So they do not actually correspond to the evaluation score of the node at the end of the PV.
I'm not sure but I think actual values, not Fail Highs I see are up to about 128. And this depends on PawnValueEg because of conversion of internal score to pawns

Eval scores that are not mate (Mate is only scored by search when in check but no moves) have to remain at least below below mate at maximum horizon = VALUE_MATE adjusted for maximum depth = VALUE_MATE_IN_MAX_PLY = VALUE_MATE - 2 * MAX_PLY = 32000 - 2* 128 = 31744

divided by PawnValueEg = 248 gives 128

Here is a sample output with high scores:

[D]4k3/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQ -


30 535:49 +M18 1.e3 g6 2.Qg4 a5 3.Nc3 e6 4.Qd4 a4 5.Qxa4 g5 6.Qa8+ Ke7 7.Qxb7 Kd8 8.Qb8+ Ke7 9.Qxc7 g4 10.Qc5+ Ke8 11.Qd6 f5 12.Bb5 Kf7 13.Qxd7+ Kf6 14.Qxh7 (577.606.622.382) 17966
30 535:49 +M18 1.d4 h6 2.Qd3 f6 3.Qc4 e6 4.Qxc7 a6 5.Qxb7 Ke7 6.Nc3 g5 7.Qxa6 Kd8 8.Qd6 f5 9.Qb8+ Ke7 10.Qa7 g4 11.Bxh6 f4 12.O-O-O g3 13.fxg3 fxg3 14.hxg3 (577.606.622.382) 17966
30 535:49 +M19 1.e4 g6 2.Qf3 c6 3.Qc3 d6 4.Qh8+ Kd7 5.Qxh7 f6 6.Qxg6 a5 7.Qf5+ Kc7 8.Qxa5+ Kd7 9.Qa8 Kc7 10.Qe8 e5 11.Qe7+ Kb6 12.Qxd6 Ka7 13.Qxf6 Kb8 14.d4 (577.606.622.382) 17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.Nf3 f6 13.Nxh4 Ke6 14.Qc4+ (577.606.622.382) 17966
29 535:49 +42.02 1.h3 g6 2.e3 f6 3.Qg4 Kd8 4.Bd3 d5 5.Qh4 d4 6.Qxd4+ Kc8 7.Qxa7 c6 8.Qa8+ Kc7 9.Qe8 e5 10.Qe7+ Kc8 11.Qxf6 e4 12.Bxe4 Kc7 13.Qe7+ Kc8 14.Qd6 (577.606.622.382) 17966
29 535:49 +41.91 1.a3 h5 2.e3 g6 3.Qf3 c6 4.Qf4 d6 5.Qd4 Kd7 6.Qxa7 Kc8 7.Qa8+ Kc7 8.Qe8 e5 9.Qxf7+ Kb6 10.Qxg6 d5 11.Qxh5 e4 12.Qe5 Ka7 13.Qe7 Ka8 14.Qf8+ (577.606.622.382) 17966
29 535:49 +41.11 1.d3 g6 2.e3 h5 3.Qf3 c6 4.Qf4 d6 5.Qh6 b5 6.Qg7 f6 7.Qxg6+ Kd8 8.Qxh5 b4 9.Qa5+ Ke8 10.Qxb4 a5 11.Qxa5 c5 12.Qa7 e6 13.Nc3 Kf8 14.Qb6 (577.606.622.382) 17966
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan