Adam-Kulju / Patricia

Extremely aggressive chess engine, written in C++
MIT License
51 stars 6 forks source link

v2.0.1 crash #11

Closed tissatussa closed 4 months ago

tissatussa commented 4 months ago

i just discovered your engine v2.0.1 and was able to compile it on Linux (Xubuntu 22.04) .. but it crashes in CuteChess GUI ("disconnects") .. here are 3 games :

[Event "?"]
[Site "?"]
[Date "2024.04.16"]
[Round "?"]
[White "Nakshatra"]
[Black "Patricia v2.0.1 NN"]
[Result "0-1"]
[FEN "rnbqkb1r/ppp2ppp/5n2/3pp3/8/3PP3/PPPNNPPP/R1BQKB1R b KQkq - 3 4"]
[PlyCount "0"]
[SetUp "1"]
[Termination "abandoned"]
[TimeControl "900+3"]

{White disconnects} 0-1
[Event "?"]
[Site "?"]
[Date "2024.04.16"]
[Round "?"]
[White "Patricia v2.0.1 NN"]
[Black "4ku v4.0"]
[Result "0-1"]
[ECO "C21"]
[Opening "Centre game"]
[PlyCount "26"]
[Termination "abandoned"]
[TimeControl "300+3"]

1. e4 {+0.96/17 26s} e5 {-0.33/24 11s} 2. d4 {+1.08/16 18s} exd4 {0.00/25 13s}
3. Nf3 {+0.21/16 17s} Bc5 {-0.02/26 12s} 4. Bg5 {+0.51/15 9.4s}
f6 {-0.01/26 12s} 5. b4 {+0.67/15 19s} Bxb4+ {+0.57/25 32s}
6. Bd2 {-1.14/17 11s} Bc5 {+0.49/26 9.6s} 7. Bc4 {-1.09/15 10s}
Nc6 {+0.60/25 11s} 8. c3 {-1.20/15 8.6s} d3 {+0.63/25 11s} 9. Nd4 {-0.09/15 26s}
Ne5 {+0.93/25 8.1s} 10. Bxg8 {-0.57/17 13s} Rxg8 {+1.11/27 7.8s}
11. Qh5+ {-0.70/17 7.5s} Ke7 {+0.94/27 20s} 12. Qxe5+ {-0.91/15 10s}
fxe5 {+3.38/27 6.7s} 13. Bg5+ {-4.98/18 7.5s}
Kd6 {+3.38/27 12s, White disconnects} 0-1
[Event "?"]
[Site "?"]
[Date "2024.04.16"]
[Round "?"]
[White "Patricia v2.0.1 NN"]
[Black "4ku v4.0"]
[Result "0-1"]
[FEN "rnbqkb1r/ppp2ppp/5n2/3pp3/8/3PP3/PPPNNPPP/R1BQKB1R b KQkq - 3 4"]
[PlyCount "45"]
[SetUp "1"]
[Termination "abandoned"]
[TimeControl "900+3"]

1... Be7 {+0.58/24 37s} 2. b4 {-0.57/17 32s} Bxb4 {+1.12/27 32s}
3. g3 {-2.61/16 31s} O-O {+1.25/27 48s} 4. Bg2 {-2.85/16 38s} c6 {+1.18/27 60s}
5. a3 {-2.86/16 90s} Bd6 {+1.25/26 68s} 6. O-O {-3.04/15 31s} b5 {+1.24/25 31s}
7. e4 {-2.62/16 23s} Bg4 {+1.23/26 28s} 8. h3 {-1.44/16 26s} Be6 {+1.25/24 21s}
9. f4 {-1.08/17 29s} dxe4 {+1.32/26 92s} 10. f5 {-1.50/18 33s}
exd3 {+1.24/28 17s} 11. fxe6 {-1.08/20 34s} dxe2 {+1.28/28 17s}
12. exf7+ {-1.18/18 27s} Rxf7 {+1.17/27 18s} 13. Qxe2 {-1.26/17 21s}
Nbd7 {+1.25/27 25s} 14. a4 {-1.24/15 36s} bxa4 {+1.40/26 21s}
15. Rxa4 {-1.06/15 31s} Qe7 {+1.29/27 20s} 16. Rc4 {-1.29/15 19s}
Nc5 {+1.21/25 34s} 17. Ba3 {-1.23/15 17s} Rd8 {+0.93/24 13s}
18. Bxc5 {-1.31/18 22s} Bxc5+ {+0.95/27 13s} 19. Kh2 {-1.51/16 17s}
Rff8 {+1.29/26 13s} 20. Rf3 {-1.22/17 24s} Rd6 {+1.44/28 13s}
21. Rf5 {-0.81/18 24s} Qd7 {+1.76/32 14s} 22. Rxf6 {-0.38/20 16s}
Rxd2 {+1.71/33 12s} 23. Rxf8+ {-1.23/22 16s}
Bxf8 {+1.75/31 12s, White disconnects} 0-1
Adam-Kulju commented 4 months ago

Thanks for reporting the bug and sending positions where it occurred. I haven't yet been able to reproduce the crash but I did find a bug, so hopefully I will get it fixed by tomorrow.

Adam-Kulju commented 4 months ago

Issue is fixed on master if you want to recompile it. I don't want to release a bugfix version right now because the bug is rare and I already am a decent amount of the way to Patricia 3.0.

tissatussa commented 4 months ago

indeed i think you fixed the Issue : i compiled the current main branch, then let Patricia play again and it doesn't crash anymore ! (yet)