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);
•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);
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.