Author: Uri Blass
Date: 06:38:14 09/08/03
I am not sure about the right way to implement it.
I guess first that every time that I want to evaluate the pawn structure
I do after updating the key:
if (ProbePawnHash()==0)
RecordPawnHash();
For doing things clear here are the functions that I wrote
for probing pawn hash tables and for recording pawn hash tables.
I ask if this is basically the idea(of course I do not have x,y,z and I plan to
have varaibles and arrays with different names)
int ProbePawnHash()
{
__int64 zob=zobpawnkey[hply];
PAWNHASHE * phashe = &pawn_hash_table[(unsigned int)zob % PawnTableSize];
if (phashe->key == zob)
return 1;
else
return 0;
}
void RecordPawnHash()
{
__int64 zob=zobpawnkey[hply];
/*x,y,z can be local varaibles or local arrays that have information about pawn
structure. you calculate the value of them here
this function is not called often so you do not need to care about speed*/
PAWNHASHE*phashe=&pawn_hash_table[(unsigned int)zob%PawnTableSize];
phashe->key = zob;
phashe->x=x;
phashe->y=y;
phashe->z=z;
}
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.