Evert wrote:Ok, it looks like there's an issue if the rook is between the king and the place where the king ends up: Sjaak tests whether the space between the king and rook is empty, but that's not enough in this situation.
Indeed, you have to ignore King and Rook when testing for emptiness of the King and Rook trajectories.
Evert wrote:Ok, it looks like there's an issue if the rook is between the king and the place where the king ends up: Sjaak tests whether the space between the king and rook is empty, but that's not enough in this situation.
Indeed, you have to ignore King and Rook when testing for emptiness of the King and Rook trajectories.
I do that, but what I don't do is test properly whether the route to the destination is free.pot differently there is an assumption that the destination is between the king and the rook.
There's also an issue with the relative position of origin and destination squares I when castling long, the king I'd assumed to move to the left (white's perspective).this isn't necessarily true.
Indeed, there are many pitfalls. In Spartacus (which does not play FRC, but at least I designed it such that it would not be to difficult to implement it), I simply have a table that for each castling move stores the from and to-squares, the left-most and right-most squares that have to be tested for emptiness (ignoring the from-squares), and the left-most and rightmost squares that have to be tested for in-check. For the emptiness the left-most square is the left-most piece from both before and after castling (e.g. for O-O the left-most of King before and Rook after castling), etc.
Evert wrote:Ok, it looks like there's an issue if the rook is between the king and the place where the king ends up: Sjaak tests whether the space between the king and rook is empty, but that's not enough in this situation.
Indeed, you have to ignore King and Rook when testing for emptiness of the King and Rook trajectories.
I do that, but what I don't do is test properly whether the route to the destination is free.pot differently there is an assumption that the destination is between the king and the rook.
There's also an issue with the relative position of origin and destination squares I when castling long, the king I'd assumed to move to the left (white's perspective).this isn't necessarily true.
Remember that the King sometimes does not move during FRC castling.
Ok, the bug with construction of FRC castling flags in Sjaak is now fixed in my local tree. It turned out to be very simple in the end. I more-or-less rewrote the relevant part of the code to be stupider and more direct.
I also fixed an unrelated issue where Sjaak would sometimes send O-O when it meant O-O-O. This took a bit longer to find because XBoard would either interpret it correctly as O-O-O (!) or treat it as Kc1, which would cause an illegal move (claim) later in the game.
I'll upload a version for testing later tonight; there is apparently an issue with running Sjaak in 64 bit Windows that I cannot reproduce here (for lack of Windows), so I would appreciate some volunteers to help narrow down the problem.