Progress On Bricabrac

Discussion of chess software programming and technical issues.

Moderators: hgm, chrisw, Rebel

Pio
Posts: 335
Joined: Sat Feb 25, 2012 10:42 pm
Location: Stockholm

Re: Progress On Bricabrac

Post by Pio »

Mike Sherwin wrote: Wed Apr 28, 2021 10:21 pm I have discovered that the "impossible to find bug" does not happen in debug mode. :?
It only happens in release mode. :shock:
It happens even if all optimizations are disabled. :roll:

All this time I thought I had become too stupid to logically think correctly. :oops:
But, it is not me. :D
It's MicroSoft! :evil:

Now I don't know what I am going to do :?:

If anyone wants to help it happens at depth one in this position.
[d]7K/8/7p/1k5P/4P1P1/2P5/B7/8 w - - 16 64
FEN: 7K/8/7p/1k5P/4P1P1/2P5/8/1B6 w - - 0 65

Bricabrac:
1 00:00 16 16 +M0 a2b1
2 00:00 146 146 +M0 a2b1
3 00:00 1k 1k +M0 a2b1
4 00:00 11k 11k +M0 a2b1
5 00:00 36k 36k +M0 a2b1
6 00:00 37k 37k +M0 a2b1
7 00:00 38k 38k +M0 a2b1
8 00:00 44k 44k +M0 a2b1
9 00:00 58k 58k +M0 a2b1
10 00:00 97k 97k +M0 a2b1
11 00:00 187k 187k +M0 a2b1
12 00:00 435k 43,496k +M0 a2b1
13 00:00 998k 24,939k +M0 a2b1

It first shows up in this position.
[d]8/8/P2k3p/7P/4PKP1/1BP5/8/8 b - - 0 53
FEN: 8/8/P2k3p/7P/4PKP1/1BP5/8/8 b - - 0 53

Bricabrac:
1 00:00 8 8 -8.24 d6c5
2 00:00 59 59 -9.08 d6c5 a6a7
3 00:00 351 351 -9.40 d6c6 a6a7 c6b7
4 00:00 1k 1k -8.88 d6c6 f4e5 c6b6 b3c4
5 00:00 3k 3k -8.64 d6c6 f4e5 c6b6 b3c4 b6c5
6 00:00 8k 8k -9.00 d6c6 f4e5 c6c7 e5e6 c7b6 b3c4
7 00:00 14k 14k -9.00 d6c6 f4e5 c6b6 b3c4 b6a7 e5e6 a7b6
8 00:00 53k 53k -9.35 d6c6 b3c4 c6b6 f4f5 b6a7 f5g6 a7b6 g6h6
9 00:00 77k 77k -14.64 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5
10 00:00 711k 23,688k -M0 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5
Do you get any warnings when you compile the project? If so, fix the warnings. I would guess that there might be some uninitialised variables that might cause the problem.

If you just look at the position it is very seldom the white king is in the upper corner so it might have to do with that it might be the last bit or that maybe you did the same error I once made only generating moves from squares from 1 to 63 (and not from 0 to 63).

Good luck finishing off the bug!
Mike Sherwin
Posts: 925
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Progress On Bricabrac

Post by Mike Sherwin »

Sven wrote: Wed Apr 28, 2021 10:52 pm Just a stupid thought ... The debug version might differ from the release version through #ifdef or assert(...) or something like that ...
Hi Sven,

There are no #ifdef directives and no current assert(...).
Mike Sherwin
Posts: 925
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Progress On Bricabrac

Post by Mike Sherwin »

Sven wrote: Wed Apr 28, 2021 10:54 pm
Mike Sherwin wrote: Wed Apr 28, 2021 10:50 pm Begin Depth 12
12 -1512 188 6571306 d6c6 e4e5 c6b6 e5e6 b6c6 a6a7 c6b7 e6e7 b7a7 e7e8q╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠♦ a7b6 f4e5

Begin Depth 13
13 -1536 642 21469963 d6c6 e4e5 c6b6 e5e6 b6c6 f4e5 c6c7 b3d5 c7b6 e6e7 b6a6 e5e6 a6b6

Begin Depth 14
14 -1555 2610 91415295 d6c6 e4e5 c6b6 e5e6 b6c6 f4e5 c6c7 b3d5 c7b6 e6e7 b6a6 e7e8q╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠♦ a6b6 e8e7
Promotion related?
Probably!
Mike Sherwin
Posts: 925
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Progress On Bricabrac

Post by Mike Sherwin »

Pio wrote: Wed Apr 28, 2021 11:02 pm
Mike Sherwin wrote: Wed Apr 28, 2021 10:21 pm I have discovered that the "impossible to find bug" does not happen in debug mode. :?
It only happens in release mode. :shock:
It happens even if all optimizations are disabled. :roll:

All this time I thought I had become too stupid to logically think correctly. :oops:
But, it is not me. :D
It's MicroSoft! :evil:

Now I don't know what I am going to do :?:

If anyone wants to help it happens at depth one in this position.
[d]7K/8/7p/1k5P/4P1P1/2P5/B7/8 w - - 16 64
FEN: 7K/8/7p/1k5P/4P1P1/2P5/8/1B6 w - - 0 65

Bricabrac:
1 00:00 16 16 +M0 a2b1
2 00:00 146 146 +M0 a2b1
3 00:00 1k 1k +M0 a2b1
4 00:00 11k 11k +M0 a2b1
5 00:00 36k 36k +M0 a2b1
6 00:00 37k 37k +M0 a2b1
7 00:00 38k 38k +M0 a2b1
8 00:00 44k 44k +M0 a2b1
9 00:00 58k 58k +M0 a2b1
10 00:00 97k 97k +M0 a2b1
11 00:00 187k 187k +M0 a2b1
12 00:00 435k 43,496k +M0 a2b1
13 00:00 998k 24,939k +M0 a2b1

It first shows up in this position.
[d]8/8/P2k3p/7P/4PKP1/1BP5/8/8 b - - 0 53
FEN: 8/8/P2k3p/7P/4PKP1/1BP5/8/8 b - - 0 53

Bricabrac:
1 00:00 8 8 -8.24 d6c5
2 00:00 59 59 -9.08 d6c5 a6a7
3 00:00 351 351 -9.40 d6c6 a6a7 c6b7
4 00:00 1k 1k -8.88 d6c6 f4e5 c6b6 b3c4
5 00:00 3k 3k -8.64 d6c6 f4e5 c6b6 b3c4 b6c5
6 00:00 8k 8k -9.00 d6c6 f4e5 c6c7 e5e6 c7b6 b3c4
7 00:00 14k 14k -9.00 d6c6 f4e5 c6b6 b3c4 b6a7 e5e6 a7b6
8 00:00 53k 53k -9.35 d6c6 b3c4 c6b6 f4f5 b6a7 f5g6 a7b6 g6h6
9 00:00 77k 77k -14.64 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5
10 00:00 711k 23,688k -M0 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5
Do you get any warnings when you compile the project? If so, fix the warnings. I would guess that there might be some uninitialised variables that might cause the problem.

If you just look at the position it is very seldom the white king is in the upper corner so it might have to do with that it might be the last bit or that maybe you did the same error I once made only generating moves from squares from 1 to 63 (and not from 0 to 63).

Good luck finishing off the bug!
Only one warning.
Severity Code Description Project File Line Suppression State
Warning C26812 The enum type '<unnamed-enum-OO>' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). Bricabrac D:\source\repos\Bricabrac\Bricabrac.cpp 2282

And it does have something to do with promotion.
case 'n':
move.type = wtm ? Wn : Bn;
break;
Thanks! :D
Mike Sherwin
Posts: 925
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Progress On Bricabrac

Post by Mike Sherwin »

Replacing

enum {
OO, WP, WN, WB, WR, WRC, WQ, WK, WC, BP, BN, BB, BR, BRC, BQ, BK, BC, 16
Wd, We, Wb, Wr, Wn, Wq, Bd, Be, Bb, Br, Bn, Bq, WS, WL, BS, BL

With

constexpr auto OO = 0;
constexpr auto WP = 1;
constexpr auto WN = 2;
constexpr auto WB = 3;
constexpr auto WR = 4;
constexpr auto WRC = 5;
constexpr auto WQ = 6;
constexpr auto WK = 7;
constexpr auto WC = 8;
constexpr auto BP = 9;
constexpr auto BN = 10;
constexpr auto BB = 11;
constexpr auto BR = 12;
constexpr auto BRC = 13;
constexpr auto BQ = 14;
constexpr auto BK = 15;
constexpr auto BC = 16;
constexpr auto Wd = 17;
constexpr auto We = 18;
constexpr auto Wb = 19;
constexpr auto Wr = 20;
constexpr auto Wn = 21;
constexpr auto Wq = 22;
constexpr auto Bd = 23;
constexpr auto Be = 24;
constexpr auto Bb = 25;
constexpr auto Br = 26;
constexpr auto Bn = 27;
constexpr auto Bq = 28;
constexpr auto WS = 29;
constexpr auto WL = 30;
constexpr auto BS = 31;
constexpr auto BL = 32;

Got rid of the warning but did not change the behavior. So the bug must be in the promotion code.
Mike Sherwin
Posts: 925
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Progress On Bricabrac

Post by Mike Sherwin »

Despite the only warning having something to do with promotion and the spurious characters in the pv it was a "red herring". The spurious characters were caused by me not terminating the move string after appending the promotion type.

Code: Select all

      xbmove[0] = 'a' + (pvs[0][i].fs & 7);
      xbmove[1] = '1' + (pvs[0][i].fs >> 3);
      xbmove[2] = 'a' + (pvs[0][i].ts & 7);
      xbmove[3] = '1' + (pvs[0][i].ts >> 3);
      xbmove[4] = '\0';
//      if (pvs[0][i].type == Wq || pvs[0][i].type == Bq) { xbmove[4] = 'q'; xbmove[5] = '\0'; }
//      vs.
//      if (pvs[0][i].type == Wq || pvs[0][i].type == Bq) xbmove[4] = 'q'; 
      
So now it is back to Bricabrac running fine in debug mode and flaking out in release mode.

Arena running the debug build.
FEN: 8/P7/3k3p/7P/4PpP1/1BP2K2/8/8 b - - 0 53

Bricabrac:
1 00:00 19 19 +8.24 f3f4
2 00:00 98 98 +14.09 a6a7 d6e5
3 00:00 467 467 +14.09 a6a7 d6e5 a7a8q
4 00:00 2k 2k +15.21 a6a7 d6e5 a7a8q e5d6
5 00:00 8k 8k +15.21 a6a7 d6e5 a7a8q e5d6 f3f4
6 00:00 14k 14k +15.80 a6a7 d6d7 a7a8q d7e7 a8d5 e7f6
7 00:00 29k 29k +15.75 a6a7 d6e5 a7a8q e5d6 f3f4 d6c5 a8d5
8 00:00 62k 6,205k +15.95 a6a7 d6e5 a7a8q e5f6 f3f4 f6g7 a8d8 g7h7
9 00:00 191k 3,816k +15.91 a6a7 d6e7 f3f4 e7f6 b3c4 f6e7 a7a8q e7d6 a8d5
10 00:00 619k 3,643k +16.56 a6a7 d6e5 a7a8q e5d6 a8d5 d6c7 f3f4 c7b6 d5d6 b6b5

Arena running the release build.
FEN: 8/8/P2k3p/7P/4PKP1/1BP5/8/8 b - - 0 53

Bricabrac:
1 00:00 8 8 -8.24 d6c5
2 00:00 59 59 -9.08 d6c5 a6a7
3 00:00 352 352 -9.40 d6c6 a6a7 c6b7
4 00:00 1k 1k -8.88 d6c6 f4e5 c6b6 b3c4
5 00:00 3k 3k -8.64 d6c6 f4e5 c6b6 b3c4 b6c5
6 00:00 8k 8k -9.00 d6c6 f4e5 c6c7 e5e6 c7b6 b3c4
7 00:00 14k 14k -9.00 d6c6 f4e5 c6b6 b3c4 b6a7 e5e6 a7b6
8 00:00 53k 53k -9.35 d6c6 b3c4 c6b6 f4f5 b6a7 f5g6 a7b6 g6h6
9 00:00 83k 83k -14.64 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5
10 00:00 718k 23,931k -M0 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5

So now what do I do? I can't afford learning a new compiler because of my learning disability and the time that would take me. Please, can someone verify the compiler (MSVS 2019 Community) issue and find a solution?
https://www.mediafire.com/file/zm7tbv8o ... c.zip/file
Mike Sherwin
Posts: 925
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Progress On Bricabrac

Post by Mike Sherwin »

I goofed that up. Let me try again.

Arena running the debug build.
FEN: 8/8/P1k4p/7P/4PKP1/1BP5/8/8 w - - 1 54

Bricabrac:
1 00:00 8 8 -8.24 d6c5
2 00:00 59 59 -9.08 d6c5 a6a7
3 00:00 352 352 -9.40 d6c6 a6a7 c6b7
4 00:00 1k 1k -8.88 d6c6 f4e5 c6b6 b3c4
5 00:00 3k 3k -8.64 d6c6 f4e5 c6b6 b3c4 b6c5
6 00:00 8k 8k -9.00 d6c6 f4e5 c6c7 e5e6 c7b6 b3c4
7 00:00 14k 14k -9.00 d6c6 f4e5 c6b6 b3c4 b6a7 e5e6 a7b6
8 00:00 55k 5,510k -9.35 d6c6 b3c4 c6b6 f4f5 b6a7 f5g6 a7b6 g6h6
9 00:00 85k 4,255k -14.64 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5
10 00:00 373k 3,728k -11.10 d6c6 b3c4 c6b6 e4e5 b6c6 e5e6 c6c7 a6a7 c7b7 e6e7

Arena running the release build.
FEN: 8/8/P2k3p/7P/4PKP1/1BP5/8/8 b - - 0 53

Bricabrac:
1 00:00 8 8 -8.24 d6c5
2 00:00 59 59 -9.08 d6c5 a6a7
3 00:00 352 352 -9.40 d6c6 a6a7 c6b7
4 00:00 1k 1k -8.88 d6c6 f4e5 c6b6 b3c4
5 00:00 3k 3k -8.64 d6c6 f4e5 c6b6 b3c4 b6c5
6 00:00 8k 8k -9.00 d6c6 f4e5 c6c7 e5e6 c7b6 b3c4
7 00:00 14k 14k -9.00 d6c6 f4e5 c6b6 b3c4 b6a7 e5e6 a7b6
8 00:00 53k 53k -9.35 d6c6 b3c4 c6b6 f4f5 b6a7 f5g6 a7b6 g6h6
9 00:00 83k 83k -14.64 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5
10 00:00 718k 23,931k -M0 d6c6 a6a7 c6b7 e4e5 b7a7 e5e6 a7b6 e6e7 b6c5
Mike Sherwin
Posts: 925
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Progress On Bricabrac

Post by Mike Sherwin »

Bricabrac debug build vs TSCP181 :lol:
[pgn][Event "TSCP.at"]
[Site "DESKTOP-HFVHK2B"]
[Date "2021.04.28"]
[Round "3"]
[White "Bricabrac"]
[Black "Tscp181"]
[Result "1-0"]
[BlackElo "2200"]
[ECO "A90"]
[Opening "Dutch"]
[Time "19:10:33"]
[Variation "2.c4 Nf6 3.g3 e6 4.Bg2 d5"]
[WhiteElo "2000"]
[TimeControl "5+0"]
[Termination "normal"]
[PlyCount "115"]
[WhiteType "human"]
[BlackType "human"]

1. d4 f5 2. c4 Nf6 3. g3 e6 4. Bg2 d5 {(d7d5 g1f3 d5c4 d1a4 b8c6 a4c4)
+0.41/5} 5. cxd5 {(c4d5 f8b4 c1d2 b4d2 b1d2 e6d5 g1f3 b8c6) +0.50/8} exd5
{(e6d5 b1c3 b8c6 g1f3 f8d6) +0.57/5} 6. Nf3 {(g1f3 c7c5 b1c3 b8c6 c1e3 c5d4
f3d4 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9} Ke1 {(e2e1 h7h8q e1e2 g6g7 e2d2 g7g8q d2e2
e3e4) -26.77/8} 54. g7 {(g6g7 e1d2 g7g8q d2c3 g8g5 c3d2 h7h8q d2c3 e5e6)
+25.93/9} Kd2 {(e1d2 g7g8q d2e2 g8g1 e2d2 g1f1 d2c3 h7h8q) -27.05/7} 55.
g8=Q {(g7g8q d2c3 g8g5 c3d2 f4f8 d2c3 h7h8q c3c4 e5e6) +26.10/9} Ke1 {(d2e1
g8g1 e1e2 e3e4 e2d2 g1f1 d2c3 h7h8q) -27.43/6} 56. Qa2 {(g8a2 e1f1 f4g4
f1e1 g4g1 c3c4 h8h5 c4c3) +M3/8} Kf1 {(e1f1 f4g4 f1e1 g4g1) -M2/5} 57. Rg4
{(f4g4 f1e1 g4g1 e1e2) +M2/8} Ke1 {(f1e1 g4g1) -M1/3} 58. Rg1# {(g4g1 e1d2)
+M1/8} 1-0
[/pgn]
User avatar
lithander
Posts: 881
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: Progress On Bricabrac

Post by lithander »

One thing you could try is that you get rid of all the uninitialized variables by initializing them or make extra sure that they really really get initialized before use. That's one of the differences between release and debug-mode: Afaik in debug mode the memory get's initialized with magic debug values while in release modes all bets are off. The code ceases to run deterministically because each time you start your uninitialized variables can have a different value. A debuggin nightmare.
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
Mike Sherwin
Posts: 925
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Progress On Bricabrac

Post by Mike Sherwin »

lithander wrote: Thu Apr 29, 2021 4:08 am One thing you could try is that you get rid of all the uninitialized variables by initializing them or make extra sure that they really really get initialized before use. That's one of the differences between release and debug-mode: Afaik in debug mode the memory get's initialized with magic debug values while in release modes all bets are off. The code ceases to run deterministically because each time you start your uninitialized variables can have a different value. A debuggin nightmare.
Thank you Thomas! However, there are no uninitialized variables that are not first assigned to before use. If there were the compiler would flag it with a warning. However, I will initialize every variable just to double check.