Progress on Blunder

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

Moderator: Ras

User avatar
Rebel
Posts: 7435
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Progress on Blunder

Post by Rebel »

Yeah, the last bug is the hardest one :D
90% of coding is debugging, the other 10% is writing bugs.
User avatar
algerbrex
Posts: 608
Joined: Sun May 30, 2021 5:03 am
Location: United States
Full name: Christian Dean

Re: Progress on Blunder

Post by algerbrex »

amanjpro wrote: Tue Dec 14, 2021 6:27 pm
algerbrex wrote: Tue Dec 14, 2021 5:59 pm
Rebel wrote: Tue Dec 14, 2021 4:55 pm Another crash, can't discover a logfile.
An 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.
Ed 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.

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
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.
jtwright
Posts: 48
Joined: Wed Sep 22, 2021 9:20 pm
Full name: Jeremy Wright

Re: Progress on Blunder

Post by jtwright »

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.
User avatar
algerbrex
Posts: 608
Joined: Sun May 30, 2021 5:03 am
Location: United States
Full name: Christian Dean

Re: Progress on Blunder

Post by algerbrex »

jtwright wrote: Tue Dec 14, 2021 10:00 pm 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.
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 :lol:
User avatar
algerbrex
Posts: 608
Joined: Sun May 30, 2021 5:03 am
Location: United States
Full name: Christian Dean

Re: Progress on Blunder

Post by algerbrex »

Rebel wrote: Tue Dec 14, 2021 6:56 pm Yeah, the last bug is the hardest one :D
Well thanks anyway. I’m going to be looking into tracking this down before I release another version.
User avatar
Rebel
Posts: 7435
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Progress on Blunder

Post by Rebel »

algerbrex wrote: Tue Dec 14, 2021 9:49 pm
amanjpro wrote: Tue Dec 14, 2021 6:27 pm
algerbrex wrote: Tue Dec 14, 2021 5:59 pm
Rebel wrote: Tue Dec 14, 2021 4:55 pm Another crash, can't discover a logfile.
An 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.
Ed 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.

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
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.
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.
90% of coding is debugging, the other 10% is writing bugs.
User avatar
algerbrex
Posts: 608
Joined: Sun May 30, 2021 5:03 am
Location: United States
Full name: Christian Dean

Re: Progress on Blunder

Post by algerbrex »

Rebel wrote: Tue Dec 14, 2021 6:56 pm ...
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.
User avatar
Rebel
Posts: 7435
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Progress on Blunder

Post by Rebel »

Got it, logfile is working, will restart the match tomorrow.
90% of coding is debugging, the other 10% is writing bugs.
User avatar
Rebel
Posts: 7435
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Progress on Blunder

Post by Rebel »

After 768 games :

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
If you want the whole logfile I will send you a download link in PM.

Hopefully it gives you a clue!

Good luck.
90% of coding is debugging, the other 10% is writing bugs.
User avatar
algerbrex
Posts: 608
Joined: Sun May 30, 2021 5:03 am
Location: United States
Full name: Christian Dean

Re: Progress on Blunder

Post by algerbrex »

Rebel wrote: Thu Dec 16, 2021 11:06 am After 768 games :

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
If you want the whole logfile I will send you a download link in PM.

Hopefully it gives you a clue!

Good luck.
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!