Check out Alice Chess, our featured variant for June, 2024.


[ 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

Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Nov 18, 2022 06:36 AM UTC in reply to A. M. DeWitt from 01:15 AM:

This is an area where I changed a lot, lately: in the past the AI was not updating the hand at all, and when the MakeMove of the AI was also used for the user move this was no longer tolerable. But to avoid slowing down the AI by figuring out whether to flip color, I now always store captured pieces in the hand of the previous owner. Then for holdingsType -1 the drops (which the AI currently does not consider at all) have to flip the color. Apparently I did not convert the code to this new system in all places. I will have a look at it.

[Edit] Should be fixed now. Turned out I had actually been too enthusiastic spreading around code that would swap the color of the holdings element that was used. Another interesting bug was that the black holdings were increased by concatenation; after capturing two pawns you had 011 in hand! This resulted from applying mirror symmetry to the initial holdings count, where I forgot to swap in the element being copied. Apparently undefined is considered a string in JavaScript, so that undefined + 1 gives '01' rather than 1.