bob wrote:No. I explicitly said I would use a _list_ of zobrist random numbers for each piece type.
Exactly, this is what I said. You would have to assign keys to (copyNumber, pieceType, square) combinations. In this case only for square == HOLDINGS, but it still unecessary bloats the key table.
Since I can have 10 knights in total from my pieces, plus my partner can hand me two from his game, I need an array of numbers knights(12). Now I don't use the same zobrist key for each knight. And when I choose to drop a piece on the board, I would xor the last number in the active list, and then xor in the square I dropped to and away we'd go.
So to update the key you do:
Z = Zobrist[pieceType];
hashKey ^= Z[dropSquare] ^ Z[holdingsCount] ^ Z[holdingsCount+1];
That is more work than
Z = Zobrist[pieceType];
hashKey += Z[dropSquare] - Z[holdingsSquare];
what you would have to do wth an additive key. Not only do you save a table lookup plus an ALU operation, but with clever representation of drop moves you could save on branches (and mispredictions) as well, as the latter cod has the same form as that of an ordinary move.