Theoretical question about Zobrist hashing and chances of collision with slight modification 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?
it may be better to store them in separate hash table. or, if you need them in the same table:

tmp = position
if (makeItUnique)
    tmp := [memory address of position object]
hash = zobristHash(tmp);


It's better than your current code since it will avoid collisions of objects with the same position AND similar memory address (the definition of similarity here depends on how you use the hash value to address the hash table)