Bug in my engine

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
JimmyRustles
Posts: 32
Joined: Sun May 05, 2019 11:24 pm
Full name: Steven Griffin

Bug in my engine

Post by JimmyRustles »

I've got a pretty serious bug in my engine but the problem is it only seems to happen on lichess and I can't reproduce the bug locally.

In a lichess game, quite frequently, when it gets into a winning position, it will draw by threefold even though it's heavily up in material or even has a short mate sequence available.

When I put these positions into my engine, it doesn't suggest the same move it played on lichess, it suggests a winning move instead.

The bug only happens in lichess games. I just played it in 50 games against a weaker engine and it won every game without going into a threefold loop.

Can someone please give me some suggestions of how to investigate this bug, or give some explanation of why it would only happen on lichess and not locally?

Example: https://lichess.org/6OMk29P82WlY

Thanks.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bug in my engine

Post by hgm »

How does one run engines on Lichess in the first place? I suppose you would need some kind of interface for that. What you describe sounds like the interface doesn't transmit the full game history to the engine.
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Bug in my engine

Post by Guenther »

JimmyRustles wrote: Fri Dec 20, 2019 4:40 am I've got a pretty serious bug in my engine but the problem is it only seems to happen on lichess and I can't reproduce the bug locally.

In a lichess game, quite frequently, when it gets into a winning position, it will draw by threefold even though it's heavily up in material or even has a short mate sequence available.

When I put these positions into my engine, it doesn't suggest the same move it played on lichess, it suggests a winning move instead.

The bug only happens in lichess games. I just played it in 50 games against a weaker engine and it won every game without going into a threefold loop.

Can someone please give me some suggestions of how to investigate this bug, or give some explanation of why it would only happen on lichess and not locally?

Example: https://lichess.org/6OMk29P82WlY

Thanks.
Did you really test with the same conditions locally?

The game you show ended in a repetition loop in a very late endgame KR-K, thus if you have set adjudication on, it will probably never see such endgames, but on Lichess the opponent resigns on its on will.

We have seen even very strong programs falling into this, because they never were tested w/o adjudication,
especially, if they don't use tablebases as Raven.
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Bug in my engine

Post by Guenther »

It seems you really have a repetition bug when mate is near?

I looked at a few games at LiChess from your history and copied one game into WB. (Raven playing with UCI2WB)

Then I started the game after Blacks 69...Rc3 and let Raven 0.60 play White against me.
It immediately comes up with a mate score, but the PV shows only repetitions since depth 9.
After my White moves it never thought anymore and played the other moves at depth 1 from the first search.

My guess is still you haven't seen this locally before, because of earlier adjudications?

[pgn][Event "Rated Bullet game"] [Site "https://lichess.org/K2UJa48B"] [Date "2019.12.19"] [Round "-"] [White "RavenEngine"] [Black "ChessNoobComp"] [Result "1/2-1/2"] [UTCDate "2019.12.19"] [UTCTime "16:59:18"] [WhiteElo "2121"] [BlackElo "2155"] [WhiteRatingDiff "+1"] [BlackRatingDiff "-1"] [WhiteTitle "BOT"] [BlackTitle "BOT"] [Variant "Standard"] [TimeControl "60+0"] [ECO "D52"] [Opening "Queen's Gambit Declined: Cambridge Springs Defense: Rubinstein Variation"] [Termination "Normal"] [Annotator "lichess.org"] 1. d4 Nf6 2. c4 e6 3. Nf3 d5 4. Nc3 c6 5. Bg5 Nbd7 6. e3 Qa5 7. Nd2 dxc4 { D52 Queen's Gambit Declined: Cambridge Springs Defense: Rubinstein Variation } 8. Bxf6 Nxf6 9. Nxc4 Qc7 10. Rc1 Be7 11. Bd3 h5 12. a4 g6 13. Qf3 O-O 14. h3 Nd7 15. g4 h4 16. O-O Nb6 17. Ne5 Nd7 18. Nxd7 Bxd7 19. Ne4 Kh8 20. Nf6 Qd8 21. g5 Kg7 22. Nxd7 Qxd7 23. Qg4 Qd5 24. f4 Rh8 25. Rc4 Kf8 26. Qd1 Rd8 27. Qd2 Rh5 28. Qc3 Kg8 29. e4 Qd7 30. Be2 Rh8 31. e5 Qc7 32. a5 a6 33. b4 Qb8 34. Bd3 Rh7 35. Be4 Qa7 36. Kf2 Rd7 37. Rd1 Kf8 38. Ke3 Ke8 39. Rg1 Rd8 40. Qe1 Kd7 41. Rg4 Rdh8 42. Kf3 Kc8 43. Bc2 Rd8 44. Ke3 Rd5 45. Rxh4 Rxe5+ 46. fxe5 Bxg5+ 47. Rf4 Rxh3+ 48. Ke4 Bxf4 49. Kxf4 Kd8 50. Qf2 Ke8 51. Kg4 Rh5 52. Qf6 Rh6 53. Be4 Rh2 54. Kg3 Rh7 55. Kg4 Rh2 56. Qg7 Re2 57. Qh8+ Ke7 58. Kf3 Ra2 59. Qc8 Rd2 60. Qc7+ Kf8 61. Qd8+ Kg7 62. Qf6+ Kf8 63. Bxg6 b5 64. axb6 Qd7 65. Be4 Rh2 66. Rxc6 Kg8 67. Rc7 Rh3+ 68. Kg4 Qxc7 69. bxc7 Rc3 70. Qd8+ Kg7 71. Qg5+ Kf8 72. Qd8+ Kg7 73. Qg5+ Kf8 74. Qd8+ Kg7 { The game is a draw. } 1/2-1/2[/pgn]

Code: Select all

Feeding moves 0 through 138 to first chess program
26372 >first : force
26372 >first : usermove 26372 >first : d2d4
26372 >first : usermove 26372 >first : g8f6
26372 >first : usermove 26372 >first : c2c4
26372 >first : usermove 26372 >first : e7e6
26372 >first : usermove 26372 >first : g1f3
26372 >first : usermove 26372 >first : d7d5
26372 >first : usermove 26372 >first : b1c3
26372 >first : usermove 26372 >first : c7c6
26372 >first : usermove 26372 >first : c1g5
26372 >first : usermove 26372 >first : b8d7
26372 >first : usermove 26372 >first : e2e3
26372 >first : usermove 26372 >first : d8a5
26372 >first : usermove 26372 >first : f3d2
26372 >first : usermove 26372 >first : d5c4
26372 >first : usermove 26372 >first : g5f6
26372 >first : usermove 26372 >first : d7f6
26372 >first : usermove 26372 >first : d2c4
26372 >first : usermove 26372 >first : a5c7
26372 >first : usermove 26372 >first : a1c1
26372 >first : usermove 26372 >first : f8e7
26372 >first : usermove 26372 >first : f1d3
26372 >first : usermove 26382 >first : h7h5
26382 >first : usermove 26382 >first : a2a4
26382 >first : usermove 26382 >first : g7g6
26382 >first : usermove 26382 >first : d1f3
26382 >first : usermove 26382 >first : e8g8
26382 >first : usermove 26382 >first : h2h3
26382 >first : usermove 26382 >first : f6d7
26382 >first : usermove 26382 >first : g2g4
26382 >first : usermove 26382 >first : h5h4
26382 >first : usermove 26382 >first : e1g1
26382 >first : usermove 26382 >first : d7b6
26382 >first : usermove 26382 >first : c4e5
26382 >first : usermove 26382 >first : b6d7
26382 >first : usermove 26382 >first : e5d7
26382 >first : usermove 26382 >first : c8d7
26382 >first : usermove 26382 >first : c3e4
26382 >first : usermove 26382 >first : g8h8
26382 >first : usermove 26382 >first : e4f6
26382 >first : usermove 26382 >first : c7d8
26382 >first : usermove 26382 >first : g4g5
26382 >first : usermove 26382 >first : h8g7
26382 >first : usermove 26382 >first : f6d7
26382 >first : usermove 26382 >first : d8d7
26382 >first : usermove 26382 >first : f3g4
26382 >first : usermove 26382 >first : d7d5
26382 >first : usermove 26382 >first : f2f4
26382 >first : usermove 26382 >first : f8h8
26382 >first : usermove 26382 >first : c1c4
26382 >first : usermove 26382 >first : g7f8
26382 >first : usermove 26382 >first : g4d1
26382 >first : usermove 26382 >first : a8d8
26382 >first : usermove 26382 >first : d1d2
26382 >first : usermove 26382 >first : h8h5
26382 >first : usermove 26392 >first : d2c3
26392 >first : usermove 26392 >first : f8g8
26392 >first : usermove 26392 >first : e3e4
26392 >first : usermove 26392 >first : d5d7
26392 >first : usermove 26392 >first : d3e2
26392 >first : usermove 26392 >first : h5h8
26392 >first : usermove 26392 >first : e4e5
26392 >first : usermove 26392 >first : d7c7
26392 >first : usermove 26392 >first : a4a5
26392 >first : usermove 26392 >first : a7a6
26392 >first : usermove 26392 >first : b2b4
26392 >first : usermove 26392 >first : c7b8
26392 >first : usermove 26392 >first : e2d3
26392 >first : usermove 26392 >first : h8h7
26392 >first : usermove 26392 >first : d3e4
26392 >first : usermove 26392 >first : b8a7
26392 >first : usermove 26392 >first : g1f2
26392 >first : usermove 26392 >first : d8d7
26392 >first : usermove 26392 >first : f1d1
26392 >first : usermove 26392 >first : g8f8
26392 >first : usermove 26392 >first : f2e3
26392 >first : usermove 26392 >first : f8e8
26392 >first : usermove 26392 >first : d1g1
26392 >first : usermove 26392 >first : d7d8
26392 >first : usermove 26392 >first : c3e1
26392 >first : usermove 26392 >first : e8d7
26392 >first : usermove 26392 >first : g1g4
26392 >first : usermove 26392 >first : d8h8
26392 >first : usermove 26392 >first : e3f3
26392 >first : usermove 26392 >first : d7c8
26392 >first : usermove 26392 >first : e4c2
26392 >first : usermove 26392 >first : h8d8
26392 >first : usermove 26392 >first : f3e3
26392 >first : usermove 26402 >first : d8d5
26402 >first : usermove 26402 >first : g4h4
26402 >first : usermove 26402 >first : d5e5
26402 >first : usermove 26402 >first : f4e5
26402 >first : usermove 26402 >first : e7g5
26402 >first : usermove 26402 >first : h4f4
26402 >first : usermove 26402 >first : h7h3
26402 >first : usermove 26402 >first : e3e4
26402 >first : usermove 26402 >first : g5f4
26402 >first : usermove 26402 >first : e4f4
26402 >first : usermove 26402 >first : c8d8
26402 >first : usermove 26402 >first : e1f2
26402 >first : usermove 26402 >first : d8e8
26402 >first : usermove 26402 >first : f4g4
26402 >first : usermove 26402 >first : h3h5
26402 >first : usermove 26402 >first : f2f6
26402 >first : usermove 26402 >first : h5h6
26402 >first : usermove 26402 >first : c2e4
26402 >first : usermove 26402 >first : h6h2
26402 >first : usermove 26402 >first : g4g3
26402 >first : usermove 26402 >first : h2h7
26402 >first : usermove 26402 >first : g3g4
26402 >first : usermove 26402 >first : h7h2
26402 >first : usermove 26402 >first : f6g7
26402 >first : usermove 26402 >first : h2e2
26402 >first : usermove 26402 >first : g7h8
26402 >first : usermove 26402 >first : e8e7
26402 >first : usermove 26402 >first : g4f3
26402 >first : usermove 26402 >first : e2a2
26402 >first : usermove 26402 >first : h8c8
26402 >first : usermove 26402 >first : a2d2
26402 >first : usermove 26402 >first : c8c7
26402 >first : usermove 26402 >first : e7f8
26402 >first : usermove 26402 >first : c7d8
26402 >first : usermove 26402 >first : f8g7
26402 >first : usermove 26402 >first : d8f6
26402 >first : usermove 26402 >first : g7f8
26402 >first : usermove 26402 >first : e4g6
26402 >first : usermove 26402 >first : b7b5
26402 >first : usermove 26402 >first : a5b6
26412 >first : usermove 26412 >first : a7d7
26412 >first : usermove 26412 >first : g6e4
26412 >first : usermove 26412 >first : d2h2
26412 >first : usermove 26412 >first : c4c6
26412 >first : usermove 26412 >first : f8g8
26412 >first : usermove 26412 >first : c6c7
26412 >first : usermove 26412 >first : h2h3
26412 >first : usermove 26412 >first : f3g4
26412 >first : usermove 26412 >first : d7c7
26412 >first : usermove 26412 >first : b6c7
26412 >first : usermove 26412 >first : h3c3
26412 >first : name Guenther Simon
26412 >first : black
26412 >first : time 18000
26412 >first : otim 18000
26412 >first : white
book hit = (NULL)
26412 >first : go
nps: w=-1, b=-1
26422 <first : feature setboard=1 usermove=1 debug=1 ping=1 name=1 reuse=0 exclude=1 pause=1 sigint=0 sigterm=0 done=0
26422 >first : accepted setboard
26422 >first : accepted usermove
26422 >first : accepted debug
26422 >first : accepted ping
26422 >first : accepted name
26422 >first : accepted reuse
26422 >first : accepted exclude
26422 >first : accepted pause
26422 >first : accepted sigint
26422 >first : accepted sigterm
26422 >first : accepted done
26422 <first : feature option="UCI2WB debug output -check 0"
26432 >first : accepted option
26432 <first : feature option="ponder always -check 0"
26432 >first : accepted option
26432 <first : feature myname="Raven 0.60 (UCI2WB)"
26432 >first : accepted myname
26432 <first : feature variants="normal,xiangqi"
26432 >first : accepted variants
26432 <first : feature smp=1 memory=1 done=1
26432 >first : accepted smp
26432 >first : accepted memory
26432 >first : accepted done
26432 <first : Error (unknown command): cores
26432 <first : pong 3
26432 <first : Error (unknown command): black
26432 <first : Error (unknown command): white
26682 <first :   1    1585      0        107 f6d8
26692 <first :   2    1585      0        273 f6d8 g8g7
26692 <first :   3    1585      0        954 f6d8 g8g7 c7c8q
26692 <first :   4    1665      1       1798 f6d8 g8g7 c7c8q c3c8
26692 <first :   5    1676      1       3990 f6d8 g8g7 c7c8q c3c8 d8c8
26692 <first :   6    1744      1       5798 f6d8 g8g7 c7c8q c3c8 d8c8 a6a5
26702 <first :   7    1836      2      10267 f6d8 g8g7 c7c8q c3c8 d8f6 g7f8 f6h8
26722 <first :   8    1989      4      21050 f6d8 g8g7 c7c8q c3c8 d8f6 g7g8 f6f7 g8f7
26772 <first :   9    2252      9      49110 f6d8 g8g7 d8f6 g7g8 f6d8 g8g7 d8f6 g7g8 f6d8
26802 <first :  10    9999     12      59807 f6d8 g8g7 d8f6 g7g8 f6d8 g8g7 d8f6 g7g8 f6d8 g8g7
26802 <first : move f6d8
silence
26812 <first : 
31042 >first : time 17961
31042 >first : otim 17576
book hit = (NULL)
31042 >first : usermove 31042 >first : g8g7
31062 <first :   1    9999      0          1 d8f6
31062 <first : move d8f6
silence
31072 <first : 
32402 >first : time 17959
32402 >first : otim 17442
book hit = (NULL)
32402 >first : usermove 32402 >first : g7g8
32432 <first :   1    9999      0          0 f6d8
32432 <first : move f6d8
silence
32442 <first : 
33362 >first : time 17956
33362 >first : otim 17349
book hit = (NULL)
33362 >first : usermove 33362 >first : g8g7
33392 <first :   1    9999      0          0 d8f6
33392 <first : move d8f6
silence
33402 <first : 
34382 >first : force
34382 >first : usermove 34382 >first : g7g8
GameEnds(28, XBoard adjudication: repetition draw, 4)
34382 >first : result 1/2-1/2 {XBoard adjudication: repetition draw}
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
JimmyRustles
Posts: 32
Joined: Sun May 05, 2019 11:24 pm
Full name: Steven Griffin

Re: Bug in my engine

Post by JimmyRustles »

Thanks for the replies.

H.G. Muller, there's a client for lichess that allows you to run your engine on it. The client is here: https://github.com/ShailChoksi/lichess-bot

I don't use adjudication in my matches, so the games aren't ending due to adjudication. Like I said, when I run a local match in cutechess (with no adjudication), this problem never occurs, but it happens frequently on lichess.

Guenther, I tried that game and I wasn't able to reproduce it locally.

When I import that position after 69... Rc3 and do a search, it gives this:

info depth 1 seldepth 6 nodes 62 time 0 nps -2147483648 score cp 1645 pv f6d8
info depth 2 seldepth 10 nodes 227 time 10 nps 22700 score cp 1645 pv f6d8 g8g7
info depth 3 seldepth 10 nodes 516 time 16 nps 32250 score cp 1645 pv f6d8 g8g7 c7c8q
info depth 4 seldepth 12 nodes 1612 time 30 nps 53733 score cp 9999 pv f6g5 g8f8 g5h6 f8e7

No repetitions in the pv, and it seems to have found the mate. When I play each move and do a search after each move, it still finds the moves that lead to mate until it mates. Also, when I load the game into xboard, it plays the moves that lead to mate. I'm reallsy stumped on this.
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Bug in my engine

Post by Guenther »

That's really weird, as shown before I get that erronous behaviour here with feeding the whole game,
but I also get it here when just pasting the FEN, both done in WB.

I tried it now in CuteChess (GUI version 1.10dev from April slightly modified compile by myself)
and I get the same error here with pasting the FEN and letting it play out against itself.

Did you use the exact same version, which was playing at Lichess in your previous local test,
or may be a debug version? Are you on Windows or on Linux? Is the machine for Lichess the same as in your previous test?
My tests were with the officially available windows version from your github release.
Hopefully no Heisenbug ;-)

CuteChess debug
(Edit: I had not changed the tc from a fast test before though...Funny also that I see now that being on the lost side
there is no trace for repetition)

Code: Select all

<Raven_060-64(0): readyok
>Raven_060-64(0): go wtime 40000 btime 40000 movestogo 40
<Raven_060-64(0): movestogo 40 movetime 1600
<Raven_060-64(0): info depth 1 seldepth 6 nodes 107 time 0 nps -2147483648 score cp 1585 pv f6d8
<Raven_060-64(0): info depth 2 seldepth 10 nodes 273 time 1 nps 273000 score cp 1585 pv f6d8 g8g7
<Raven_060-64(0): info depth 3 seldepth 10 nodes 954 time 3 nps 318000 score cp 1585 pv f6d8 g8g7 c7c8q
<Raven_060-64(0): info depth 4 seldepth 12 nodes 1798 time 3 nps 599333 score cp 1665 pv f6d8 g8g7 c7c8q c3c8
<Raven_060-64(0): info depth 5 seldepth 12 nodes 3990 time 3 nps 1330000 score cp 1676 pv f6d8 g8g7 c7c8q c3c8 d8c8
<Raven_060-64(0): info depth 6 seldepth 15 nodes 5798 time 3 nps 1932666 score cp 1744 pv f6d8 g8g7 c7c8q c3c8 d8c8 a6a5
<Raven_060-64(0): info depth 7 seldepth 15 nodes 10267 time 13 nps 789769 score cp 1836 pv f6d8 g8g7 c7c8q c3c8 d8f6 g7f8 f6h8
<Raven_060-64(0): info depth 8 seldepth 18 nodes 21055 time 33 nps 638030 score cp 1989 pv f6d8 g8g7 c7c8q c3c8 d8f6 g7g8 f6f7 g8f7
<Raven_060-64(0): info depth 9 seldepth 24 nodes 48861 time 73 nps 669328 score cp 2252 pv f6d8 g8g7 d8f6 g7g8 f6d8 g8g7 d8f6 g7g8 f6d8
<Raven_060-64(0): info depth 10 seldepth 24 nodes 59561 time 103 nps 578262 score cp 9999 pv f6d8 g8g7 d8f6 g7g8 f6d8 g8g7 d8f6 g7g8 f6d8 g8g7
<Raven_060-64(0): info time 103
<Raven_060-64(0): bestmove f6d8
>Raven_060-64(1): position fen 6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70 moves f6d8
>Raven_060-64(1): isready
<Raven_060-64(1): readyok
>Raven_060-64(1): go wtime 39895 btime 40000 movestogo 40
<Raven_060-64(1): info depth 1 seldepth 9 nodes 58 time 0 nps -2147483648 score cp -1585 pv g8g7
<Raven_060-64(1): info depth 2 seldepth 9 nodes 292 time 0 nps -2147483648 score cp -1585 pv g8g7 c7c8q
<Raven_060-64(1): info depth 3 seldepth 11 nodes 708 time 0 nps -2147483648 score cp -1665 pv g8g7 c7c8q c3c8
<Raven_060-64(1): info depth 4 seldepth 11 nodes 1412 time 0 nps -2147483648 score cp -1676 pv g8g7 c7c8q c3c8 d8c8
<Raven_060-64(1): info depth 5 seldepth 13 nodes 3542 time 0 nps -2147483648 score cp -1744 pv g8g7 c7c8q c3c8 d8g5 g7f8
<Raven_060-64(1): info depth 6 seldepth 15 nodes 6966 time 10 nps 696600 score cp -1836 pv g8g7 c7c8q c3c8 d8g5 g7f8 g5h6
<Raven_060-64(1): info depth 7 seldepth 18 nodes 13889 time 30 nps 462966 score cp -1989 pv g8g7 c7c8q c3c8 d8g5 g7f8 g5h6 f8e8
<Raven_060-64(1): info depth 8 seldepth 22 nodes 35981 time 70 nps 514014 score cp -2092 pv g8g7 c7c8q c3c8 d8g5 g7f8 g5h6 f8e8 e4c6
<Raven_060-64(1): info depth 9 seldepth 23 nodes 70922 time 130 nps 545553 score cp -9999 pv g8g7 c7c8q c3c8 d8c8 f7f6 e5f6 g7f7 c8h8 e6e5
<Raven_060-64(1): info time 140
<Raven_060-64(1): bestmove g8g7
>Raven_060-64(0): position fen 6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70 moves f6d8 g8g7
>Raven_060-64(0): isready
<Raven_060-64(0): readyok
>Raven_060-64(0): go wtime 39895 btime 39863 movestogo 39
<Raven_060-64(0): movestogo 39 movetime 1595
<Raven_060-64(0): info depth 1 seldepth 3 nodes 1 time 0 nps -2147483648 score cp 9999 pv d8f6
<Raven_060-64(0): info time 0
<Raven_060-64(0): bestmove d8f6
>Raven_060-64(1): position fen 6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70 moves f6d8 g8g7 d8f6
>Raven_060-64(1): isready
<Raven_060-64(1): readyok
>Raven_060-64(1): go wtime 39895 btime 39863 movestogo 39
<Raven_060-64(1): info depth 1 seldepth 7 nodes 85 time 0 nps -2147483648 score cp -9999 pv g7g8
<Raven_060-64(1): info time 0
<Raven_060-64(1): bestmove g7g8
>Raven_060-64(0): position fen 6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70 moves f6d8 g8g7 d8f6 g7g8
>Raven_060-64(0): isready
<Raven_060-64(0): readyok
>Raven_060-64(0): go wtime 39895 btime 39863 movestogo 38
<Raven_060-64(0): movestogo 38 movetime 1595
<Raven_060-64(0): info depth 1 seldepth 3 nodes 0 time 0 nps -2147483648 score cp 9999 pv f6d8
<Raven_060-64(0): info time 0
<Raven_060-64(0): bestmove f6d8
>Raven_060-64(1): position fen 6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70 moves f6d8 g8g7 d8f6 g7g8 f6d8
>Raven_060-64(1): isready
<Raven_060-64(1): readyok
>Raven_060-64(1): go wtime 39895 btime 39863 movestogo 38
<Raven_060-64(1): info depth 1 seldepth 7 nodes 51 time 0 nps -2147483648 score cp -2456 pv g8g7
<Raven_060-64(1): info depth 2 seldepth 7 nodes 76 time 0 nps -2147483648 score cp -9999 pv g8g7 c7c8q
<Raven_060-64(1): info time 0
<Raven_060-64(1): bestmove g8g7
>Raven_060-64(0): position fen 6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70 moves f6d8 g8g7 d8f6 g7g8 f6d8 g8g7
>Raven_060-64(0): isready
<Raven_060-64(0): readyok
>Raven_060-64(0): go wtime 39895 btime 39862 movestogo 37
<Raven_060-64(0): movestogo 37 movetime 1595
<Raven_060-64(0): info depth 1 seldepth 0 nodes 0 time 0 nps -2147483648 score cp 9999 pv d8f6
<Raven_060-64(0): info time 0
<Raven_060-64(0): bestmove d8f6
>Raven_060-64(1): position fen 6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70 moves f6d8 g8g7 d8f6 g7g8 f6d8 g8g7 d8f6
>Raven_060-64(1): isready
<Raven_060-64(1): readyok
>Raven_060-64(1): go wtime 39895 btime 39862 movestogo 37
<Raven_060-64(1): info depth 1 seldepth 0 nodes 0 time 0 nps -2147483648 score cp -9999 pv g7g8
<Raven_060-64(1): info time 0
<Raven_060-64(1): bestmove g7g8
>Raven_060-64(0): position fen 6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70 moves f6d8 g8g7 d8f6 g7g8 f6d8 g8g7 d8f6 g7g8
>Raven_060-64(0): isready
>Raven_060-64(1): isready
<Raven_060-64(0): readyok
<Raven_060-64(1): readyok
[pgn][Event "CuteChess 1.10dev 20190427"] [Site "RWBC Win7U-64 Q8200 2.33Ghz Nvidia GT 710"] [Date "2019.12.20"] [Round "?"] [White "Raven_060-64"] [Black "Raven_060-64"] [Result "1/2-1/2"] [FEN "6k1/2P2p2/p3pQ2/4P3/1P1PB1K1/2r5/8/8 w - - 1 70"] [PlyCount "8"] [SetUp "1"] [TimeControl "40/40"] 1. Qd8+ {+99.99/10 0.10s} Kg7 {-99.99/9 0.14s} 2. Qf6+ {+99.99/1 0s} Kg8 {-99.99/1 0s} 3. Qd8+ {+99.99/1 0s} Kg7 {-99.99/2 0.001s} 4. Qf6+ {+99.99/1 0s} Kg8 {-99.99/1 0s, Draw by 3-fold repetition} 1/2-1/2[/pgn]
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
JimmyRustles
Posts: 32
Joined: Sun May 05, 2019 11:24 pm
Full name: Steven Griffin

Re: Bug in my engine

Post by JimmyRustles »

I was trying it with my local version which has some differences to 0.60. I just tried it with 0.60 and it still gives the correct mating sequence. The lichess raven is also my local version but I know the bug existed in 0.60 as this bug has been ongoing for months.

I'm on Windows and I'm using the same machine for lichess as my local test.

Someone's suggested that it might be a problem with the transposition table, so I'm going to try disabling the TT and running some lichess games and see if it still happens. He said it might be worth trying to clear the TT between searches. I'll see if I can get anywhere with it. I still don't understand why it happens on lichess but not locally for me.
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Bug in my engine

Post by Guenther »

JimmyRustles wrote: Fri Dec 20, 2019 3:40 pm I was trying it with my local version which has some differences to 0.60. I just tried it with 0.60 and it still gives the correct mating sequence. The lichess raven is also my local version but I know the bug existed in 0.60 as this bug has been ongoing for months.

I'm on Windows and I'm using the same machine for lichess as my local test.

Someone's suggested that it might be a problem with the transposition table, so I'm going to try disabling the TT and running some lichess games and see if it still happens. He said it might be worth trying to clear the TT between searches. I'll see if I can get anywhere with it. I still don't understand why it happens on lichess but not locally for me.
At least it is not a Lichess problem, as it happens on my machine too.
Did it happen in CCRL games too before (Edit: Cannot happen there because of adjudication), or any reports outside your own machine?


The logs from my tests suggest that once it has found a mate, even when the PV shows a three time rep
it skips the search and just plays the rest from the TT.
No idea why it does it not on your machine, except in Lichess games.
Last edited by Guenther on Fri Dec 20, 2019 3:59 pm, edited 1 time in total.
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
JimmyRustles
Posts: 32
Joined: Sun May 05, 2019 11:24 pm
Full name: Steven Griffin

Re: Bug in my engine

Post by JimmyRustles »

It hasn't happened in a CCRL game that I know of, but i think that's because they're adjudicated before it'd happen. I haven't had any reports of it happening to anyone else. Weird how it happens on your machine but not mine.
User avatar
JimmyRustles
Posts: 32
Joined: Sun May 05, 2019 11:24 pm
Full name: Steven Griffin

Re: Bug in my engine

Post by JimmyRustles »

Thanks for your help anyway. Hopefully I'll be able to get somewhere with this bug.