pkrisz99 / Renegade

A strong chess engine using a neural network to evaluate positions
https://lichess.org/@/RenegadeEngine
MIT License
20 stars 2 forks source link

Fix invalid or incorrect PV outputs #2

Closed pkrisz99 closed 1 year ago

pkrisz99 commented 1 year ago

As of 7eb14deeea63c89414e7d04704a6aacb7891a90b this was mitigated, invalid PVs are truncated. It still outputs an incorrect PV line if but the moves are legal.

It's unclear how often this happens, when the engine was connected through lichess-bot it seemed to happen in about 10% of the moves, but these are the illegal PVs only. These issues are more prevalent, the longer a PV is, the smallest depth I've seen this issue occur was at depth=4.

pkrisz99 commented 1 year ago

Seems to be a transposition table related issue.

pkrisz99 commented 1 year ago

I haven't had this issue in a while. Will reopen this if it's needed.

pkrisz99 commented 1 year ago

Nevermind, seems wrong for mates: r5rk/pp1np1bn/2pp2q1/3P1bN1/2P1N2Q/1P6/PB2PPBP/3R1RK1 w - - 0 1 PV output is incorrect here, the correct one is h4h7 g6h7 g5f7

pkrisz99 commented 1 year ago

This commit should replace the old buggy and over-engineered solution with a simple one. Has the welcome side-effect of actually passing SPRT too!