hgm wrote:Well, as already mentioned the quality of the random generator is of no importance whatsoever.
Perhaps not if the algorithm is only good for 16 bits. :)
hgm wrote:
You should use the generator to fill the table that otherwise predefines the randoms, though. Not use it dynamically during search. Because then when you encounter the same position, you would generate a completely different key. So you would retrieve the wrong entry from the TT, which probably will have an invalid hash move for the position, which then will make the engine crash.
Well, most engines verify the hash move, right? The key would just be useless as it becomes random. ^^
hgm wrote:Well, as already mentioned the quality of the random generator is of no importance whatsoever.
Perhaps not if the algorithm is only good for 16 bits.
hgm wrote:
You should use the generator to fill the table that otherwise predefines the randoms, though. Not use it dynamically during search. Because then when you encounter the same position, you would generate a completely different key. So you would retrieve the wrong entry from the TT, which probably will have an invalid hash move for the position, which then will make the engine crash.
Well, most engines verify the hash move, right? The key would just be useless as it becomes random. ^^
verifying the hashmove is waste of cycles. Why would you waste code on that?
Note i'm using internal 128 bits from which a bit or 70-80 get stored in hashtable (i include lookup into that 70-80).
I had that built in 2003 one day for supercomputer - appeared useless though, but kept it in my code...
Obviously my philosophy is different from others there. My philosophy is that i want 0 collissions, let alone 0 errors, to occur.
That removes simply all kind of deep theoretical research on how big impact of such errors is.
Last edited by diep on Wed Jul 11, 2012 9:31 pm, edited 1 time in total.
I'm not building another clone i don't publish engine or particpiate to all engine tournament
i'm just interested about how works a chess engine and try to understand bitboard : just curiosity nothing more.
Try this hash function to replace (piece,square) hash keys. I tested it with a real chess engine and it did not show much slow down compared to using pre-generated tables.
For castling/epsquare hashkeys, find a good 64bit hash key and then rotate it until you have enough. So far there doesn't seem to be a major problem with this method ...