I have a hash table that uses zobrist hashing to calculate the hash for various positions. The hash table is used to look up various transpositions. For some positions I do not want to allow any transpositions, but I still want to store the position in the hash table. So I'm trying to make the position's hash unique by XOR'ing it with the memory address of the object that holds the position structure. Here is some pseudocode:
hash = zobristHash(position);
if (makeItUnique)
hash := h XOR [memory address of position object]
Is there any reason to suppose that what I'm doing will increase the likelihood of hash collisions?
reinterpret_cast<quint64>
, the question is off-topic here. $\endgroup$