A Question Regarding SEE
Moderator: Ras
-
- Posts: 18
- Joined: Fri Dec 24, 2021 5:48 pm
- Full name: Andrew Zhuo
A Question Regarding SEE
As you can tell by the title, I would like to have some clarification regarding a page on the Chess Programming Wiki. The page in question is "SEE - The Swap Algorithm", in the C-pseudocode specifically. First is the array "see_val[]". Would the piece values in this always be positive regardless of color? Secondly is the variable "d". This variable appears to assist in indicating the side to move, such as in the line "getLeastValuablePiece (attadef, d & 1, aPiece);". However, the examples below show only white to move positions, never the other way. Would it cause confusion if it were to be black to move? Thanks in advance.