Author: Michael Henderson
Date: 11:50:29 09/26/04
Go up one level in this thread
On September 26, 2004 at 14:40:16, Zach Wegner wrote: >On September 26, 2004 at 14:29:20, Michael Henderson wrote: > >>On September 26, 2004 at 13:51:19, Zach Wegner wrote: >> >>>In my program, I allocate the hash tables with calloc(), which initializes >>>everything to zero. Recently I've been having a problem where the program >>>crashes on somewhat longer searches. After debugging, it turned out to be the >>>pawn hashkey is equal to 0, and the corresponding entry had not been written >>>into yet, making the program think it was a valid hit. The pawn data is all set >>>to zero and causes a seg fault later on. What's the best way to solve this? >>>Better zobrist numbers/ignore it? A "used" bit? >>> >>>Thanks, >>>Zach >> >>Your pawn hash key will be 0 if there are no pawns on the board. Don't run any >>pawn eval code or your program may crash. >> >>Michael > >No, this happens when the hashkey happens to be zero and there are pawns on the >board. I'm surprised it happens at all, especially when the hash table slot is >not filled in. What size pawn hashkey do you use and how are the random numbers generated? Once you notice that the pawn hashkey is 0, stop and hash all the pawns again in a second pawn hashkey and see if it is 0. Michael
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.