likeawizard / chess-go

Chess engine with lichess.org bot-play integration. Discontinued. Further development migrated to https://github.com/likeawizard/tofiks
2 stars 0 forks source link

Bug: QSearch ends up in infinite loop #71

Closed likeawizard closed 2 years ago

likeawizard commented 2 years ago

./analyze -fen="2k5/p1p3p1/1p3p1p/4n3/n1P4R/1K6/6rP/7R b - - 1 30" [100 325 325 500 975 10000] 2022/09/30 17:03:10 maxprocs: Leaving GOMAXPROCS=12: CPU quota undefined 2022/09/30 17:03:10 profile: cpu profiling enabled, /tmp/profile2215796145/cpu.pprof 178 30 69 Depth: 1 (-7.37) Move: [a4c5] (1.7Mnps, total: 648.0 (1.0 647.0), QN: 99%, evals: 99%) Depth: 2 (-7.21) Move: [a4c5 b3a3] (1.5Mnps, total: 742.0 (37.0 705.0), QN: 95%, evals: 95%) Depth: 3 (-11.26) Move: [a4c5 b3c3 a7a6] (1.8Mnps, total: 1.4k (75.0 1.3k), QN: 94%, evals: 94%) Depth: 4 (-7.08) Move: [a4c5 b3c3 g2g4 h4g4] (1.6Mnps, total: 36.4k (2.3k 34.1k), QN: 93%, evals: 93%) Depth: 5 (-7.37) Move: [a4c5 b3c3 c5a4 c3b3 a4c5] (1.1Mnps, total: 251.9k (8.9k 242.9k), QN: 96%, evals: 96%) runtime: goroutine stack exceeds 1000000000-byte limit

Likely cause - capture generator generates a non-capture move and causes which can prevent qSearch from stopping.

likeawizard commented 2 years ago

Resolved with #68 - bad king capture generation bug