Re:Positions chess engines don't understand
by agalunar on Monday May 17, 2021 @09:07PM
(#27190245)
Wait, there are only four promotions! Queen, rook, bishop, and knight – you're not allowed to keep a pawn on the back rank.
[ Parent
| on HN ]
Re:Positions chess engines don't understand
by dmurray on Wednesday May 19, 2021 @04:39AM
(#27206021)
Good point. If I remember right, the engine used one state to represent "no promotion happening this turn". Of course it's redundant, because you can determine that from the rest of the representation, but apparently it was worth being able to determine that with a single bitwise operation.
Edit:
> each move is easily encoded as a 16 bit value: 6 bits for origin square, 6 for destination square, 1 for en passant, 1 for castling, and 2 for promotion. The 2 promotion bits can only represent 4 options... and since the move encoding is for ANY move, not just promotions, one of the options is "no promotion"[0]
And another tidbit from that page: the same encoding is used for making moves and retracting them (going back up the search tree), so efficient encoding of "no promotion" is important there. E.g. If there's a white rook on e8 and the last move was e7-e8, when retracting it you need to know whether to put a pawn or a rook on e7.
[0] http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?tid=1...
Actually now that I think about it, promoting to a second king would be pretty sick. Then you have a spare so losing the original doesn't lose you the game immediately. I could see an incredible game where someone uses this to salvage an otherwise unescapable checkmate.
Re:Positions chess engines don't understand
by dragonwriter on Monday May 17, 2021 @09:11PM
(#27190268)
Yes. It’s possible some engines represent bishop-on-black as a different thing than bishop-on-white, which would make 5 with bishops and 3 without.