megalodon-chess / megalodon

Chess engine with the UCI protocol
https://megalodon-chess.github.io/megalodon/
GNU General Public License v3.0
14 stars 0 forks source link

Bug: stalemate in won position with version 0.3.2 #49

Closed rwbc closed 3 years ago

rwbc commented 3 years ago

Instead of mating very soon, Megalodon 0.3.2 (my compilation) stalemated its opponent in the game below.

[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.01"]
[Round "2"]
[White "Megalodon_032-64"]
[Black "NSVChess_014"]
[Result "1/2-1/2"]
[ECO "A05"]
[GameDuration "00:05:27"]
[GameEndTime "2021-04-01T12:59:38.826 Mitteleuropäische Sommerzeit"]
[GameStartTime "2021-04-01T12:54:11.094 Mitteleuropäische Sommerzeit"]
[Opening "Reti Opening"]
[PlyCount "105"]
[TimeControl "40/120"]

1. Nf3 {book} Nf6 {book}
2. g3 {book} d5 {book}
3. Bg2 {book} b5 {book}
4. Nd4 {-0.33/5 1.64} c5 {+0.19/5 3.44}
5. Nxb5 {-0.76/5 1.68} Ba6 {-0.66/5 6.54}
6. N5c3 {+2.40/6 1.73} e5 {-0.45/5 4.70}
7. d3 {+2.54/6 1.78} Qa5 {-0.57/5 6.82}
8. O-O {-0.56/5 1.84} c4 {-0.75/5 5.78}
9. Bg5 {-0.24/5 1.90} h6 {-0.85/5 5.11}
10. Bxf6 {+0.20/5 1.97} gxf6 {-0.48/5 4.40}
11. Bxd5 {+2.87/5 2.05} cxd3 {-0.50/5 3.15}
12. Bxa8 {+3.49/5 2.13} dxe2 {-4.34/5 3.20}
13. Nxe2 {+6.49/6 2.23} Qb4 {-5.64/5 10.61}
14. c3 {+3.86/5 2.33} Qc4 {-5.72/5 4.13}
15. Re1 {+3.86/5 2.44} Qg4 {-5.75/5 8.41}
16. Nc1 {+5.46/5 2.57} Qxd1 {+3.53/5 6.22}
17. Rxd1 {+5.33/7 2.72} Bc5 {-5.40/4 0.43}
18. Nd2 {+7.99/6 2.89} Be7 {-5.64/4 0.59}
19. Nf3 {+8.06/6 3.10} O-O {-5.48/4 0.53}
20. Kg2 {+8.12/6 3.34} Bc4 {-5.27/4 0.62}
21. b3 {+8.16/6 3.63} Be6 {-5.30/4 0.64}
22. Re1 {+7.96/6 4.01} Nd7 {-5.07/4 0.59}
23. Bc6 {+5.33/5 4.49} Nc5 {-5.17/4 0.79}
24. b4 {+8.11/6 5.14} Nd7 {-5.24/4 0.80}
25. Bxd7 {+8.31/6 6.14} Bxd7 {-5.21/4 0.55}
26. Kg1 {+8.11/6 7.77} Rc8 {-5.36/4 0.39}
27. Re3 {+8.11/6 6.73} Bf5 {-5.32/4 0.58}
28. Kg2 {+8.18/6 5.84} Bd6 {-5.16/4 0.62}
29. h3 {+8.23/6 5.06} Rc4 {-5.16/4 0.70}
30. Nd2 {+8.26/6 4.38} Rc6 {-5.14/4 0.81}
31. Rf3 {+6.44/5 3.83} Be6 {-5.14/4 0.47}
32. b5 {+6.44/5 3.29} Rc7 {-5.17/4 0.52}
33. Rxf6 {+8.35/6 2.85} Be7 {-6.22/4 0.71}
34. Rxh6 {+6.17/5 2.47} Bd5+ {-7.30/4 0.90}
35. f3 {+8.97/6 2.15} Rxc3 {-6.18/4 1.24}
36. Rh5 {+6.02/5 1.86} Rc2 {-6.08/4 0.74}
37. Rxe5 {+4.65/5 1.61} Rxc1 {-4.13/4 0.81}
38. Rxc1 {+12.97/6 1.39} Ba3 {-9.28/4 0.53}
39. Rc8+ {+13.78/5 1.21} Kg7 {-9.43/4 0.064}
40. Rxd5 {+13.78/5 1.04} Be7 {-13.23/4 0.29}
41. Ra8 {+14.76/7 16.91} a6 {-13.23/6 7.99}
42. b6 {+16.25/7 14.68} Kf6 {-13.33/5 1.03}
43. b7 {+17.40/7 12.70} Ke6 {-13.33/5 0.59}
44. Rad8 {+19.37/7 10.99} f5 {-13.21/5 0.86}
45. R8d7 {+21.30/7 9.53} Kf7 {-13.28/5 1.07}
46. b8=Q {+23.03/7 8.27} f4 {-21.25/5 1.66}
47. a4 {+M1/7 7.16} fxg3 {-20.20/5 1.49}
48. Ne4 {+M1/7 6.21} Kg6 {-20.33/5 0.88}
49. f4 {+M1/6 5.38} a5 {-20.45/5 1.40}
50. h4 {+M1/6 4.66} Kh6 {-20.31/5 1.18}
51. Nc5 {+M1/6 4.04} Kg6 {-20.39/5 0.70}
52. f5+ {+M1/6 3.50} Kf7 {-20.36/5 0.97}
53. Qh8 {-M8/7 3.03}
{Draw by stalemate}
1/2-1/2
phuang1024 commented 3 years ago

Thank you for your report. Unfortunately, I am unable to reproduce your result. Here is what I got:

Position string: position startpos moves g1f3 g8f6 g2g3 d7d5 f1g2 b7b5 f3d4 c7c5 d4b5 c8a6 b5c3 e7e5 d2d3 d8a5 e1g1 c5c4 c1g5 h7h6 g5f6 g7f6 g2d5 c4d3 d5a8 d3e2 c3e2 a5b4 c2c3 b4c4 f1e1 c4g4 e2c1 g4d1 e1d1 f8c5 b1d2 c5e7 d2f3 e8g8 g1g2 a6c4 b2b3 c4e6 d1e1 b8d7 a8c6 d7c5 b3b4 c5d7 c6d7 e6d7 g2g1 f8c8 e1e3 d7f5 g1g2 e7d6 h2h3 c8c4 f3d2 c4c6 e3f3 f5e6 b4b5 c6c7 f3f6 d6e7 f6h6 e6d5 f2f3 c7c3 h6h5 c3c2 h5e5 c2c1 a1c1 e7a3 c1c8 g8g7 e5d5 a3e7 c8a8 a7a6 b5b6 g7f6 b6b7 f6e6 a8d8 f7f5 d8d7 e6f7 b7b8q f5f4 a2a4 f4g3 d2e4 f7g6 f3f4 a6a5 h3h4 g6h6 e4c5 h6g6 f4f5 g6f7

Depth 1: d7e7 (Rook takes bishop) Depth 2: g2g3 (King takes pawn) Depth 3: d5d6 (Rook moves up) Depth 4: d5d6 Depth 5: c5a6 (Knight moves to the edge) Depth 6: c5a6 Depth 7: h4h5 (Pawn push)

ArjunSahlot commented 3 years ago

I am also unable to reproduce the bug for the fen 1Q6/3Rbk2/8/p1NR1P2/P6P/6p1/6K1/8 w - - 1 53, with the same results as @HuangPatrick16777216.

rwbc commented 3 years ago

You shouldn't just input the movelist (and surely not FEN!), often with such bugs the hash is involved. A good way of mimicking at least somwhow similar hash entries (of course not the same) is to go through the whole pgn game while in analysing mode, this fills the hashtables.

easily to reproduce for me:

dep   score nodes   time
  6 #-4     463712  0:01.62 b8h8 
  5 #-3     234473  0:00.54 b8h8 
  4 #-2     3050    0:00.01 b8h8 
  3 #-1     1654    0:00.00 b8h8 
  2 #-0     69      0:00.00 b8h8 
  1 #900000 47      0:00.00 b8h8 

BTW meanwhile I have two more stalemates in won positions. All so far with Black BTW. (may be it has to do with the weird change of eval sign in the end with M scores)

[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.01"]
[Round "4"]
[White "NSVChess_014"]
[Black "Megalodon_032-64"]
[Result "1/2-1/2"]
[ECO "A43"]
[GameDuration "00:05:49"]
[GameEndTime "2021-04-01T18:25:57.529 Mitteleuropäische Sommerzeit"]
[GameStartTime "2021-04-01T18:20:08.430 Mitteleuropäische Sommerzeit"]
[Opening "Old Benoni defense"]
[PlyCount "128"]
[TimeControl "40/120"]

1. d4 {book} c5 {book}
2. dxc5 {book} e6 {book}
3. Nc3 {book} Bxc5 {book}
4. Be3 {+0.17/5 8.59} Bxe3 {-0.27/5 1.67}
5. fxe3 {+0.25/5 3.98} Qb6 {-0.25/5 1.71}
6. Ne4 {+0.32/5 3.00} Qb4+ {-4.46/6 1.77}
7. Nd2 {+0.23/5 0.43} Qxb2 {-4.48/6 1.81}
8. Ngf3 {-0.53/5 2.83} Qc3 {-4.96/6 1.88}
9. e4 {-0.42/5 1.81} d5 {-1.08/5 1.97}
10. exd5 {+0.60/5 2.27} exd5 {-0.45/5 2.02}
11. Kf2 {-0.84/5 3.54} Nh6 {-4.69/6 2.10}
12. e4 {-0.68/5 7.36} Qc5+ {-1.32/5 2.19}
13. Ke1 {-0.64/5 0.73} dxe4 {-4.32/6 2.29}
14. Nxe4 {-0.54/5 4.46} Qe3+ {-1.36/5 2.40}
15. Qe2 {-0.53/5 0.26} Qxe2+ {-1.54/6 2.53}
16. Bxe2 {-0.39/5 0.61} O-O {-2.48/6 2.67}
17. c4 {-0.43/5 5.71} Kh8 {-3.33/5 2.82}
18. g3 {-0.35/5 5.24} Bg4 {-0.83/5 3.00}
19. Nd6 {-0.43/5 2.18} b6 {-0.86/5 3.23}
20. Ng5 {-0.50/5 2.16} Nc6 {-1.18/6 3.50}
21. Bxg4 {+2.69/5 1.99} Nxg4 {-1.00/6 3.83}
22. Ngxf7+ {+0.08/5 3.25} Kg8 {+0.35/7 4.25}
23. Rf1 {+0.03/5 2.05} Nxh2 {-3.62/6 4.83}
24. Rf4 {-0.91/5 2.11} Nb4 {-3.56/6 5.63}
25. Kd2 {-0.91/5 3.84} h5 {-2.56/6 6.87}
26. a3 {-0.85/5 5.48} Na6 {-2.56/6 7.34}
27. Rf2 {-0.73/4 0.57} Ng4 {-2.51/6 6.36}
28. Rf4 {-0.89/4 0.58} Nc5 {-2.84/6 5.52}
29. Kc1 {-0.89/4 0.77} Nb3+ {-6.33/6 4.78}
30. Kb2 {-0.90/4 0.061} Nxa1 {-5.94/6 4.15}
31. Kxa1 {-2.37/4 0.29} Ne3 {-5.83/6 3.59}
32. Ne5 {-2.33/4 0.30} Rf6 {-4.75/6 3.11}
33. Ne4 {-2.35/4 0.54} Re6 {-6.28/6 2.70}
34. Nd3 {-2.41/4 0.55} Rd8 {-6.14/6 2.33}
35. Nb2 {-2.64/4 0.74} Nc2+ {-6.11/6 2.02}
36. Ka2 {-2.54/4 0.046} Ne3 {-2.12/5 1.76}
37. Ka1 {-2.64/4 0.56} Ng2 {-3.41/5 1.51}
38. Rf2 {-2.38/4 0.42} Rxe4 {-3.59/5 1.31}
39. Rxg2 {-2.62/4 0.33} Kf7 {-3.59/5 1.14}
40. Rh2 {-2.42/4 0.32} Re3 {-3.44/5 0.99}
41. Ka2 {-2.50/6 7.25} g6 {-3.26/7 16.86}
42. Rg2 {-2.51/6 13.84} Rd4 {-3.64/7 14.61}
43. Rg1 {-2.48/5 0.60} Ke6 {-3.80/7 12.65}
44. a4 {-2.45/5 0.80} Rg4 {-3.80/7 10.98}
45. Ka1 {-2.37/5 0.52} Rexg3 {-4.85/7 9.51}
46. Rf1 {-3.43/5 0.85} Re3 {-6.20/6 8.25}
47. Kb1 {-3.43/5 1.21} Re2 {-6.96/6 7.13}
48. Nd3 {-3.33/5 1.28} Re3 {-6.20/6 6.19}
49. Nf4+ {-3.23/5 1.08} Ke5 {-3.76/7 5.36}
50. Nd5 {-3.12/5 0.79} Re2 {-6.20/6 4.64}
51. Rc1 {-3.22/5 1.24} Ree4 {-6.20/6 4.03}
52. Ne7 {-3.24/5 1.08} Rxc4 {-4.79/6 3.49}
53. Nxg6+ {-3.42/5 0.76} Kf6 {-5.57/7 3.03}
54. Rxc4 {+1.53/5 0.62} Rxc4 {-5.45/7 2.63}
55. Nf8 {-3.60/5 0.13} Rc7 {-7.31/8 2.27}
56. Kb2 {-3.68/5 0.15} Rf7 {-7.31/7 1.97}
57. Kc3 {-3.78/5 0.12} Rxf8 {-7.43/7 1.71}
58. Kb3 {-7.10/5 0.33} Re8 {-7.67/7 1.48}
59. Ka2 {-7.03/5 0.21} a5 {-7.79/7 1.28}
60. Kb2 {-7.03/5 0.063} Re4 {-8.03/7 1.12}
61. Kb3 {-7.10/5 0.078} Ke5 {-8.81/7 0.96}
62. Ka3 {-6.97/5 0.044} Re2 {+M1/8 0.84}
63. Kb3 {-7.15/5 0.011} Kd4 {+M1/8 0.72}
64. Ka3 {-7.07/5 0.011} Kc3 {-M10/8 0.63}
{Draw by stalemate}
1/2-1/2

[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.01"]
[Round "5"]
[White "NSVChess_014"]
[Black "Megalodon_032-64"]
[Result "1/2-1/2"]
[ECO "A45"]
[GameDuration "00:05:39"]
[GameEndTime "2021-04-01T18:36:03.266 Mitteleuropäische Sommerzeit"]
[GameStartTime "2021-04-01T18:30:23.758 Mitteleuropäische Sommerzeit"]
[Opening "Trompovsky attack (Ruth, Opovcensky Opening)"]
[PlyCount "116"]
[TimeControl "40/120"]

1. d4 {book} Nf6 {book}
2. Bg5 {book} d5 {book}
3. e3 {book} Ne4 {book}
4. Bh4 {-0.23/5 4.87} c6 {+1.05/5 1.66}
5. Bd3 {-0.15/5 7.71} Nd7 {+1.12/5 1.72}
6. c4 {-0.24/5 6.46} Nd6 {+1.10/5 1.77}
7. cxd5 {+1.16/5 4.31} cxd5 {+1.23/5 1.83}
8. Nc3 {+0.01/5 8.88} Qa5 {+1.28/5 1.89}
9. Qh5 {+0.01/5 19.15} g6 {-1.88/3 1.98}
10. Qxd5 {+1.25/5 11.45} Qxd5 {+2.98/5 2.02}
11. Nxd5 {+1.33/5 9.31} Rb8 {+4.21/5 2.10}
12. Nf3 {+1.58/4 1.12} b6 {+3.17/5 2.19}
13. O-O-O {+1.74/4 1.30} f6 {+3.02/5 2.29}
14. Nc7+ {+1.56/4 1.59} Kf7 {+1.21/6 2.40}
15. b4 {+1.64/4 1.89} g5 {+2.60/5 2.52}
16. Bg3 {+1.75/4 0.95} g4 {+2.62/5 2.66}
17. Bxd6 {+5.32/4 0.94} exd6 {+1.34/6 2.82}
18. Bc4+ {+1.25/4 0.99} Kg6 {+1.30/6 3.01}
19. Nh4+ {+1.14/4 0.99} Kg5 {+1.34/6 3.23}
20. f4+ {+1.31/4 1.02} Kxh4 {-1.50/6 3.50}
21. Nd5 {-1.90/4 1.22} Bb7 {-2.88/6 3.83}
22. f5 {-2.03/4 0.84} Bh6 {-3.08/6 4.26}
23. Nf4 {-2.19/4 1.05} Bxf4 {-3.76/6 4.82}
24. exf4 {-1.83/4 0.71} Rbc8 {-5.28/6 5.63}
25. g3+ {-1.80/4 0.46} Kh5 {-5.22/7 6.88}
26. Rhe1 {-1.77/4 0.40} Rxc4+ {-6.33/7 7.33}
27. Kb2 {-5.45/4 0.073} Rxb4+ {-7.49/6 6.36}
28. Ka3 {-6.54/4 0.12} a5 {-7.73/6 5.51}
29. Re6 {-6.57/4 0.36} d5 {-7.74/6 4.78}
30. Rd6 {-6.70/4 0.32} Re8 {-7.74/6 4.13}
31. Rd3 {-6.76/4 0.27} Re7 {-7.97/6 3.58}
32. Re6 {-6.73/4 0.19} Rf7 {-7.74/6 3.10}
33. Rd6 {-6.73/4 0.20} b5 {-6.42/7 2.69}
34. Re6 {-6.74/4 0.14} Rc4 {-7.74/6 2.33}
35. Kb2 {-6.72/4 0.30} Nf8 {-6.32/5 2.03}
36. Rb6 {-6.53/4 0.45} Bc6 {-7.57/6 1.76}
37. Rc3 {-6.56/4 0.29} Rb4+ {-7.41/6 1.51}
38. Rb3 {-6.56/4 0.049} Rc4 {-7.41/6 1.32}
39. Rc3 {-6.56/4 0.23} Rb4+ {-7.41/6 1.14}
40. Rb3 {-6.56/4 0.051} Rc4 {-7.41/6 0.99}
41. h3 {-6.56/5 1.00} Re7 {-6.35/7 16.85}
42. Ka1 {-6.48/5 1.11} Nd7 {-6.52/7 14.63}
43. Ra6 {-6.69/5 0.78} Re1+ {-6.54/7 12.66}
44. Kb2 {-6.77/5 0.11} gxh3 {-7.27/7 10.98}
45. Rxa5 {-6.76/5 1.45} Re2+ {-6.62/7 9.51}
46. Ka1 {-6.78/5 0.18} Rxd4 {-6.60/7 8.25}
47. Rb1 {-8.03/5 0.95} Rdd2 {-8.95/6 7.13}
48. Rh1 {-8.13/5 1.53} Kg4 {-8.81/6 6.19}
49. Rc1 {-8.13/5 1.10} Nc5 {-8.99/6 5.36}
50. Ra7 {-8.07/5 1.26} Bd7 {-9.11/6 4.65}
51. Rf1 {-8.06/5 1.53} Kxf5 {-9.91/6 4.03}
52. g4+ {-9.21/5 2.16} Kxg4 {-8.06/7 3.49}
53. Rc1 {-10.28/5 1.90} Kxf4 {-11.13/6 3.03}
54. Kb1 {-11.44/5 2.06} Bf5+ {-21.01/6 2.62}
55. Rc2 {-11.45/5 0.078} Rxc2 {+M1/7 2.27}
56. Ra4+ {-16.57/5 0.91} Rc4+ {+M1/6 1.97}
57. Ka1 {-16.47/5 0.057} Rxa4 {+M1/5 1.71}
58. a3 {-21.43/5 0.002} Rd2 {-M8/7 1.48}
{Draw by stalemate}
1/2-1/2
phuang1024 commented 3 years ago

This bug is probably due to a hash collision. In the latest main branch, Megalodon clears the hash table every search, which should remove most hash collisions.

rwbc commented 3 years ago

This bug is probably due to a hash collision. In the latest main branch, Megalodon clears the hash table every search, which should remove most hash collisions.

May be (won't bet on it though). You should still try to reproduce the bug first (the way I described) to understand what is happening. If you now clear the hash after each search, I don't see what advantage of hashtables will be left?

phuang1024 commented 3 years ago

The advantage is in low depth searches, Megalodon can find the best order of moves and use that in the higher depth search. To clarify, I meant Megalodon clears the hash table every time it receives a go command, not every time it starts on a new depth.

ArjunSahlot commented 3 years ago

Hash tables are going to be unstable until we improve the hashing algorithm. Till then you choose not to use them: setoption name UseHashTable value false

phuang1024 commented 3 years ago

I'm more convinced now that it's a hash table bug, because Megalodon has always checkmated me instead of stalemating when hash tables were off. The option is now default false.

rwbc commented 3 years ago

Looking at the uci options of the compilation used, it says it was already set to false by default, though?

Megalodon v0.3.2 - UCI chess engine
Copyright the Megalodon developers (in AUTHORS file)
https://github.com/megalodon-chess/megalodon
Licensed under GNU GPL v3: https://www.gnu.org/licenses/
uci
id name Megalodon
id author Megalodon Developers
option name Hash type spin default 16 min 1 max 65536
option name UseHashTable type check default false
option name ABPassStart type spin default 5 min 1 max 100
option name ABPassMargin type spin default 500 min 0 max 10000
option name MoveTimeMult type spin default 100 min 10 max 1000
option name UseEndgame type check default true
option name EvalMaterial type spin default 100 min 0 max 1000
option name EvalPawnStruct type spin default 100 min 0 max 1000
option name EvalSpace type spin default 100 min 0 max 1000
option name EvalKnights type spin default 100 min 0 max 1000
option name EvalKings type spin default 100 min 0 max 1000
option name PrintCurrMove type check default true
option name PrintPv type check default true
option name Chat type check default true
uciok
rwbc commented 3 years ago

Stalemate bug is still there in latest dev r2046

Also repetition draws in winning positions...


[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.03"]
[Round "2"]
[White "Zoe_01"]
[Black "Megalodon_033r2046-64"]
[Result "1/2-1/2"]
[ECO "B20"]
[GameDuration "00:02:45"]
[GameEndTime "2021-04-03T12:00:56.613 Mitteleuropäische Sommerzeit"]
[GameStartTime "2021-04-03T11:58:10.857 Mitteleuropäische Sommerzeit"]
[Opening "Sicilian defense"]
[PlyCount "126"]
[TimeControl "40/60"]

1. e4 {book} c5 {book} 2. c4 {book} g6 {book} 3. Nf3 {book} Qa5 {book}
4. Nc3 {0.00/6 8.38s} Nf6 {+1.49/3 0.37s} 5. d4 {+2.30/5 0.72s}
Nxe4 {+2.89/3 0.37s} 6. Qc2 {-1.05/6 3.95s} d5 {+3.53/3 0.37s}
7. cxd5 {-0.35/6 4.08s} Nxf2 {+1.76/3 0.38s} 8. Kxf2 {+1.80/6 5.66s}
Bf5 {+1.80/3 0.38s} 9. Qa4+ {+6.70/5 2.69s} Qxa4 {-1.92/5 0.39s}
10. Nxa4 {+2.10/6 1.56s} Bg4 {-0.79/3 0.40s} 11. Nxc5 {+4.95/5 0.36s}
Bxf3 {-2.98/5 0.40s} 12. Kxf3 {+3.65/6 0.79s} b6 {-3.95/5 0.41s}
13. Bb5+ {+4.25/6 0.90s} Kd8 {-2.64/5 0.41s} 14. Na4 {+5.40/5 1.46s}
f5 {-4.53/5 0.41s} 15. Bh6 {+4.15/6 2.72s} Bxh6 {+0.65/3 0.42s}
16. Rad1 {+0.30/6 2.55s} g5 {-0.95/5 0.43s} 17. Kf2 {+0.45/6 3.56s}
f4 {-0.98/5 0.44s} 18. h4 {+0.75/6 1.60s} g4 {-0.94/5 0.44s}
19. Kg1 {+0.45/6 2.60s} Bg7 {-0.94/5 0.45s} 20. Nc3 {+0.40/6 1.50s}
f3 {-0.31/5 0.46s} 21. Ne4 {+0.50/6 1.17s} Bh6 {-0.13/5 0.46s}
22. gxf3 {+2.55/5 0.21s} gxf3 {-0.09/5 0.47s} 23. Rd3 {+2.55/5 0.27s}
a6 {-0.05/5 0.47s} 24. Bc6 {+0.30/6 0.69s} Nxc6 {-0.54/5 0.49s}
25. dxc6 {-0.30/6 0.47s} Bc1 {-0.53/5 0.49s} 26. b4 {+2.35/5 0.40s}
Bb2 {-1.87/5 0.50s} 27. Rh2 {+0.60/6 1.18s} Bc1 {-1.87/5 0.51s}
28. Rc2 {+2.60/5 0.12s} Bh6 {-1.88/5 0.52s} 29. Rxf3 {+2.65/5 0.12s}
Rc8 {-0.36/3 0.54s} 30. Ra3 {+3.60/5 0.24s} e5 {-3.04/5 0.55s}
31. dxe5 {+4.50/5 0.19s} Rg8+ {-4.04/5 0.56s} 32. Rg2 {+2.10/6 0.70s}
Rxg2+ {-2.74/5 0.57s} 33. Kxg2 {+3.10/7 0.15s} Rxc6 {-1.58/6 0.57s}
34. Rxa6 {+1.45/6 0.70s} Re6 {-2.84/5 0.60s} 35. Rxb6 {+3.85/5 0.10s}
Rxb6 {+0.98/5 0.60s} 36. Nd6 {-1.85/5 0.15s} Bg7 {+1.13/5 0.63s}
37. a3 {-1.70/5 0.11s} Rb8 {+1.03/5 0.65s} 38. e6 {-1.65/5 0.12s}
Bf8 {+0.92/5 0.67s} 39. Nf7+ {-2.80/6 0.38s} Ke7 {+2.66/6 0.69s}
40. Ng5 {-3.45/6 0.26s} h6 {+2.76/6 0.71s} 41. Ne4 {-3.90/6 1.73s}
Kxe6 {+3.92/6 1.76s} 42. Nd2 {-3.30/7 2.01s} Rd8 {+4.12/6 1.82s}
43. Nf3 {-3.60/7 1.36s} Ra8 {+4.12/6 1.88s} 44. Nd4+ {-3.35/7 0.66s}
Kd5 {+2.76/7 1.96s} 45. Nc2 {-4.30/8 3.29s} Rc8 {+4.12/6 2.04s}
46. Ne3+ {-4.25/8 3.23s} Ke4 {+4.12/6 2.13s} 47. Ng4 {-2.90/7 0.95s}
Rc3 {+4.12/6 2.23s} 48. b5 {-3.45/7 1.05s} Kf5 {+4.67/6 2.36s}
49. Nh2 {-3.90/7 0.55s} Rxa3 {+4.90/7 2.50s} 50. h5 {-4.60/7 0.89s}
Rb3 {+5.10/7 2.64s} 51. Nf3 {-5.00/7 0.62s} Rb2+ {+5.20/7 2.84s}
52. Kh3 {-4.95/7 0.59s} Ke4 {+5.30/7 3.06s} 53. Nh4 {-6.45/8 3.31s}
Rxb5 {+6.38/7 3.33s} 54. Kg2 {-6.60/8 1.52s} Rxh5 {+6.48/7 3.67s}
55. Nf3 {-6.05/7 0.47s} Rf5 {+6.58/6 4.11s} 56. Nd2+ {-5.85/7 0.79s}
Kd3 {+6.48/7 4.25s} 57. Ne4 {-5.85/7 0.81s} Kxe4 {+9.47/6 3.96s}
58. Kg3 {-9.75/8 0.83s} Rf4 {+9.58/7 3.69s} 59. Kg2 {-9.65/8 0.95s}
Rf3 {+9.68/7 3.45s} 60. Kg1 {-9.75/8 0.50s} h5 {+9.68/7 3.22s}
61. Kh1 {-9.60/8 0.53s} Rg3 {+M5/7 3.00s} 62. Kh2 {-9.10/9 2.16s}
Rg4 {+M3/8 2.81s} 63. Kh3 {-9.40/8 0.56s} Bd6 {+M1/7 2.62s, Draw by stalemate}
1/2-1/2

[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.03"]
[Round "3"]
[White "Zoe_01"]
[Black "Megalodon_033r2046-64"]
[Result "1/2-1/2"]
[ECO "A34"]
[GameDuration "00:01:00"]
[GameEndTime "2021-04-03T12:03:02.485 Mitteleuropäische Sommerzeit"]
[GameStartTime "2021-04-03T12:02:01.830 Mitteleuropäische Sommerzeit"]
[Opening "English"]
[PlyCount "74"]
[TimeControl "40/60"]
[Variation "Symmetrical Variation"]

1. c4 {book} c5 {book} 2. Nc3 {book} Nf6 {book} 3. g3 {book} e6 {book}
4. Nf3 {-0.75/6 3.14s} Qa5 {+1.26/3 0.37s} 5. e4 {+1.25/5 0.58s}
Nc6 {+1.66/3 0.37s} 6. e5 {+1.55/5 0.67s} Ng4 {+1.56/3 0.38s}
7. Qe2 {+1.80/5 0.73s} Ngxe5 {+1.76/3 0.38s} 8. Nxe5 {-1.35/6 9.45s}
Nd4 {+1.55/3 0.39s} 9. Qd1 {+0.70/6 5.61s} d6 {+0.33/3 0.39s}
10. Nd3 {+3.00/5 0.63s} b5 {+0.22/3 0.40s} 11. Nxb5 {+1.90/6 3.81s}
Nxb5 {-2.39/5 0.40s} 12. Qa4 {+2.75/6 2.60s} Qxa4 {+7.07/5 0.40s}
13. Bg2 {-9.30/6 0.89s} Qxc4 {+9.04/3 0.41s} 14. Bxa8 {-9.70/6 3.15s}
Nd4 {+5.96/5 0.41s} 15. Be4 {-5.10/5 1.48s} Nc2+ {+9.36/5 0.43s}
16. Kd1 {-9.25/5 0.40s} Qxe4 {+9.35/5 0.43s} 17. Kxc2 {-10.40/5 0.39s}
Qxh1 {+10.29/5 0.44s} 18. h4 {-10.50/5 0.28s} c4 {+10.35/5 0.43s}
19. Nf4 {-10.80/5 0.38s} Qf3 {+10.47/5 0.44s} 20. d4 {-13.90/6 0.99s}
Qxf2+ {+11.57/5 0.46s} 21. Kc3 {-15.25/6 0.47s} d5 {+11.63/5 0.45s}
22. Bd2 {-15.40/6 1.31s} Qxg3+ {+12.53/5 0.47s} 23. Kc2 {-16.10/6 0.31s}
Bd6 {+13.15/5 0.47s} 24. Rf1 {-12.60/5 0.23s} Qxh4 {+14.11/5 0.48s}
25. b3 {-13.00/5 0.28s} cxb3+ {+14.40/5 0.49s} 26. axb3 {-17.40/6 0.84s}
Qf6 {+14.28/5 0.50s} 27. Kb2 {-14.05/5 0.26s} g5 {+15.62/5 0.50s}
28. Rc1 {-13.90/5 0.61s} Qxd4+ {+15.63/5 0.54s} 29. Bc3 {-18.50/6 0.92s}
Qxf4 {+13.70/5 0.53s} 30. Bxh8 {-14.15/6 0.95s} Ba3+ {+15.52/5 0.55s}
31. Kxa3 {-16.25/6 0.90s} Qxc1+ {+15.62/5 0.56s} 32. Ka2 {-16.25/6 0.24s}
a5 {+15.82/5 0.57s} 33. Bb2 {-16.25/6 0.40s} Qd2 {+15.82/5 0.58s}
34. Ka3 {-15.15/7 0.65s} Qb4+ {+15.92/5 0.60s} 35. Ka2 {-15.10/7 0.22s}
Qd2 {+15.82/5 0.61s} 36. Ka3 {-15.15/7 0.53s} Qb4+ {+15.92/5 0.63s}
37. Ka2 {-15.10/7 0.19s} Qd2 {+15.82/5 0.65s, Draw by 3-fold repetition} 1/2-1/2

[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.03"]
[Round "4"]
[White "Zoe_01"]
[Black "Megalodon_033r2046-64"]
[Result "1/2-1/2"]
[ECO "B21"]
[GameDuration "00:02:19"]
[GameEndTime "2021-04-03T12:06:13.032 Mitteleuropäische Sommerzeit"]
[GameStartTime "2021-04-03T12:03:53.246 Mitteleuropäische Sommerzeit"]
[Opening "Sicilian"]
[PlyCount "114"]
[TimeControl "40/60"]
[Variation "Smith-Morra gambit"]

1. e4 {book} c5 {book} 2. d4 {book} cxd4 {book} 3. c3 {book} g6 {book}
4. cxd4 {-0.45/6 4.90s} Qb6 {+1.14/3 0.37s} 5. Qc2 {+3.75/5 0.61s}
Qb4+ {+1.45/3 0.37s} 6. Bd2 {+1.85/6 4.08s} Qb6 {-3.21/3 0.38s}
7. Qxc8+ {+4.75/6 8.02s} Qd8 8. Qxd8+ {+4.30/6 2.47s} Kxd8
9. Bc4 {+5.35/5 0.43s} f5 {-3.03/3 0.40s} 10. exf5 {+6.15/5 0.62s}
gxf5 {-2.95/3 0.40s} 11. Bd5 {+6.60/5 0.59s} Nc6 {-2.87/3 0.41s}
12. Bg5 {+5.10/5 0.43s} Nb4 {-4.27/5 0.40s} 13. Bxb7 {+5.75/5 0.63s}
Rb8 {-4.18/5 0.43s} 14. Nc3 {+3.15/5 0.49s} Nc2+ {-1.04/5 0.42s}
15. Kd2 {-0.55/6 2.33s} Nxa1 {+0.49/5 0.42s} 16. Nf3 {-1.55/6 0.82s}
Rxb7 {+0.93/5 0.43s} 17. Rxa1 {-2.05/6 3.49s} h6 {+1.78/5 0.44s}
18. Be3 {-1.40/6 1.79s} Rxb2+ {+0.74/5 0.45s} 19. Kc1 {-1.80/6 1.49s}
Rb4 {+0.49/4 0.45s} 20. Ne5 {+0.80/5 0.35s} Nf6 {+2.14/3 0.48s}
21. Nf7+ {+4.55/5 0.44s} Ke8 {+5.04/5 0.47s} 22. Nxh8 {+1.50/6 0.88s}
Rc4 {-3.01/5 0.48s} 23. Kb2 {+4.70/5 0.33s} Ng4 {-0.85/3 0.48s}
24. Ng6 {+5.05/5 0.82s} Rb4+ {+0.09/3 0.50s} 25. Ka3 {+2.95/6 0.70s}
Rb6 {-4.17/5 0.50s} 26. Nxf8 {+5.20/5 0.61s} Kxf8 {-4.13/5 0.55s}
27. Re1 {+4.50/5 0.48s} Nxh2 {-2.92/5 0.52s} 28. d5 {+2.50/6 1.58s}
Ra6+ {-0.81/3 0.53s} 29. Kb2 {+2.15/6 0.37s} Ng4 {-3.08/5 0.54s}
30. Kb1 {+4.20/5 0.61s} Nxe3 {-1.94/5 0.55s} 31. Rxe3 {+1.75/6 0.44s}
f4 {-1.94/5 0.56s} 32. Re4 {+4.25/5 0.23s} f3 {-3.00/5 0.58s}
33. gxf3 {+3.00/6 0.79s} Rf6 {-3.30/5 0.59s} 34. Ne2 {+4.95/5 0.24s}
Rxf3 {-2.11/5 0.60s} 35. Rf4+ {+8.30/5 0.32s} Rxf4 {-1.72/6 0.62s}
36. Nxf4 {+3.20/7 0.58s} Kf7 {-1.79/6 0.64s} 37. Nd3 {+3.20/7 0.64s}
d6 {-1.67/6 0.64s} 38. Nf4 {+3.20/7 0.76s} Kf6 {-1.42/6 0.66s}
39. Ne6 {+3.45/7 0.38s} Ke5 {-1.49/6 0.69s} 40. Nc7 {+3.60/7 0.29s}
Ke4 {-1.14/6 0.71s} 41. Ka1 {+3.45/9 3.12s} h5 {-1.58/7 1.75s}
42. Kb1 {+3.35/9 2.52s} h4 {-1.69/7 1.82s} 43. Kc2 {+2.05/8 1.33s}
h3 {+4.77/8 1.90s} 44. Nb5 {-5.25/8 2.17s} h2 {+6.18/8 1.97s}
45. Nxa7 {-6.50/8 1.74s} h1=Q {+5.00/7 2.06s} 46. Nc8 {-5.10/7 0.92s}
Qh4 {+6.18/7 2.14s} 47. Kb1 {-7.45/8 4.03s} Kxd5 {+6.38/7 2.25s}
48. a3 {-6.25/7 1.26s} Qf6 {+6.58/7 2.37s} 49. Kc2 {-6.60/7 0.77s}
Qf5+ {+9.28/7 2.51s} 50. Kd1 {-10.40/8 1.33s} Qxc8 {+10.46/7 2.67s}
51. Ke1 {-10.85/8 2.08s} Qa6 {+10.56/7 2.85s} 52. f3 {-11.35/8 0.61s}
Qxa3 {+10.66/7 3.07s} 53. Ke2 {-11.65/8 2.22s} Ke5 {+11.64/7 3.35s}
54. Kd2 {-11.85/8 2.14s} Qxf3 {+11.94/7 3.69s} 55. Ke1 {-12.15/8 1.76s}
Kd4 {+M5/7 4.13s} 56. Kd2 {-12.00/8 0.95s} Qd3+ {+M3/7 4.27s}
57. Ke1 {-12.20/8 1.26s} Ke3 {+M1/7 3.98s, Draw by stalemate} 1/2-1/2
ArjunSahlot commented 3 years ago

Thanks for reporting more games, we are still currently trying to find the bug.

phuang1024 commented 3 years ago

The latest commit (afc87b9c0a5d6547745aa1d2ceccfb0d202d0ca9) fixed a bug, where Megalodon evaluated stalemates as checkmates. This might fix this issue.

phuang1024 commented 3 years ago

As stated above, afc87b9 closes this issue.