mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 16:47:37 +00:00
Drop KILLER_MAX. Hardcode to 2 instead.
KILLER_MAX in search.h is quite pointless, because we already hardcode this to 2 in MovePicker anyway. By hard-coding this to 2 we can keep code simpler. No functional change Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
committed by
Marco Costalba
parent
a6d13428f6
commit
66c5835080
+4
-10
@@ -368,9 +368,7 @@ void SearchStack::init() {
|
|||||||
// SearchStack::initKillers() initializes killers for a search stack entry
|
// SearchStack::initKillers() initializes killers for a search stack entry
|
||||||
void SearchStack::initKillers() {
|
void SearchStack::initKillers() {
|
||||||
|
|
||||||
mateKiller = MOVE_NONE;
|
killers[0] = killers[1] = mateKiller = MOVE_NONE;
|
||||||
for (int i = 0; i < KILLER_MAX; i++)
|
|
||||||
killers[i] = MOVE_NONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1872,10 +1870,8 @@ namespace {
|
|||||||
|
|
||||||
bool move_is_killer(Move m, SearchStack* ss) {
|
bool move_is_killer(Move m, SearchStack* ss) {
|
||||||
|
|
||||||
const Move* k = ss->killers;
|
if (ss->killers[0] == m || ss->killers[1] == m)
|
||||||
for (int i = 0; i < KILLER_MAX; i++, k++)
|
return true;
|
||||||
if (*k == m)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2052,9 +2048,7 @@ namespace {
|
|||||||
if (m == ss->killers[0])
|
if (m == ss->killers[0])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = KILLER_MAX - 1; i > 0; i--)
|
ss->killers[1] = ss->killers[0];
|
||||||
ss->killers[i] = ss->killers[i - 1];
|
|
||||||
|
|
||||||
ss->killers[0] = m;
|
ss->killers[0] = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
const int PLY_MAX = 100;
|
const int PLY_MAX = 100;
|
||||||
const int PLY_MAX_PLUS_2 = 102;
|
const int PLY_MAX_PLUS_2 = 102;
|
||||||
const int KILLER_MAX = 2;
|
|
||||||
|
|
||||||
|
|
||||||
////
|
////
|
||||||
@@ -55,7 +54,7 @@ struct SearchStack {
|
|||||||
Move threatMove;
|
Move threatMove;
|
||||||
Move excludedMove;
|
Move excludedMove;
|
||||||
Move bestMove;
|
Move bestMove;
|
||||||
Move killers[KILLER_MAX];
|
Move killers[2];
|
||||||
Depth reduction;
|
Depth reduction;
|
||||||
Value eval;
|
Value eval;
|
||||||
bool skipNullMove;
|
bool skipNullMove;
|
||||||
|
|||||||
Reference in New Issue
Block a user