Check out Modern Chess, our featured variant for January, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

@ H. G. Muller[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Sep 20, 2024 07:32 AM UTC in reply to A. M. DeWitt from Thu Sep 19 07:19 PM:

I think I somewhat fixed it, now. The scoring routine, which has to be applied to the move exactly once before the latter can be performed, would interpret the promotion code (which would also indicate burning), and change it accordingly, as well as adding any burn victims to the move. For the purpose of legality testing I now always set the promotion code of the move to 0 first (meaning no promotion or burning), and set it back to the original value afterwards. That should always completely restore the move like the scoring routine had not been applied at all. (Which was the procedure before we did the legality testing.) So it has to be applied again on the move selected by the user. But by that time the user has also selected the desired promotion, so it will be known whether the move should burn or not, and the scoring routine will adapt the move accordingly.

This means the board state is now always modified as it should be for the chosen move. The legality testing could be off for moves that do burn, though (or kamikaze moves, which are also indicated by a special promotion code). As there will not be any burning during the legality test, the legal/illegal verdict might be wrong by failing to see a checking piece would be burned, or burning a piece discovered a check. But the destination will be highlighted anyway; just by the wrong symbol (grey cross vs normal). This would not prevent you from making the move, though. Instead of a move-entry bug it is just a highlighting bug.

To fix this I should enhance the procedure for legality testing on moves that always burn or self-destruct. Or perhaps on any move where there is no promotion with choice, as it would in principle also be possible to have type-dependent blocking. Only on burning moves the effect of 'scoring' the move is hard to revert; perhaps I should make a copy of the move for testing legality, and discard that copy afterwards. Promotion with choice is a more complex issue; all promotions are selected through the same highlighted destination square. But some of the choices could be legal, others not.

I also tried to reduce the annoying delay that occured on the first time a piece in the Diagram gets clicked. (The legality testing requires piece values to be defined, so rather than on opening the AI panel the time-consuming guestimating of piece values iss now done on the first click.) I did this by just running fewer iterations on that first click.