not checking isPV | bench 3451231
This commit is contained in:
1 parent
58a415f9c4
commit
5ca96c7746
1 file changed
+5
-8
+5
-8
@@ -128,7 +128,6 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int
|
|||||||
return reduction;
|
return reduction;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <bool isPV>
|
|
||||||
static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
|
static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
|
||||||
if (!benchStarted && nodes % 1024 == 0) {
|
if (!benchStarted && nodes % 1024 == 0) {
|
||||||
if (sw.GetElapsedMS() >= timeToSearch) {
|
if (sw.GetElapsedMS() >= timeToSearch) {
|
||||||
@@ -139,11 +138,9 @@ static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
|
|||||||
|
|
||||||
int bestScore = HCE::Evaluate(board);
|
int bestScore = HCE::Evaluate(board);
|
||||||
|
|
||||||
if constexpr (!isPV) {
|
TTEntry *entry = TT.GetRawEntry(board.hashKey);
|
||||||
TTEntry *entry = TT.GetRawEntry(board.hashKey);
|
if (entry->hashKey == board.hashKey) {
|
||||||
if (entry->hashKey == board.hashKey) {
|
bestScore = entry->score;
|
||||||
bestScore = entry->score;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -165,7 +162,7 @@ static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
|
|||||||
Board copy = board;
|
Board copy = board;
|
||||||
int isLegal = copy.MakeMove(board.moveList[i]);
|
int isLegal = copy.MakeMove(board.moveList[i]);
|
||||||
if (!isLegal) continue;
|
if (!isLegal) continue;
|
||||||
int score = -Quiescence<isPV>(copy, -beta, -alpha, ply + 1).score;
|
int score = -Quiescence(copy, -beta, -alpha, ply + 1).score;
|
||||||
positionIndex--;
|
positionIndex--;
|
||||||
|
|
||||||
if (score >= beta) {
|
if (score >= beta) {
|
||||||
@@ -206,7 +203,7 @@ SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (depth <= 0) return Quiescence<isPV>(board, alpha, beta, ply);
|
if (depth <= 0) return Quiescence(board, alpha, beta, ply);
|
||||||
|
|
||||||
const int staticEval = HCE::Evaluate(board);
|
const int staticEval = HCE::Evaluate(board);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user