4 ms·
You can have only one en passant situation on the board at once. This means you can use 3 bits to encode the column for en passant, you check the board to eval
by LorenPechtel 3y ago
You can have only one en passant situation on the board at once. This means you can use 3 bits to encode the column for en passant, you check the board to evaluate the legality of the solution and discard if it isn't legal (this means you don't have to use a bit to encode whether it's possible as the encoder is guaranteed to be able to pick a column that it's not possible.)
- Dylan16807 3y agoYou can have two pawns in the same column in plausible en passant position after pawns cross over via capture. Of course after a capture you have more bits free, but you need to do something more complex than encoding the column.
- LorenPechtel 3y agoI think we are both wrong. En passant only exists for one move, whatever has happened from captures is irrelevant. However, now I realize you can have two possible en passant captures at once--a pawn moves to 4th rank between two opposing pawns on the 4th rank.
- alexb_ 3y agoThat's just not true. Pawns can only be captured en passant on one rank for each color.
- Dylan16807 3y agoYes for each color. That means two pawns for each column can be in position to be captured en passant. And also two pawns can be in capturing position. Edit: Column combined with whose turn it is will work, but not just column.
- mlyle 3y agoPart of a chess position is whose turn to move. That has to be encoded anyways.
- Dylan16807 3y agoI guess, but the article wasn't trying to do so.