eric-ycw / wowl

UCI chess engine written in C++
MIT License
1 stars 0 forks source link

Broken promotions to queen #3

Closed tpoppins closed 6 years ago

tpoppins commented 6 years ago

Wowl correctly appends the q suffix when promoting pawns to queen in the PV, yet fails to do so when sending bestmove. This results in games terminated due to illegal moves under GUIs that strictly adhere to the UCI spec, e.g. Cute Chess.

An example: 3R4/2P2k2/8/1p4P1/1p5P/1P4K1/2r5/8 w - - 0 1

<Wowl rev76(37): info score cp 1928 depth 19 nodes 1475151 time 31400 pv c7c8q c2c3 g3g4 c3c8 d8c8 f7e7 c8c7 e7d6 c7f7 d6e5 g5g6 e5e6 h4h5 e6d6 g6g7 d6e6 g7g8 e6d6 c8c7 
<Wowl rev76(37): move ordering 89.6
<Wowl rev76(37): bestmove c7c8

As a temp stop-gap measure I use the Polyglot adapter that has a built-in workaround for that; Wowl won't make a move in such a config, though.

Tirsa@CCRL

eric-ycw commented 6 years ago

Thanks for the report, I'm looking into it right now.

tpoppins commented 6 years ago

Good job! The promotion to queen works as expected now.

Unfortunately, the latest commit seems to have introduced another bug: bestmove is now sometimes returned as 0000.

I use the following position to see how engines handle the KRK endgame: R7/2K5/8/2k5/8/8/8/8 w - - 0 1

Wowl starts out well but fails to mate. Twice I tried and twice the game game was terminated due to an illegal move (0000), Here's the full debug log for one of them: link