Done ! => in test
PV test and PVS
Moderators: hgm, Rebel, chrisw
-
- Posts: 1871
- Joined: Sat Nov 25, 2017 2:28 pm
- Location: France
Re: PV test and PVS
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: PV test and PVS
in fixed point alphabeta implementation it's really simple to check for beta cutoff
Code: Select all
if( bestScore >= beta)
usually equality (a== b) is calculated as a+d > b > a-d where d is a very small number.
if you want to test that the result of a calculus is equal to 5.0 you have to check that your result is in range 4.999999 and 5.000001because it's probably that (5.0 +10000000.0) -10000000.0 is not really equal to 5.0.
if you want to implement a floating point alpha beta is better you have a really good floating point tricks knownledge, otherwise maybe in some cases your alpha beta search will be suboptimal and you may miss some cutoff or fail-low.
-
- Posts: 385
- Joined: Sat Feb 04, 2017 11:57 pm
- Location: USA
Re: PV test and PVS
Does the PVS framework change if the engine implements fail-hard?
example code doesn't always explain which framework is being used and I know it has left me scratching my head at time.
I'm using fail-hard since I find it easier to debug. perhaps once I get everything working nicely, I'll switch.
i7-6700K @ 4.00Ghz 32Gb, Win 10 Home, EGTBs on PCI SSD
Benchmark: Stockfish15.1 NNUE x64 bmi2 (nps): 1277K
Benchmark: Stockfish15.1 NNUE x64 bmi2 (nps): 1277K
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: PV test and PVS
in a fail hard framwork the return value cannot go outside the bonds so the bold characters can be removed i think
if(PVnode)
{
if(moveNumber==1)
{
val = -alphaBeta( -beta, -alpha );
}
else
{
val = -alphaBeta( -alpha-1, -alpha);
if( val > alpha && val < beta )
{
val = -alphaBet( -beta, -alpha );
}
}
}
else
{
val = -alphaBeta( -alpha-1, -alpha );
}