Progress on Blunder
Moderator: Ras
-
Rebel
- Posts: 7435
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Progress on Blunder
Yeah, the last bug is the hardest one 
90% of coding is debugging, the other 10% is writing bugs.
-
algerbrex
- Posts: 608
- Joined: Sun May 30, 2021 5:03 am
- Location: United States
- Full name: Christian Dean
Re: Progress on Blunder
Thanks, I was going to ask Ed for some info. I’ll probably just do that and see if I can track something down. Although I still may also give Ed a version of Blunder that does some logging itself.amanjpro wrote: ↑Tue Dec 14, 2021 6:27 pmEd is running the matches in 40/120 TC. Have you tried to run a selfplay match between with a similar TC with `-debug` flag enabled? Leave it overnight. A day, a week, you will catch it almost certainly.algerbrex wrote: ↑Tue Dec 14, 2021 5:59 pmAn damnit. Knew I forgot something. I took that code out because I wanted to clean it up before I merged it into main and never added it back in. That’s why no log file. The code’s still sitting on my laptop.
Since this seems to be a consistent crash that keeps happening, I might just release a hotfix version with the logging code so we can finally get to the bottom of this.
In the meanwhile, would it not be possible to use the stderr option with cutechess to produce a log file for Blunder specifically? Cutechess should log whatever exception Blunder is crashing with there.
You can make blunder very noisy and write debugging lines in a file. You are not interested in speed, you are interested in verbosity at this point
-
jtwright
- Posts: 48
- Joined: Wed Sep 22, 2021 9:20 pm
- Full name: Jeremy Wright
Re: Progress on Blunder
Also, I know "no logs" was said, but does that include PGN? If the PGN for the games is being recorded at all I imagine the abrupt end of a game in a non-ending position would be very conspicuous.
Mantissa: https://github.com/jtheardw/mantissa
-
algerbrex
- Posts: 608
- Joined: Sun May 30, 2021 5:03 am
- Location: United States
- Full name: Christian Dean
Re: Progress on Blunder
I’ll be looking at that and hopefully be able to find something there that causes Blunder to crash.
My laziness and neglecting to put proper logging into Blunder is starting to catch up with me
-
algerbrex
- Posts: 608
- Joined: Sun May 30, 2021 5:03 am
- Location: United States
- Full name: Christian Dean
-
Rebel
- Posts: 7435
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Progress on Blunder
Sure, make a debug version and I will run it for you, as the initial programmer of Komodo (Don Daily) said, the only good bug is a dead bug.algerbrex wrote: ↑Tue Dec 14, 2021 9:49 pmThanks, I was going to ask Ed for some info. I’ll probably just do that and see if I can track something down. Although I still may also give Ed a version of Blunder that does some logging itself.amanjpro wrote: ↑Tue Dec 14, 2021 6:27 pmEd is running the matches in 40/120 TC. Have you tried to run a selfplay match between with a similar TC with `-debug` flag enabled? Leave it overnight. A day, a week, you will catch it almost certainly.algerbrex wrote: ↑Tue Dec 14, 2021 5:59 pmAn damnit. Knew I forgot something. I took that code out because I wanted to clean it up before I merged it into main and never added it back in. That’s why no log file. The code’s still sitting on my laptop.
Since this seems to be a consistent crash that keeps happening, I might just release a hotfix version with the logging code so we can finally get to the bottom of this.
In the meanwhile, would it not be possible to use the stderr option with cutechess to produce a log file for Blunder specifically? Cutechess should log whatever exception Blunder is crashing with there.
You can make blunder very noisy and write debugging lines in a file. You are not interested in speed, you are interested in verbosity at this point
90% of coding is debugging, the other 10% is writing bugs.
-
algerbrex
- Posts: 608
- Joined: Sun May 30, 2021 5:03 am
- Location: United States
- Full name: Christian Dean
Re: Progress on Blunder
Hey Ed,
I PMed you a version of Blunder that should be capable of logging. The logging is a UCI option that I've automatically set to true for this compilation. Blunder should now be logging all IO operations into and out of the engine, as well as capturing fatal errors that occur during execution. All of this
info should be written to a file named "debug_log.txt". You should see this file created automatically when you start testing Blunder again in whatever folder the engines are in.
The next time Blunder crashes while testing, you should be able to open this file up and copy and paste the crash information. This should let me track down the bug pretty easily.
The executable is for windows, which I assumed was your platform? If not, let me know and I can make a compilation for Linux or MacOS.
Thanks.
-
Rebel
- Posts: 7435
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Progress on Blunder
Got it, logfile is working, will restart the match tomorrow.
90% of coding is debugging, the other 10% is writing bugs.
-
Rebel
- Posts: 7435
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Progress on Blunder
After 768 games :
If you want the whole logfile I will send you a download link in PM.
Hopefully it gives you a clue!
Good luck.
Code: Select all
2021/12/16 10:48:56 The position the best move was sent in is:
8 | r . . . . r k .
7 | i i i n b i i i
6 | . . . . . . . .
5 | . . . I . . . .
4 | . . I I . . b .
3 | I . . . K N . .
2 | . I . . B . I I
1 | R N . . . . . R
----------------
a b c d e f g h
turn: white
castling rights:
en passant: none
fen: r4rk1/pppnbppp/8/3P4/2PP2b1/P3KN2/1P2B1PP/RN5R w - - 1 17
zobrist hash: 0xabcf9ff4b9c74143
rule 50: 1
game ply: 34
2021/12/16 10:48:56 command ["quit\n"] was sent to the engine
2021/12/16 10:48:56 command ["quit\n"] was sent to the engine
2021/12/16 10:48:56 command ["quit\n"] was sent to the engine
2021/12/16 10:48:56 command ["quit\n"] was sent to the engine
2021/12/16 10:48:56 command ["quit\n"] was sent to the engineHopefully it gives you a clue!
Good luck.
90% of coding is debugging, the other 10% is writing bugs.
-
algerbrex
- Posts: 608
- Joined: Sun May 30, 2021 5:03 am
- Location: United States
- Full name: Christian Dean
Re: Progress on Blunder
Ah, thanks, I got the PM. Nice to see the logging work and now it should give me a good clue of what's going on!Rebel wrote: ↑Thu Dec 16, 2021 11:06 am After 768 games :
If you want the whole logfile I will send you a download link in PM.Code: Select all
2021/12/16 10:48:56 The position the best move was sent in is: 8 | r . . . . r k . 7 | i i i n b i i i 6 | . . . . . . . . 5 | . . . I . . . . 4 | . . I I . . b . 3 | I . . . K N . . 2 | . I . . B . I I 1 | R N . . . . . R ---------------- a b c d e f g h turn: white castling rights: en passant: none fen: r4rk1/pppnbppp/8/3P4/2PP2b1/P3KN2/1P2B1PP/RN5R w - - 1 17 zobrist hash: 0xabcf9ff4b9c74143 rule 50: 1 game ply: 34 2021/12/16 10:48:56 command ["quit\n"] was sent to the engine 2021/12/16 10:48:56 command ["quit\n"] was sent to the engine 2021/12/16 10:48:56 command ["quit\n"] was sent to the engine 2021/12/16 10:48:56 command ["quit\n"] was sent to the engine 2021/12/16 10:48:56 command ["quit\n"] was sent to the engine
Hopefully it gives you a clue!
Good luck.