Stockfish 1.6 - does not recongnize a lost pawn endgame

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

pgeorges

Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by pgeorges »

In the following position, Stockfish sets the score to draw (0.0). Any player see in half second it is lost for white (and other engines also). I think Stockfish does not get that there is a far pawn on the side, which nearly always lead to a win by decoying the opponent king.

[d]8/6p1/2p4p/pp2k3/P7/2PK2P1/7P/8 w KQkq - 0 1

Pascal Georges
User avatar
George Tsavdaris
Posts: 1627
Joined: Thu Mar 09, 2006 12:35 pm

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by George Tsavdaris »

pgeorges wrote:In the following position, Stockfish sets the score to draw (0.0). Any player see in half second it is lost for white (and other engines also). I think Stockfish does not get that there is a far pawn on the side, which nearly always lead to a win by decoying the opponent king.

[d]8/6p1/2p4p/pp2k3/P7/2PK2P1/7P/8 w KQkq - 0 1
My Stockfish 1.6 does get the loss for white instantly, so i guess you have a somehow flawed version of Stockfish.


Analysis by Stockfish 1.6 JA:

1.a4xb5 c6xb5 2.Kd3-c2 a5-a4 3.Kc2-b2 Ke5-d5
-+ (-2.74) Depth: 6 00:00:00 1kN
1.Kd3-c2 b5xa4 2.Kc2-b2 Ke5-e4 3.Kb2-a3
-+ (-2.54 !) Depth: 6 00:00:00 1kN
1.Kd3-c2 Ke5-e4 2.Kc2-b2 h6-h5 3.Kb2-b3 g7-g5 4.c3-c4
-+ (-2.10) Depth: 7 00:00:00 4kN
1.Kd3-c2 Ke5-e4 2.Kc2-b2 h6-h5 3.Kb2-b3 Ke4-d3 4.h2-h4 g7-g6 5.a4xb5 c6xb5
-+ (-2.38) Depth: 8 00:00:00 7kN
1.Kd3-c2 Ke5-e4 2.Kc2-b2 h6-h5 3.Kb2-b3 Ke4-d3 4.h2-h4 g7-g6 5.a4xb5 c6xb5
-+ (-2.38) Depth: 9 00:00:00 13kN
1.Kd3-c2 Ke5-e4 2.Kc2-b2 h6-h5 3.Kb2-b3 Ke4-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He replied.....
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by mcostalba »

pgeorges wrote:In the following position, Stockfish sets the score to draw (0.0). Any player see in half second it is lost for white (and other engines also). I think Stockfish does not get that there is a far pawn on the side, which nearly always lead to a win by decoying the opponent king.

[d]8/6p1/2p4p/pp2k3/P7/2PK2P1/7P/8 w KQkq - 0 1

Pascal Georges
Are you using a gcc compiled version of Stockfish 1.6 ?

There have been many reports of 'strange' behaviours when compiling with gcc under Linux.
royb
Posts: 566
Joined: Thu Mar 09, 2006 12:53 am

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by royb »

mcostalba wrote:
pgeorges wrote:In the following position, Stockfish sets the score to draw (0.0). Any player see in half second it is lost for white (and other engines also). I think Stockfish does not get that there is a far pawn on the side, which nearly always lead to a win by decoying the opponent king.

[d]8/6p1/2p4p/pp2k3/P7/2PK2P1/7P/8 w KQkq - 0 1

Pascal Georges
Are you using a gcc compiled version of Stockfish 1.6 ?

There have been many reports of 'strange' behaviours when compiling with gcc under Linux.
With my gcc compile of SF-1.6 under SCID 4.1, SF-1.6 crashes in about 2 seconds on this position.

I should add that SF-1.5.1 also crashes quickly with this position using SCID 4.1.

Roy
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by mcostalba »

royb wrote:
mcostalba wrote:
pgeorges wrote:In the following position, Stockfish sets the score to draw (0.0). Any player see in half second it is lost for white (and other engines also). I think Stockfish does not get that there is a far pawn on the side, which nearly always lead to a win by decoying the opponent king.

[d]8/6p1/2p4p/pp2k3/P7/2PK2P1/7P/8 w KQkq - 0 1

Pascal Georges
Are you using a gcc compiled version of Stockfish 1.6 ?

There have been many reports of 'strange' behaviours when compiling with gcc under Linux.
With my gcc compile of SF-1.6 under SCID 4.1, SF-1.6 crashes in about 2 seconds on this position.

Roy
Under Windows both with Intel (JA compiles) and with MSVC it works without problems and clearly sees a win for black in less then a second.


So I would think that gcc miscompiles Stockfish 1.6 :shock:

Only tomorrow I will be able to verify this and so find the fix....also this time we will need a 1.6.1, we are never lucky with the .0 release :-(
pgeorges

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by pgeorges »

mcostalba wrote:
Are you using a gcc compiled version of Stockfish 1.6 ?

There have been many reports of 'strange' behaviours when compiling with gcc under Linux.
Yes, I am using GCC 4.3.2 under Linux. And by removing the option -O3 in the Makefile, Stockfish sees the position lost for white immediatly. So I guess it is a bug in GCC compiler.

Pascal
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by mcostalba »

pgeorges wrote:
mcostalba wrote:
Are you using a gcc compiled version of Stockfish 1.6 ?

There have been many reports of 'strange' behaviours when compiling with gcc under Linux.
Yes, I am using GCC 4.3.2 under Linux. And by removing the option -O3 in the Makefile, Stockfish sees the position lost for white immediatly. So I guess it is a bug in GCC compiler.

Pascal
I have a report from a private email where it seems that gcc 4.2.3 works flawless.

Please try -O2 instead of -O3 and check if it works for you.
pgeorges

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by pgeorges »

royb wrote:
With my gcc compile of SF-1.6 under SCID 4.1, SF-1.6 crashes in about 2 seconds on this position.

I should add that SF-1.5.1 also crashes quickly with this position using SCID 4.1.

Roy
Scid 4.1 ? Not released yet ! :wink:

Under Scid, both Stockfish 1.5.1 and Stockfish 1.6 works for me (even if for the latest evaluation is not always perfect with GCC).

Pascal Georges
pgeorges

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by pgeorges »

mcostalba wrote:
Please try -O2 instead of -O3 and check if it works for you.
Indeed, with -O2 Stockfish gets the position immediately. Note that I may be wrong when stating it is a compiler issue. I remember that when switching -On to various values it would reveal some bugs in my own code. Maybe it is also the case here. For example it may be a different way of packing structs (32 bits alignment), hence a different code (this could explain crashes, or SF picking the wrong data hence the wrong score when you are lucky enough to avoid a segfault).

Pascal Georges
Hart

Re: Stockfish 1.6 - does not recongnize a lost pawn endgame

Post by Hart »

I've tried this position with a dozen engines but it fails every time with Rybka 3, RobboLito 0.085g3, Stockfish 1.5.1 (intel x64), and Stockfish 1.6 (x64 ja).
Also, I don't know if this means anything but this FEN shows up as a Chess 960 position when I input it into Arena. Maybe a problem reading the FEN? I noticed the original FEN has the KQkq tags. Does that mean castling should be allowed when it cannot?