val = -alphabeta(-alpha-1, -alpha, depth-1+ext, true, check);
if ((val > alpha) && (val < beta))
{
stats->pvsresearch++;
val = -alphabeta( -beta, -alpha, depth-1+ext, true, check);
}
Then the node count increases, rather than an expected decrease.
[...]
So the problem could well be the PVS implementation... sorry.
As far as I can see from your previous posts you are using fail-hard alpha-beta. So I am not sure whether your re-search condition "val > alpha && val < beta" is correct, IMO it should be "val > alpha" only. But it is possible that this is only redundant code since "val > alpha" after null-window search should mean "val == alpha+1".
val = -alphabeta(-alpha-1, -alpha, depth-1+ext, true, check);
if ((val > alpha) && (val < beta))
{
stats->pvsresearch++;
val = -alphabeta( -beta, -alpha, depth-1+ext, true, check);
}
Then the node count increases, rather than an expected decrease.
[...]
So the problem could well be the PVS implementation... sorry.
As far as I can see from your previous posts you are using fail-hard alpha-beta. So I am not sure whether your re-search condition "val > alpha && val < beta" is correct, IMO it should be "val > alpha" only. But it is possible that this is only redundant code since "val > alpha" after null-window search should mean "val == alpha+1".
Sven
I think the "&& val < beta" is OK, sorry for confusing you. There was a discussion last year where that has been asked already, see the "PVS" thread in this forum that just popped up again today.
int played=0;
for(uint i = 0; i < mlist.getcount(game.getply()); ++i)
{
picknext(i,mlist);
if (makemove(game,mat,his,list[i]))
{
takemove(game,mat,his);
continue;
}
check = incheck(game,mat,game.getside());
ext = 0;
if(check)
{
stats->checkext++;
ext = 1;
}
if (played==0 && opt->pvs)
{
stats->pvssearch++;
val = -alphabeta(-alpha-1, -alpha, depth-1+ext, true, check);
if ((val > alpha) && (val < beta))
{
stats->pvsresearch++;
val = -alphabeta( -beta, -alpha, depth-1+ext, true, check);
}
}
takemove(game,mat,his);
if(status->stopped == STOPPED)
{
return 0;
}
played++;
from = FROM(list[i]);
if (val > alpha)
{
// ..etc
This PVS implementation is flawed IMO. You do a zero-width search and possibly a re-search if played == 0, i.e. for the first move? That does not make sense for me. Can you explain whether this is a bug or a feature?
Spacious_Mind wrote:Quick side topic. Do you still have your chess program available for Atari ST ? If so I wouldn't mind checking it out.
I can offer the source and TOS Program of my first chess program
"HLSchach" on the Atari ST. This program was never publicly released
for a good reason. It looked nice but was extremely slow. In a few minutes
it could only reach ply 4 to 6. The move ordering for the alpha beta
algorithm was just awful. The language of the program is C. I can not
promise that the last version I found in my "old Atari" folder works
without problems.