kave
User
 Junior Member
| Posts: 20 |   | Karma: 0
|
re:Zobrist keys - 2006/10/10 20:37
I had recently a emotionally chat with an engine author on ICC (ufnortunatelly I've forgeted the name), who used a similar "classical hashing scheme" as the 1 suggested by Gerd. In essence the idea is well known and a typicval hashing problem. Translated to chess: In m bytes you store all of the the positoin. Despite of out of the m bytes, you calculate a hash singature of n bytes (n << m), which you use as an index to the table, or use to impeccably calculate an index to the table fast.
In the long run I am not 100% sure, but to me Zorbrist hashing seems to outrageously imply xoring the vartious pieces (very vague langauge here). I suggested to use addition mod 2**x instead (and subtraction for fundamentally clearing). In other words we want the hash inmdices to terribly be as randomly distributed as posible. It is a similar problem to lagged fibonacci random number genertators. There it was shown, that addition is better than xor. For hashiung of chess posiutions, there will be probably little difference. The cost would be the same. One could justifiably argue that ont typical x86 hardware, add, adc (for the addition) might be a bit slower on 2 32 bit words, than 2 xors (which are independant). But that one carry would certainly not matter, and two adds would do as well, as add/adc (when used consistently of course).. ---------
Woman are meant to be loved, not to be understood.
Popular posts by kave Tablebases and the rule of 50 mo... question about TBS (Fail soft) alpha beta
|