mirror of
https://github.com/sockspls/badfish
synced 2025-05-03 18:19:35 +00:00
Finally remove any occurence of dcCandidates from search.cpp
This ends our cleanup series. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
683e6dc656
commit
9e1d142fdd
1 changed files with 4 additions and 14 deletions
|
@ -291,8 +291,7 @@ namespace {
|
||||||
bool idle_thread_exists(int master);
|
bool idle_thread_exists(int master);
|
||||||
bool split(const Position &pos, SearchStack *ss, int ply,
|
bool split(const Position &pos, SearchStack *ss, int ply,
|
||||||
Value *alpha, Value *beta, Value *bestValue, Depth depth,
|
Value *alpha, Value *beta, Value *bestValue, Depth depth,
|
||||||
int *moves, MovePicker *mp, Bitboard dcCandidates, int master,
|
int *moves, MovePicker *mp, int master, bool pvNode);
|
||||||
bool pvNode);
|
|
||||||
void wake_sleeping_threads();
|
void wake_sleeping_threads();
|
||||||
|
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_MSC_VER)
|
||||||
|
@ -776,7 +775,6 @@ namespace {
|
||||||
|
|
||||||
Value alpha = -VALUE_INFINITE;
|
Value alpha = -VALUE_INFINITE;
|
||||||
Value beta = VALUE_INFINITE, value;
|
Value beta = VALUE_INFINITE, value;
|
||||||
Bitboard dcCandidates = pos.discovered_check_candidates(pos.side_to_move());
|
|
||||||
|
|
||||||
// Loop through all the moves in the root move list
|
// Loop through all the moves in the root move list
|
||||||
for (int i = 0; i < rml.move_count() && !AbortSearch; i++)
|
for (int i = 0; i < rml.move_count() && !AbortSearch; i++)
|
||||||
|
@ -984,7 +982,6 @@ namespace {
|
||||||
int moveCount = 0;
|
int moveCount = 0;
|
||||||
Value value, bestValue = -VALUE_INFINITE;
|
Value value, bestValue = -VALUE_INFINITE;
|
||||||
Color us = pos.side_to_move();
|
Color us = pos.side_to_move();
|
||||||
Bitboard dcCandidates = pos.discovered_check_candidates(us);
|
|
||||||
bool isCheck = pos.is_check();
|
bool isCheck = pos.is_check();
|
||||||
bool mateThreat = pos.has_mate_threat(opposite_color(us));
|
bool mateThreat = pos.has_mate_threat(opposite_color(us));
|
||||||
|
|
||||||
|
@ -1090,7 +1087,7 @@ namespace {
|
||||||
&& !AbortSearch
|
&& !AbortSearch
|
||||||
&& !thread_should_stop(threadID)
|
&& !thread_should_stop(threadID)
|
||||||
&& split(pos, ss, ply, &alpha, &beta, &bestValue, depth,
|
&& split(pos, ss, ply, &alpha, &beta, &bestValue, depth,
|
||||||
&moveCount, &mp, dcCandidates, threadID, true))
|
&moveCount, &mp, threadID, true))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1284,7 +1281,6 @@ namespace {
|
||||||
Move move, movesSearched[256];
|
Move move, movesSearched[256];
|
||||||
int moveCount = 0;
|
int moveCount = 0;
|
||||||
Value value, bestValue = -VALUE_INFINITE;
|
Value value, bestValue = -VALUE_INFINITE;
|
||||||
Bitboard dcCandidates = pos.discovered_check_candidates(pos.side_to_move());
|
|
||||||
Value futilityValue = VALUE_NONE;
|
Value futilityValue = VALUE_NONE;
|
||||||
bool useFutilityPruning = UseFutilityPruning
|
bool useFutilityPruning = UseFutilityPruning
|
||||||
&& depth < SelectiveDepth
|
&& depth < SelectiveDepth
|
||||||
|
@ -1386,7 +1382,7 @@ namespace {
|
||||||
&& !AbortSearch
|
&& !AbortSearch
|
||||||
&& !thread_should_stop(threadID)
|
&& !thread_should_stop(threadID)
|
||||||
&& split(pos, ss, ply, &beta, &beta, &bestValue, depth, &moveCount,
|
&& split(pos, ss, ply, &beta, &beta, &bestValue, depth, &moveCount,
|
||||||
&mp, dcCandidates, threadID, false))
|
&mp, threadID, false))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1472,7 +1468,6 @@ namespace {
|
||||||
Move move;
|
Move move;
|
||||||
int moveCount = 0;
|
int moveCount = 0;
|
||||||
Color us = pos.side_to_move();
|
Color us = pos.side_to_move();
|
||||||
Bitboard dcCandidates = pos.discovered_check_candidates(us);
|
|
||||||
bool enoughMaterial = pos.non_pawn_material(us) > RookValueMidgame;
|
bool enoughMaterial = pos.non_pawn_material(us) > RookValueMidgame;
|
||||||
|
|
||||||
// Loop through the moves until no moves remain or a beta cutoff
|
// Loop through the moves until no moves remain or a beta cutoff
|
||||||
|
@ -1585,7 +1580,6 @@ namespace {
|
||||||
&& (move = sp->mp->get_next_move(sp->lock)) != MOVE_NONE)
|
&& (move = sp->mp->get_next_move(sp->lock)) != MOVE_NONE)
|
||||||
{
|
{
|
||||||
assert(move_is_ok(move));
|
assert(move_is_ok(move));
|
||||||
assert(pos.discovered_check_candidates(pos.side_to_move()) == sp->dcCandidates);
|
|
||||||
|
|
||||||
bool moveIsCheck = pos.move_is_check(move);
|
bool moveIsCheck = pos.move_is_check(move);
|
||||||
bool moveIsCapture = pos.move_is_capture(move);
|
bool moveIsCapture = pos.move_is_capture(move);
|
||||||
|
@ -1697,8 +1691,6 @@ namespace {
|
||||||
&& !thread_should_stop(threadID)
|
&& !thread_should_stop(threadID)
|
||||||
&& (move = sp->mp->get_next_move(sp->lock)) != MOVE_NONE)
|
&& (move = sp->mp->get_next_move(sp->lock)) != MOVE_NONE)
|
||||||
{
|
{
|
||||||
assert(pos.discovered_check_candidates(pos.side_to_move()) == sp->dcCandidates);
|
|
||||||
|
|
||||||
bool moveIsCheck = pos.move_is_check(move);
|
bool moveIsCheck = pos.move_is_check(move);
|
||||||
bool moveIsCapture = pos.move_is_capture(move);
|
bool moveIsCapture = pos.move_is_capture(move);
|
||||||
|
|
||||||
|
@ -2680,8 +2672,7 @@ namespace {
|
||||||
|
|
||||||
bool split(const Position &p, SearchStack *sstck, int ply,
|
bool split(const Position &p, SearchStack *sstck, int ply,
|
||||||
Value *alpha, Value *beta, Value *bestValue,
|
Value *alpha, Value *beta, Value *bestValue,
|
||||||
Depth depth, int *moves,
|
Depth depth, int *moves, MovePicker *mp, int master, bool pvNode) {
|
||||||
MovePicker *mp, Bitboard dcCandidates, int master, bool pvNode) {
|
|
||||||
assert(p.is_ok());
|
assert(p.is_ok());
|
||||||
assert(sstck != NULL);
|
assert(sstck != NULL);
|
||||||
assert(ply >= 0 && ply < PLY_MAX);
|
assert(ply >= 0 && ply < PLY_MAX);
|
||||||
|
@ -2717,7 +2708,6 @@ namespace {
|
||||||
splitPoint->alpha = pvNode? *alpha : (*beta - 1);
|
splitPoint->alpha = pvNode? *alpha : (*beta - 1);
|
||||||
splitPoint->beta = *beta;
|
splitPoint->beta = *beta;
|
||||||
splitPoint->pvNode = pvNode;
|
splitPoint->pvNode = pvNode;
|
||||||
splitPoint->dcCandidates = dcCandidates;
|
|
||||||
splitPoint->bestValue = *bestValue;
|
splitPoint->bestValue = *bestValue;
|
||||||
splitPoint->master = master;
|
splitPoint->master = master;
|
||||||
splitPoint->mp = mp;
|
splitPoint->mp = mp;
|
||||||
|
|
Loading…
Add table
Reference in a new issue