FP with some test conds | bench 968174
This commit is contained in:
1 parent
03cc40bda3
commit
2c1d448d8f
2 files changed
+16
-1
No files matched your search
+6
-1
@@ -49,12 +49,17 @@ public:
|
|||||||
return m_move >> 12;
|
return m_move >> 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IsCapture() {
|
bool IsCapture() {
|
||||||
return (GetFlags() == capture || GetFlags() == epCapture
|
return (GetFlags() == capture || GetFlags() == epCapture
|
||||||
|| GetFlags() == knightPromoCapture || GetFlags() == bishopPromoCapture
|
|| GetFlags() == knightPromoCapture || GetFlags() == bishopPromoCapture
|
||||||
|| GetFlags() == rookPromoCapture || GetFlags() == queenPromoCapture);
|
|| GetFlags() == rookPromoCapture || GetFlags() == queenPromoCapture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsQuiet() {
|
||||||
|
return (GetFlags() == quiet || GetFlags() == kingCastle
|
||||||
|
|| GetFlags() == queenCastle || GetFlags() == doublePawnPush);
|
||||||
|
}
|
||||||
|
|
||||||
void PrintMove() {
|
void PrintMove() {
|
||||||
std::cout << squareCoords[MoveFrom()] << squareCoords[MoveTo()];
|
std::cout << squareCoords[MoveFrom()] << squareCoords[MoveTo()];
|
||||||
|
|
||||||
|
|||||||
@@ -236,6 +236,16 @@ SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) {
|
|||||||
|
|
||||||
if (!isLegal) continue;
|
if (!isLegal) continue;
|
||||||
|
|
||||||
|
// Futility pruning
|
||||||
|
// 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
|
||||||
|
int fpMargin = 100;
|
||||||
|
if (!isPV && !board.InCheck() && currMove.IsQuiet()
|
||||||
|
&& depth <= 2 && staticEval + fpMargin < alpha) {
|
||||||
|
positionIndex--;
|
||||||
|
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