Matthies / RubiChess

Another chess engine
GNU General Public License v3.0
150 stars 16 forks source link

Infinite search / stack overflow #434

Closed Matthies closed 8 months ago

Matthies commented 8 months ago

Example of a position that can lead to an infinite search by too many extensions (extandall in combination with extendMove). This was triggered by a modification of history update. See commit 97bc8f5dfa843e503dc1bc7f1cf5993f497cfcc2

position fen 2R5/r3b1k1/p2p4/P1pPp2p/6q1/2P2N1r/4Q1P1/5RK1 w - - 0 1  moves f3e5 g4c8
...
info depth 16 seldepth 32 multipv 1 time 1214 score cp 2444 lowerbound nodes 429271 nps 353569 tbhits 0 hashfull 121 pv f1f7

Board:
...Q..Q.
.....R..
........
P.......
......k.
..P.....
......P.
......K.

FEN: 3Q2Q1/5R2/8/P7/6k1/2P5/6P1/6K1 b - - 2 97
State: 1
EPT: 0
Halfmoves: 2
Fullmoves: 97
Hash: 0xe28fe82f8a13a0e2 (should be 0xe28fe82f8a13a0e2)
Pawn Hash: 0x20a52edae8664fe2 (should be 0x20a52edae8664fe2)
Material Hash: 0xf4f052b27df11785 (should be 0xf4f052b27df11785)
Value: -4255
Repetitions: 0
Phase: 10
Pseudo-legal Moves: g4f3 g4g3 g4h3 g4f4 g4h4 g4f5 g4g5 g4h5
Moves in current search: f1f7 g7h6 e2d2 h3e3 d2e3 e7g5 f7f6 h6h7 e3g5 a7g7 g5h5 h7g8 f6h6 g7h7 h5g5 g8f8 g5f4 f8e7 h6h7 e7e8 h7h8 e8e7 h8c8 d6e5 f4e5 e7f7 e5e8 f7g7 e8h8 g7g6 c8g8 g6f5 g8f8 f5g5 h8e5 g5g6 e5f6 g6h7 f6f7 h7h6 f7f4 h6g6 f8f6 g6h7 f4f5 h7g7 f6g6 g7h7 g6a6 h7g7 f5d7 g7g8 a6g6 g8f8 g6f6 f8g8 d7f7 g8h8 f7e8 h8h7 e8g6 h7h8 g6h5 h8g8 f6g6 g8f7 g6h6 f7g8 h5e8 g8g7 e8h8 g7f7 h8h7 f7f8 h7h8 f8e7 h8f6 e7d7 f6e6 d7c7 e6e7 c7c8 e7c5 c8b7 c5e7 b7c8 e7e6 c8c7 h6h7 c7d8 e6d6 d8e8 h7h8 e8f7 d6f4 f7e7 d5d6 e7d7 h8h7 d7e8 f4e3 e8f8 h7h8 f8f7 e3e8 f7f6 h8f8 f6g5 e8e7 g5g6 e7e4 g6h5 e4f5 h5h4 f5f6 h4g4 f6e6 g4g3 e6g8 g3h4 g8h8 h4g4 f8g8 g4f4 g8f8 f4e4 f8e8 e4f4 h8f6 f4g4 f6e6 g4g3 e8g8 g3h4 e6f6 h4h5 f6g6 h5h4 g6g3 h4h5 g3f3 h5h4 f3f4 h4h5 f4e5 h5h4 g8h8 h4g4 e5g7 g4f4 g7f6 f4e4 f6h4 e4f5 h4h5 f5f6 h8h6 f6g7 h6g6 g7f7 h5f5 f7e8 d6d7 e8e7 f5e6 e7f8 g6f6 f8g7 f6g6 g7h7 g6h6 h7g7 e6f6 g7g8 f6d8 g8f7 h6f6 f7g7 d8e7 g7g8 e7d8 g8h7 f6f7 h7h6 d8h8 h6g6 h8h7 g6g5 d7d8q g5g4 h7g8
Ply: 191
bestmove[0].code: 0x80000175
Matthies commented 8 months ago

Lots of continuation history extensions here.

Matthies commented 8 months ago

Fixed by commit 7aa2cc6f73ef647b1351b00a5868add024f6869a