FP before making move | bench 768886
This commit is contained in:
1 parent
2c1d448d8f
commit
58a3e8f792
1 file changed
+5
-6
+5
-6
@@ -231,21 +231,20 @@ SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) {
|
|||||||
for (int i = 0; i < board.currentMoveIndex; i++) {
|
for (int i = 0; i < board.currentMoveIndex; i++) {
|
||||||
Move currMove = board.moveList[i];
|
Move currMove = board.moveList[i];
|
||||||
|
|
||||||
Board copy = board;
|
|
||||||
bool isLegal = copy.MakeMove(currMove);
|
|
||||||
|
|
||||||
if (!isLegal) continue;
|
|
||||||
|
|
||||||
// Futility pruning
|
// Futility pruning
|
||||||
// If our static eval is far below alpha, there is only a small chance
|
// If our static eval is far below alpha, there is only a small chance
|
||||||
// that a quiet move will help us so we skip them
|
// that a quiet move will help us so we skip them
|
||||||
int fpMargin = 100;
|
int fpMargin = 100;
|
||||||
if (!isPV && !board.InCheck() && currMove.IsQuiet()
|
if (!isPV && !board.InCheck() && currMove.IsQuiet()
|
||||||
&& depth <= 2 && staticEval + fpMargin < alpha) {
|
&& depth <= 2 && staticEval + fpMargin < alpha) {
|
||||||
positionIndex--;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Board copy = board;
|
||||||
|
bool isLegal = copy.MakeMove(currMove);
|
||||||
|
|
||||||
|
if (!isLegal) continue;
|
||||||
|
|
||||||
int reductions = GetReductions(board, currMove, depth, moveSeen, ply);
|
int reductions = GetReductions(board, currMove, depth, moveSeen, ply);
|
||||||
|
|
||||||
// First move (suspected PV node)
|
// First move (suspected PV node)
|
||||||
|
|||||||
Reference in new issue
Block a user