Code: Select all
array[a1..h8, array[knight..queen, array[a1..h8, Value]]] # The first square index is for the pawn, and the last one for the square of the piece
In the evaluation, this then will look like this:
For each pawn we will loop over all our pieces (knights, bishops, rooks, queens) and add the according entry in the pawn-contextual PST (we choose the right one, depending on if the pawn is ours or not) to the evaluation value.
In Nalwald this gave me a pretty huge improvement (50–100 Elo in selfplay), even though NPS went down by at least 10%.