Bug in Stockfish 1.6?

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

Moderator: Ras

govert
Posts: 270
Joined: Thu Jan 15, 2009 12:52 pm

Bug in Stockfish 1.6?

Post by govert »

I was going through the Anand vs. Kramnik game on Corus 2010, and ran into something which might be a bug in stockfish:

version: stockfish 1.6.0 32 bit ja compile i believe.
I'm using Arena as GUI.

The bug:
* Load the pgn.
* Move to the position after 32. Nf7+

Stockfish displays 0.00 , probably thinking that this is draw by repetition, but that is not the case.
It also rushes all the way to 100 ply and stops there.

Other engines seem to handle the position correctly.


[Event "Corus"]
[Site "0:55:33-0:47:33"]
[Date "2010.01.30"]
[Round "12"]
[White "Anand"]
[Black "Kramnik"]
[Result "1-0"]
[ECO "C42"]
[Opening "Russian Game"]
[Variation "Classical, Jänisch, Main Line"]
[WhiteElo "2200"]
[TimeControl "120+120"]
[Termination "normal"]
[PlyCount "89"]
[WhiteType "human"]
[BlackType "human"]

1. e4 e5 2. Nf3 Nf6 3. Nxe5 d6 4. Nf3 Nxe4 5. d4 d5 6. Bd3 Nc6 7. O-O Be7
8. c4 Nb4 9. Be2 O-O 10. Nc3 Bf5 11. a3 Nxc3 12. bxc3 Nc6 13. Re1 Re8 14.
cxd5 Qxd5 15. Bf4 Rac8 16. h3 Be4 17. Qc1 Na5 18. Qe3 Bf8 19. c4 Qd8 20.
Ne5 Bf5 21. Qc3 b6 22. Rad1 Qf6 23. Qg3 Nc6 24. Ng4 Qg6 25. d5 Na5 26. Bxc7
Bc2 27. Rc1 Nb3 28. Rxc2 Qxc2 29. Nh6+ Kh8 30. Nxf7+ Kg8 31. Nh6+ Kh8 32.
Nf7+ Kg8 33. Nh6+ Kh8 34. Be5 Qg6 35. Bg4 Rxc4 36. Qxb3 Rxe5 37. Rxe5 Rc1+
38. Kh2 Bd6 39. f4 Bxe5 40. fxe5 gxh6 41. Qe3 Qb1 42. d6 Rh1+ 43. Kg3 Re1
44. Qf4 Rf1 45. Bf3 1-0


EDIT: I can confirm that the bug is also in 1.6.3 ja compile 32 bit.
Martin Thoresen
Posts: 1833
Joined: Thu Jun 22, 2006 12:07 am

Re: Bug in Stockfish 1.6?

Post by Martin Thoresen »

Same result here, with Stockfish 1.6.3 JA t4.

Could it have something to do with the fact that Kg8 is the only move?

[d]

Code: Select all

Stockfish 1.6.3 JA 64-bit t4:
   1	00:00	           1	5	 0,00	Kg8
   2	00:00	           2	10	 0,00	Kg8
   3	00:00	           3	16	 0,00	Kg8
   4	00:00	           4	21	 0,00	Kg8
   5	00:00	           5	27	 0,00	Kg8
   6	00:00	           6	32	 0,00	Kg8
   7	00:00	           7	38	 0,00	Kg8
   8	00:00	           8	43	 0,00	Kg8
   9	00:00	           9	48	 0,00	Kg8
  10	00:00	          10	54	 0,00	Kg8
  11	00:00	          11	59	 0,00	Kg8
  12	00:00	          12	64	 0,00	Kg8
  13	00:00	          13	70	 0,00	Kg8
  14	00:00	          14	75	 0,00	Kg8
  15	00:00	          15	81	 0,00	Kg8
  16	00:00	          16	86	 0,00	Kg8
  17	00:00	          17	91	 0,00	Kg8
  18	00:00	          18	97	 0,00	Kg8
  19	00:00	          19	102	 0,00	Kg8
  20	00:00	          20	108	 0,00	Kg8
  21	00:00	          21	113	 0,00	Kg8
  22	00:00	          22	118	 0,00	Kg8
  23	00:00	          23	124	 0,00	Kg8
  24	00:00	          24	129	 0,00	Kg8
  25	00:00	          25	135	 0,00	Kg8
  26	00:00	          26	140	 0,00	Kg8
  27	00:00	          27	145	 0,00	Kg8
  28	00:00	          28	151	 0,00	Kg8
  29	00:00	          29	156	 0,00	Kg8
  30	00:00	          30	162	 0,00	Kg8
  31	00:00	          31	166	 0,00	Kg8
  32	00:00	          32	172	 0,00	Kg8
  33	00:00	          33	177	 0,00	Kg8
  34	00:00	          34	182	 0,00	Kg8
  35	00:00	          35	188	 0,00	Kg8
  36	00:00	          36	193	 0,00	Kg8
  37	00:00	          37	198	 0,00	Kg8
  38	00:00	          38	204	 0,00	Kg8
  39	00:00	          39	209	 0,00	Kg8
  40	00:00	          40	215	 0,00	Kg8
  41	00:00	          41	220	 0,00	Kg8
  42	00:00	          42	225	 0,00	Kg8
  43	00:00	          43	231	 0,00	Kg8
  44	00:00	          44	236	 0,00	Kg8
  45	00:00	          45	241	 0,00	Kg8
  46	00:00	          46	247	 0,00	Kg8
  47	00:00	          47	252	 0,00	Kg8
  48	00:00	          48	258	 0,00	Kg8
  49	00:00	          49	263	 0,00	Kg8
  50	00:00	          50	268	 0,00	Kg8
  51	00:00	          51	274	 0,00	Kg8
  52	00:00	          52	278	 0,00	Kg8
  53	00:00	          53	283	 0,00	Kg8
  54	00:00	          54	288	 0,00	Kg8
  55	00:00	          55	294	 0,00	Kg8
  56	00:00	          56	282	 0,00	Kg8
  57	00:00	          57	287	 0,00	Kg8
  58	00:00	          58	292	 0,00	Kg8
  59	00:00	          59	297	 0,00	Kg8
  60	00:00	          60	303	 0,00	Kg8
  61	00:00	          61	308	 0,00	Kg8
  62	00:00	          62	313	 0,00	Kg8
  63	00:00	          63	318	 0,00	Kg8
  64	00:00	          64	323	 0,00	Kg8
  65	00:00	          65	328	 0,00	Kg8
  66	00:00	          66	333	 0,00	Kg8
  67	00:00	          67	336	 0,00	Kg8
  68	00:00	          68	341	 0,00	Kg8
  69	00:00	          69	346	 0,00	Kg8
  70	00:00	          70	351	 0,00	Kg8
  71	00:00	          71	356	 0,00	Kg8
  72	00:00	          72	361	 0,00	Kg8
  73	00:00	          73	366	 0,00	Kg8
  74	00:00	          74	371	 0,00	Kg8
  75	00:00	          75	376	 0,00	Kg8
  76	00:00	          76	381	 0,00	Kg8
  77	00:00	          77	386	 0,00	Kg8
  78	00:00	          78	391	 0,00	Kg8
  79	00:00	          79	396	 0,00	Kg8
  80	00:00	          80	402	 0,00	Kg8
  81	00:00	          81	407	 0,00	Kg8
  82	00:00	          82	412	 0,00	Kg8
  83	00:00	          83	417	 0,00	Kg8
  84	00:00	          84	422	 0,00	Kg8
  85	00:00	          85	427	 0,00	Kg8
  86	00:00	          86	432	 0,00	Kg8
  87	00:00	          87	437	 0,00	Kg8
  88	00:00	          88	442	 0,00	Kg8
  89	00:00	          89	445	 0,00	Kg8
  90	00:00	          90	450	 0,00	Kg8
  91	00:00	          91	455	 0,00	Kg8
  92	00:00	          92	460	 0,00	Kg8
  93	00:00	          93	465	 0,00	Kg8
  94	00:00	          94	470	 0,00	Kg8
  95	00:00	          95	475	 0,00	Kg8
  96	00:00	          96	480	 0,00	Kg8
  97	00:00	          97	485	 0,00	Kg8
  98	00:00	          98	490	 0,00	Kg8
  99	00:00	          99	495	 0,00	Kg8
  100	00:00	         100	500	 0,00	Kg8

govert
Posts: 270
Joined: Thu Jan 15, 2009 12:52 pm

Re: Bug in Stockfish 1.6?

Post by govert »

I think it has to do with the draw recognition.

Taken from chessgames.com kibitz about the game:

http://www.chessgames.com/perl/chessgam ... 1&kpage=14
At the 33rd, Anand told the press, “Kramnik looked at me with raised eyebrows. He seemed to think we’d had a threefold repetition. I had to point out that there was a pawn on f7 the first time round.”
User avatar
Eelco de Groot
Posts: 4673
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Bug in Stockfish 1.6?

Post by Eelco de Groot »

Yes, I think so too. Most programs count a two fold repetition as a draw for program-technical reasons. Only a few do not do this in analysis mode, I believe the Rybka clones don't count a two fold draw, but maybe there are more by now, because this issue has come up repeatedly in the past year, in this forum and in the Rybka forum. Vas said he was considering to change the count of draws in analysis mode but we never got to witness this change because there was not yet a new Rybka program released.

Regards, Eelco
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
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Bug in Stockfish 1.6?

Post by zullil »

govert wrote:I was going through the Anand vs. Kramnik game on Corus 2010, and ran into something which might be a bug in stockfish:

version: stockfish 1.6.0 32 bit ja compile i believe.
I'm using Arena as GUI.

The bug:
* Load the pgn.
* Move to the position after 32. Nf7+

Stockfish displays 0.00 , probably thinking that this is draw by repetition, but that is not the case.
It also rushes all the way to 100 ply and stops there.

Other engines seem to handle the position correctly.


[Event "Corus"]
[Site "0:55:33-0:47:33"]
[Date "2010.01.30"]
[Round "12"]
[White "Anand"]
[Black "Kramnik"]
[Result "1-0"]
[ECO "C42"]
[Opening "Russian Game"]
[Variation "Classical, Jänisch, Main Line"]
[WhiteElo "2200"]
[TimeControl "120+120"]
[Termination "normal"]
[PlyCount "89"]
[WhiteType "human"]
[BlackType "human"]

1. e4 e5 2. Nf3 Nf6 3. Nxe5 d6 4. Nf3 Nxe4 5. d4 d5 6. Bd3 Nc6 7. O-O Be7
8. c4 Nb4 9. Be2 O-O 10. Nc3 Bf5 11. a3 Nxc3 12. bxc3 Nc6 13. Re1 Re8 14.
cxd5 Qxd5 15. Bf4 Rac8 16. h3 Be4 17. Qc1 Na5 18. Qe3 Bf8 19. c4 Qd8 20.
Ne5 Bf5 21. Qc3 b6 22. Rad1 Qf6 23. Qg3 Nc6 24. Ng4 Qg6 25. d5 Na5 26. Bxc7
Bc2 27. Rc1 Nb3 28. Rxc2 Qxc2 29. Nh6+ Kh8 30. Nxf7+ Kg8 31. Nh6+ Kh8 32.
Nf7+ Kg8 33. Nh6+ Kh8 34. Be5 Qg6 35. Bg4 Rxc4 36. Qxb3 Rxe5 37. Rxe5 Rc1+
38. Kh2 Bd6 39. f4 Bxe5 40. fxe5 gxh6 41. Qe3 Qb1 42. d6 Rh1+ 43. Kg3 Re1
44. Qf4 Rf1 45. Bf3 1-0


EDIT: I can confirm that the bug is also in 1.6.3 ja compile 32 bit.

When I give Stockfish-1.6.3 the position from the command line and ask it to search to depth 20, it behaves normally and evaluates the position as favoring White. The pv it gives agrees with what happened in the game: Kg8 Nh6+ Kh8 Be5 Qg6 Bg4.

Code: Select all

Stockfish 1.6.3 64bit. By Tord Romstad, Marco Costalba, Joona Kiiski.
Good! CPU has hardware POPCNT. We will use it.
uci
id name Stockfish 1.6.3 64bit
id author Tord Romstad, Marco Costalba, Joona Kiiski

option name Use Search Log type check default true
option name Search Log Filename type string default SearchLog.txt
option name Book File type string default book.bin
option name Mobility (Middle Game) type spin default 100 min 0 max 200
option name Mobility (Endgame) type spin default 100 min 0 max 200
option name Pawn Structure (Middle Game) type spin default 100 min 0 max 200
option name Pawn Structure (Endgame) type spin default 100 min 0 max 200
option name Passed Pawns (Middle Game) type spin default 100 min 0 max 200
option name Passed Pawns (Endgame) type spin default 100 min 0 max 200
option name Space type spin default 100 min 0 max 200
option name Aggressiveness type spin default 100 min 0 max 200
option name Cowardice type spin default 100 min 0 max 200
option name King Safety Curve type combo default Quadratic var Quadratic var Linear
option name King Safety Coefficient type spin default 40 min 1 max 100
option name King Safety X Intercept type spin default 0 min 0 max 20
option name King Safety Max Slope type spin default 30 min 10 max 100
option name King Safety Max Value type spin default 500 min 100 max 1000
option name Queen Contact Check Bonus type spin default 3 min 0 max 8
option name Queen Check Bonus type spin default 2 min 0 max 4
option name Rook Check Bonus type spin default 1 min 0 max 4
option name Bishop Check Bonus type spin default 1 min 0 max 4
option name Knight Check Bonus type spin default 1 min 0 max 4
option name Discovered Check Bonus type spin default 3 min 0 max 8
option name Mate Threat Bonus type spin default 3 min 0 max 8
option name Check Extension (PV nodes) type spin default 2 min 0 max 2
option name Check Extension (non-PV nodes) type spin default 1 min 0 max 2
option name Single Reply Extension (PV nodes) type spin default 2 min 0 max 2
option name Single Reply Extension (non-PV nodes) type spin default 2 min 0 max 2
option name Mate Threat Extension (PV nodes) type spin default 0 min 0 max 2
option name Mate Threat Extension (non-PV nodes) type spin default 0 min 0 max 2
option name Pawn Push to 7th Extension (PV nodes) type spin default 1 min 0 max 2
option name Pawn Push to 7th Extension (non-PV nodes) type spin default 1 min 0 max 2
option name Passed Pawn Extension (PV nodes) type spin default 1 min 0 max 2
option name Passed Pawn Extension (non-PV nodes) type spin default 0 min 0 max 2
option name Pawn Endgame Extension (PV nodes) type spin default 2 min 0 max 2
option name Pawn Endgame Extension (non-PV nodes) type spin default 2 min 0 max 2
option name Full Depth Moves (PV nodes) type spin default 10 min 1 max 100
option name Full Depth Moves (non-PV nodes) type spin default 3 min 1 max 100
option name Threat Depth type spin default 5 min 0 max 100
option name Randomness type spin default 0 min 0 max 10
option name Minimum Split Depth type spin default 7 min 4 max 7
option name Maximum Number of Threads per Split Point type spin default 5 min 4 max 8
option name Threads type spin default 8 min 1 max 8
option name Hash type spin default 1024 min 4 max 8192
option name Clear Hash type button
option name New Game type button
option name Ponder type check default true
option name OwnBook type check default true
option name MultiPV type spin default 1 min 1 max 500
option name UCI_ShowCurrLine type check default false
option name UCI_Chess960 type check default false
option name UCI_AnalyseMode type check default false
uciok
position fen 2r1rb1k/p1B2Npp/1p6/3P4/2P5/Pn4QP/2q1BPP1/4R1K1 b - - 4 32
isready 
readyok
go depth 20
info depth 1
info depth 1 score cp -149 time 635 nodes 1 nps 1 pv h8g8
info depth 2
info depth 2 score cp -165 time 635 nodes 95 nps 149 pv h8g8 f7d6 e8e2 e1e2 c2e2 d6c8 e2c4 
info depth 3
info depth 3 score cp -193 time 636 nodes 544 nps 855 pv h8g8 f7h6 g8h8 c7e5 
info depth 4
info depth 4 score cp -197 time 636 nodes 919 nps 1444 pv h8g8 f7h6 g8h8 c7e5 c2g6 
info depth 5
info depth 5 score cp -181 time 637 nodes 1536 nps 2411 pv h8g8 f7h6 g8h8 c7e5 c2g6 g3g6 h7g6 
info depth 6
info depth 6 score cp -202 time 638 nodes 2663 nps 4173 pv h8g8 f7h6 g8h8 c7e5 c2g6 g3g6 h7g6 h6f7 h8g8 
info depth 7
info depth 7 score cp -202 time 658 nodes 20099 nps 30545 pv h8g8 f7h6 g8h8 c7e5 c2g6 h6g4 e8e5 g4e5 g6g3 f2g3 f8c5 g1h2 c5a3 
info depth 8
info depth 8 score cp -181 lowerbound time 671 nodes 36098 nps 53797 pv h8g8 f7h6 g8h8 c7e5 c2g6 h6g4 b3c5 g3f4 h8g8 d5d6 c5d7 
info depth 9
info depth 9 score cp -157 time 691 nodes 70888 nps 102587 pv h8g8 f7h6 g8h8 c7e5 c2g6 h6g4 b3c5 g4e3 c5d7 g3g6 h7g6 e5b2 f8d6 e2g4 
info depth 10
info depth 10 score cp -157 time 727 nodes 248476 nps 341782 pv h8g8 f7h6 g8h8 c7e5 c2g6 g3g6 h7g6 e2d3 h8h7 h6f7 b3c5 d3c2 c5d7 c2a4 e8e5 f7e5 d7e5 e1e5 c8c4 
info depth 11
info depth 11 score cp -177 upperbound time 751 nodes 365204 nps 486290 pv h8g8 f7h6 g8h8 c7e5 c2g6 g3g6 h7g6 e2g4 c8c4 h6f7 h8g8 g4e6 e8e6 d5e6 f8a3 e1e3 
info depth 12
info depth 12 score cp -173 time 854 nodes 920687 nps 1078087 pv h8g8 f7h6 g8h8 c7e5 c2d2 f2f4 f8c5 g1h2 e8e5 h6f7 h8g8 f7e5 c8f8 e2g4 b3d4 e1e3 d4f5 
info depth 13
info nodes 1747808 nps 1732218 time 1009 hashfull 0
info depth 13 score cp -153 time 1271 nodes 3760091 nps 2958372 pv h8g8 f7h6 g8h8 c7e5 c2g6 g3g6 h7g6 e2g4 c8c4 g4d7 e8e7 d7e6 c4c2 h6f7 h8g8 f7g5 e7e6 g5e6 f8a3 e1e3 a3b2 
info depth 14
info currmove h8g8 currmovenumber 1
info depth 14 score cp -197 time 1933 nodes 8455490 nps 4374283 pv h8g8 f7h6 g8h8 c7e5 c2g6 e2g4 c8d8 h6f5 b3c5 e1d1 g6g5 f2f4 g5g6 d5d6 h8g8 g3e3 g6f7 d1c1 g7g6 
info depth 15
info currmove h8g8 currmovenumber 1
info nodes 8862206 nps 4389403 time 2019 hashfull 0
info depth 15 score cp -185 time 2956 nodes 15095786 nps 5106828 pv h8g8 f7h6 g8h8 c7e5 c2g6 e2g4 c8d8 h6f5 b3c5 g3e3 h8g8 f5d4 f8d6 f2f4 d8a8 g4f5 g6h6 e3g3 e8f8 f5e6 c5e6 d4e6 d6e5 f4e5 f8f5 e1f1 
info depth 16
info currmove h8g8 currmovenumber 1
info nodes 15421939 nps 5098161 time 3025 hashfull 0
info nodes 23353267 nps 5789109 time 4034 hashfull 0
info depth 16 score cp -193 time 4078 nodes 23698811 nps 5811380 pv h8g8 f7h6 g8h8 c7e5 c2g6 e2g4 c8d8 h6f5 b3c5 g3e3 h8g8 f5d4 f8d6 f2f4 d8a8 g4f5 g6h6 d4c6 d6e5 f4e5 h6e3 e1e3 g7g6 f5c2 g8g7 e5e6 e8f8 g2g3 a8e8 g1g2 
info depth 17
info currmove h8g8 currmovenumber 1
info depth 17 score cp -193 time 4750 nodes 29108985 nps 6128207 pv h8g8 f7h6 g8h8 c7e5 c2g6 e2g4 c8d8 h6f5 b3c5 g3e3 h8g8 f5d4 f8d6 f2f4 d8a8 g4f5 g6h6 d4c6 d6e5 f4e5 h6e3 e1e3 g7g6 f5c2 g8g7 e5e6 e8f8 g2g3 a8e8 g1g2 a7a6 
info depth 18
info currmove h8g8 currmovenumber 1
info nodes 31535876 nps 6249678 time 5046 hashfull 0
info nodes 40334295 nps 6636113 time 6078 hashfull 1
info depth 18 score cp -193 time 6351 nodes 42663792 nps 6717649 pv h8g8 f7h6 g8h8 c7e5 c2g6 e2g4 c8d8 h6f5 b3c5 g3e3 h8g8 f5d4 f8d6 f2f4 d8a8 g4f5 g6h6 d4c6 d6e5 f4e5 h6e3 e1e3 g7g6 f5c2 g8g7 e5e6 e8f8 g2g3 a8e8 g1g2 a7a6 
info depth 19
info currmove h8g8 currmovenumber 1
info nodes 48207973 nps 6806151 time 7083 hashfull 2
info nodes 56841436 nps 7032220 time 8083 hashfull 5
info depth 19 score cp -173 lowerbound time 9050 nodes 65445319 nps 7231526 pv h8g8 f7h6 g8h8 c7e5 c2g6 e2g4 c8d8 h6f5 b3c5 g3e3 h8g8 f5d4 f8d6 f2f4 e8f8 g4e6 c5e6 d4e6 f8e8 e6d8 d6c5 
info depth 20
info currmove h8g8 currmovenumber 1
info nodes 65898945 nps 7214686 time 9134 hashfull 9
info nodes 74370152 nps 7323500 time 10155 hashfull 15
info nodes 82940196 nps 7427258 time 11167 hashfull 24
info nodes 91233182 nps 7495331 time 12172 hashfull 37
info nodes 99413467 nps 7532464 time 13198 hashfull 53
info nodes 107928807 nps 7594202 time 14212 hashfull 70
info nodes 117486948 nps 7714685 time 15229 hashfull 89
info nodes 126408321 nps 7780888 time 16246 hashfull 112
info nodes 135117124 nps 7823805 time 17270 hashfull 140
info depth 20 score cp -169 time 17397 nodes 136150454 nps 7826088 pv h8g8 f7h6 g8h8 c7e5 c2g6 e2g4 c8d8 h6f5 b3c5 e1d1 c5e4 g3f4 e8e5 f4e5 d8e8 e5a1 f8c5 d1f1 e4d2 g4h5 g6f5 h5e8 d2f1 a1f1 c5a3 
info nodes 136150454 nps 7826088 time 17397 hashfull 143
bestmove h8g8 ponder f7h6
royb
Posts: 566
Joined: Thu Mar 09, 2006 12:53 am

Re: Bug in Stockfish 1.6?

Post by royb »

govert wrote:I was going through the Anand vs. Kramnik game on Corus 2010, and ran into something which might be a bug in stockfish:

version: stockfish 1.6.0 32 bit ja compile i believe.
I'm using Arena as GUI.

The bug:
* Load the pgn.
* Move to the position after 32. Nf7+

Stockfish displays 0.00 , probably thinking that this is draw by repetition, but that is not the case.
It also rushes all the way to 100 ply and stops there.

Other engines seem to handle the position correctly.


[Event "Corus"]
[Site "0:55:33-0:47:33"]
[Date "2010.01.30"]
[Round "12"]
[White "Anand"]
[Black "Kramnik"]
[Result "1-0"]
[ECO "C42"]
[Opening "Russian Game"]
[Variation "Classical, Jänisch, Main Line"]
[WhiteElo "2200"]
[TimeControl "120+120"]
[Termination "normal"]
[PlyCount "89"]
[WhiteType "human"]
[BlackType "human"]

1. e4 e5 2. Nf3 Nf6 3. Nxe5 d6 4. Nf3 Nxe4 5. d4 d5 6. Bd3 Nc6 7. O-O Be7
8. c4 Nb4 9. Be2 O-O 10. Nc3 Bf5 11. a3 Nxc3 12. bxc3 Nc6 13. Re1 Re8 14.
cxd5 Qxd5 15. Bf4 Rac8 16. h3 Be4 17. Qc1 Na5 18. Qe3 Bf8 19. c4 Qd8 20.
Ne5 Bf5 21. Qc3 b6 22. Rad1 Qf6 23. Qg3 Nc6 24. Ng4 Qg6 25. d5 Na5 26. Bxc7
Bc2 27. Rc1 Nb3 28. Rxc2 Qxc2 29. Nh6+ Kh8 30. Nxf7+ Kg8 31. Nh6+ Kh8 32.
Nf7+ Kg8 33. Nh6+ Kh8 34. Be5 Qg6 35. Bg4 Rxc4 36. Qxb3 Rxe5 37. Rxe5 Rc1+
38. Kh2 Bd6 39. f4 Bxe5 40. fxe5 gxh6 41. Qe3 Qb1 42. d6 Rh1+ 43. Kg3 Re1
44. Qf4 Rf1 45. Bf3 1-0


EDIT: I can confirm that the bug is also in 1.6.3 ja compile 32 bit.
This does NOT happen with a 64-bit Linux compile using SCID 4.1. Here is the output from a two-thread analysis of the key position:

1 +1.49 32.... Kg8 (0.58)
2 +1.65 32.... Kg8 33.Nd6 Rxe2 34.Rxe2 Qxe2 35.Nxc8 Qxc4 (0.58)
3 +1.93 32.... Kg8 33.Nh6+ Kh8 34.Be5 (0.58)
4 +1.97 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 (0.58)
5 +1.81 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Qxg6 hxg6 (0.59)
6 +2.02 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Qxg6 hxg6 36.Nf7+ Kg8 (0.59)
7 +2.06 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Qxg6 hxg6 36.Bd1 Nd2 37.Ba4 Rxe5 38.Nf7+ Kg8 39.Nxe5 Nxc4 (0.60)
8 +1.85 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Ng4 Nd2 36.Qf4 Nb3 37.Qe3 Bd6 38.Bd3 (0.61)
9 +1.69 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Bg4 Rxc4 36.Qxb3 Rxe5 37.Rxe5 Rc1+ 38.Bd1 Qxh6 39.Re8 (0.63)
10 +1.57 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Qxg6 hxg6 36.Bd3 Kh7 37.Nf7 Nc5 38.Bc2 Nd7 39.Ba4 Rxe5 40.Nxe5 Nxe5 41.Rxe5 Rxc4 (0.72)
11 +1.97 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Qxg6 hxg6 36.Bg4 Rxc4 37.d6 Kh7 38.Nf7 (0.80)
12 +2.18 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qd2 35.Nf7+ Kg8 36.Bc3 Qc2 37.Nd6 Nc1 38.Nxe8 Nxe2+ 39.Rxe2 Qxe2 40.Nxg7 Qd1+ 41.Kh2 Rxc4 42.Ne6+ Kf7 (0.87)
13 +2.18 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qd2 35.Nf7+ Kg8 36.Bc3 Qc2 37.Nd6 Nc1 38.Nxe8 Nxe2+ 39.Rxe2 Qxe2 40.Nxg7 Rxc4 41.Ne6+ Kf7 42.Ng5+ Ke8 43.Qb8+ Kd7 44.Qxf8 Rxc3 45.Qg7+ Qe7 46.Qxc3 Qxg5 (1.26)
14 +2.38 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qd2 35.Nf7+ Kg8 36.Bc3 Qc2 37.Nd6 Nc1 38.Nxe8 Nxe2+ 39.Rxe2 Qxe2 40.Nxg7 Rxc4 41.Ne6+ Kf7 42.Ng5+ Ke8 43.Qb8+ Kd7 44.Qxf8 Rxc3 45.Qg7+ Qe7 46.Qxc3 Qxg5 47.Qc6+ (1.93)
15 +2.34 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qd2 35.Nf7+ Kg8 36.Bc3 Qc2 37.Nd6 Nc1 38.Nxe8 Rxe8 39.Bg4 Rxe1+ 40.Bxe1 Ne2+ 41.Bxe2 Qxe2 42.Bb4 Bxb4 43.axb4 Qe1+ 44.Kh2 Qxb4 45.Qb8+ Qf8 46.Qc7 (2.13)
16 +1.61 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Qxg6 hxg6 36.Bg4 Rxc4 37.Nf7+ Kg8 38.Be6 Rxe6 39.dxe6 Rc1 40.Rxc1 Nxc1 41.a4 Nd3 42.Bb8 a6 43.Bc7 Bc5 44.Ne5 Bxf2+ 45.Kh2 (10.06)
17 +1.53 32.... Kg8 33.Nh6+ Kh8 34.Be5 Qg6 35.Qxg6 hxg6 36.Bg4 Rxc4 37.d6 Nc5 38.Rd1 Kh7 39.Nf7 Kg8 40.d7 Kxf7 41.dxe8=Q+ Kxe8 42.Be2 Rc2 43.Bf3 Be7 44.Bxg7 Bh4 45.Bd4 Kf7 46.Bd5+ Ke7 (29.60)

Single thread analysis also does not show the problem.

Could this be something with the Windows compile? Could it be a Stockfish-Arena interaction?
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Bug in Stockfish 1.6?

Post by zullil »

royb wrote: Could it be a Stockfish-Arena interaction?
This is my guess.
govert
Posts: 270
Joined: Thu Jan 15, 2009 12:52 pm

Re: Bug in Stockfish 1.6?

Post by govert »

well, the position in itself (the FEN) does not have any information about three-fold repetition, right?

So, i suggest that the ones of you that cannot reproduce the bug step back a few positions and then feed each move at a time into stockfish.

Maybe that will reproduce it...
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Bug in Stockfish 1.6?

Post by zullil »

govert wrote:well, the position in itself (the FEN) does not have any information about three-fold repetition, right?

So, i suggest that the ones of you that cannot reproduce the bug step back a few positions and then feed each move at a time into stockfish.

Maybe that will reproduce it...
Correct, there is no repetition information in the fen. My point was that Stockfish does analyze the position correctly in isolation. When I read that Stockfish behaved correctly under Scid, I assumed this was an Arena issue. But now I see the incorrect Stockfish behavior when I run it under the Sigma Chess GUI. I assume the incorrect behavior would also appear under Scid, if one replayed the game from the beginning with Stockfish monitoring and analyzing. I don't have Scid installed on this machine, so I can't test.

In any case, there does appear to be a bug in Stockfish, since the incorrect behavior is appearing under two different GUIs.
User avatar
Eelco de Groot
Posts: 4673
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Bug in Stockfish 1.6?

Post by Eelco de Groot »

zullil wrote:
govert wrote:well, the position in itself (the FEN) does not have any information about three-fold repetition, right?

So, i suggest that the ones of you that cannot reproduce the bug step back a few positions and then feed each move at a time into stockfish.

Maybe that will reproduce it...
Correct, there is no repetition information in the fen. My point was that Stockfish does analyze the position correctly in isolation. When I read that Stockfish behaved correctly under Scid, I assumed this was an Arena issue. But now I see the incorrect Stockfish behavior when I run it under the Sigma Chess GUI. I assume the incorrect behavior would also appear under Scid, if one replayed the game from the beginning with Stockfish monitoring and analyzing. I don't have Scid installed on this machine, so I can't test.

In any case, there does appear to be a bug in Stockfish, since the incorrect behavior is appearing under two different GUIs.
It is debatable if it is a real bug or a missing feature, but I am just wondering if there are other engines not reporting 0.00? Shredder 11 does give a PV very close to 0.00 so that is one approach still counting the twofold repetition as a draw I think. Rybka clones I heard do not?

Glaurung and Naum 3.1, Rybka 2.3.2a all report simply 0.00 in the Shredder UCI interface, no PV and I would have expected Stockfish in SCID to do the same? Analyzing the position from the pgn, the GUI should feed the full game info to the engine and on the basis of that the engine should detect a twofold repetition, counting that as a draw. Threefold repetition is not yet built in.

Eelco
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