Here is how I implemented PVS. I've taken out the extemporary stuff to make it readable.
- Code: Select all
if (PVFound) // we already found the PV
{
score = -ABTT( depth - 1, -alpha - 1, -alpha, NO_PV, DO_NULL);
if ((score > alpha) && (score < beta))
score = -ABTT( depth - 1, -beta, -alpha, IS_PV, DO_NULL);
}
else // PV code goes here
score = -ABTT( depth - 1, -beta, -alpha, IsPV, DO_NULL);
From the CPW pages, a set of rules to control LPR as when NOT to use LMR follows:
•Still working on the first few moves
•Tactical moves (captures and promotions)
•Moves while in check
•Moves which give check
•Moves that cause a search extension
•Anytime in a PV-Node in a PVS search
•Depth < 3 (sometimes depth < 2)
I interpreted the rule "Anytime in a PV-Node in a PVS search" to mean, don't do a reduction in the above code shown here..
- Code: Select all
else // PV code goes here
score = -ABTT( depth - 1, -beta, -alpha, IsPV, DO_NULL);
if that is correct, then that means the only places to the reduction are in the narrow window search or the research if the narrow window search fails. Or does it mean you have to scrap this model and use a different calling sequence.
Reducing the narrow search by 1-ply didn't seem to do much in way of speeding up my searches, so I'm a loss to know where to insert the reduction.
I don't just want to try stuff willy/nilly, I want to understand why I'm doing it.
any insight is appreciated.
