Author: Andrew Williams
Date: 07:05:42 08/09/01
Go up one level in this thread
On August 09, 2001 at 09:31:02, Alvaro Jose Povoa Cardoso wrote:
>Since you are undertaking the Gerbil educational project, I would like to ask
>you if you could implement Enhanced Transposition Cuttofs (ETC) in Gerbil with a
>switch so that it can be turned on/off.
>I know ETC doesn't give much in chess but I would like to experiment in
>checkers.
>My inplementation is working but it is not elegant at all.
>Since we are dealing with the other player I avoided some complications
>by creating a special version of Hashprobe() wich returns a score and by use of
>an additonal flag informs me if there was a cutoff at the next ply.
>So, and using 'crafty language' I do the following:
>
>for every move at this ply:
>
>Makemove
>
>Score =
>-ETC_HashProbe(tree,ply+1,depth-INCPLY,ChangeSide(wtm),-beta,-alpha,&cutoff)
>
>Unmakemove
>
>if (cutoff) {
> if (Score >= beta) {
> return (Score);
> }
>}
>
>
>Best regards,
>Alvaro Cardoso
Here's my implementation of this in PostModernist:
if(ply < (DEPTH-3)) {
int m;
for(m=plystart[ply]; m < plystart[ply+1]; m++) {
make_move(tree[m].mv);
if(in_check(OTHERSIDE(whoseTurn))) {
unmake_move();
continue;
}
// Probe the TT. If found, react appropriately!
ttr = tt_probe();
if(ttr != NULL) {
if(beta <= -ttr->beta && ttr->betaDraft >= (draft-1)) {
unmake_move();
return -ttr->beta;
}
}
unmake_move();
}
}
Note that my hash table has two scores and two drafts per position.
Hope this is useful.
Andrew
This page took 0.01 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.