[d]3R4/qb3p1p/1p2p1pk/pB2P3/4PP2/Q3K1P1/7r/8 w - - 0 42
just one example.
here my engine starts the line with Df8+ ... and a correct mate-score.
Suddenly it blunders the queen for nothing with a mate in one, thinking
it is mating the opponent.
now having a look on this position, i went forward and backward
while let the engine thinking (cb-gui).
It blunders by random just like:
ex1:
Dg5 with m#1 ??
[d]3R4/qb2Qp2/1p2p1pp/pB2P2k/4PP2/4K1P1/7r/8 w - - 0 44
or if the line is continued with Rd2 - Kg4
Rh2 is given with mate in 1,2,3.
all i did is going forward and backward through the position
while the engine thinks.Especially doing this the engine begins
to go crazy.
Code: Select all
//--------writeTTB----------------------
//--------------------------------------
void writeTTB(TRANSTABLE_T *ttb,
BOARD_T *brd,
MVE_T mve,
VAL_T score,
PLY_T rdp,
int type)
{
TRANSDAT_T *tdat = connectTTB(ttb,brd->key);
//empty slot
if(tdat->type == 0)
{
tdat->lock = lockTTB(brd->key);
tdat->mve = mve;
tdat->score= score;
tdat->rdp = rdp;
tdat->type = type;
tdat->age = ttb->age;
}
//overwrite aged slot
else if(tdat->age != ttb->age)
{
tdat->lock = lockTTB(brd->key);
tdat->mve = mve;
tdat->score= score;
tdat->rdp = rdp;
tdat->type = type;
tdat->age = ttb->age;
}
//position already in
else if(tdat->lock == lockTTB(brd->key))
{
if(FULLPLY(rdp) >= tdat->rdp)
{
tdat->lock = lockTTB(brd->key);
tdat->mve = mve;
tdat->score= score;
tdat->rdp = rdp;
tdat->type = type;
tdat->age = ttb->age;
}
}
//always replace
else
{
tdat->lock = lockTTB(brd->key);
tdat->mve = mve;
tdat->score= score;
tdat->rdp = rdp;
tdat->type = type;
tdat->age = ttb->age;
}
return;
}
//--------valuaToTTB--------------------
//--------------------------------------
VAL_T valueToTTB(VAL_T score,PLY_T cdp)
{
if(score < lbound+MAXDEPTH) score -= cdp;
else if(score > ubound-MAXDEPTH) score += cdp;
return(score);
}
//--------valueFrTTB--------------------
//--------------------------------------
VAL_T valueFrTTB(VAL_T score,PLY_T cdp)
{
if(score < lbound + MAXDEPTH) score += cdp;
else if(score > ubound + MAXDEPTH) score -= cdp;
return(score);
}
and retrieving looks for the moment like this...
Code: Select all
if(lockTTB(brd->key) == tdat->lock)
{
ttb->hits++;
pd->tScore = valueFrTTB(tdat->score,cdp);
pd->tmv = tdat->mve;
if(tdat->type == typeEX)
{
if(FULLPLY(rdp) < tdat->rdp) return(pd->tScore);
}
else if(tdat->type == typeLB)
{
if(FULLPLY(rdp) < tdat->rdp)
if(pd->tScore>=beta) return(pd->tScore);
}
else if(tdat->type == typeUB)
{
if(FULLPLY(rdp) < tdat->rdp)
if(pd->tScore<=alpha) return(pd->tScore);
}
}
Michael