separated quiets from noisies | bench 3663120
This commit is contained in:
1 parent
0ff5a226ee
commit
1e62f6adef
3 files changed
+15
-6
No files matched your search
+9
-3
@@ -12,12 +12,18 @@
|
|||||||
namespace SEARCH {
|
namespace SEARCH {
|
||||||
|
|
||||||
void InitLMRTable() {
|
void InitLMRTable() {
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
const bool base = i ? lmrBaseQuiet : lmrBaseNoisy;
|
||||||
|
const bool divisor = i ? lmrDivisorQuiet : lmrDivisorNoisy;
|
||||||
|
|
||||||
for (int depth = 0; depth <= MAX_DEPTH; depth++) {
|
for (int depth = 0; depth <= MAX_DEPTH; depth++) {
|
||||||
for (int move = 0; move < MAX_MOVES; move++) {
|
for (int move = 0; move < MAX_MOVES; move++) {
|
||||||
if (depth == 0 || move == 0) {
|
if (depth == 0 || move == 0) {
|
||||||
lmrTable[depth][move] = 0;
|
lmrTable[i][depth][move] = 0;
|
||||||
} else {
|
} else {
|
||||||
lmrTable[depth][move] = std::floor(lmrBase + std::log(depth) * std::log(move) / lmrDivisor);
|
|
||||||
|
lmrTable[i][depth][move] = std::floor(base + std::log(depth) * std::log(move) / divisor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -163,7 +169,7 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int
|
|||||||
|
|
||||||
// Late Move Reduction
|
// Late Move Reduction
|
||||||
if (depth >= 2 && moveSeen >= 2 + (2 * isPV) && !move.IsCapture()) {
|
if (depth >= 2 && moveSeen >= 2 + (2 * isPV) && !move.IsCapture()) {
|
||||||
reduction = lmrTable[depth][moveSeen] * 1024;
|
reduction = lmrTable[move.IsQuiet()][depth][moveSeen] * 1024;
|
||||||
|
|
||||||
if (cutnode)
|
if (cutnode)
|
||||||
reduction += lmrCutnode;
|
reduction += lmrCutnode;
|
||||||
|
|||||||
+2
-1
@@ -34,7 +34,8 @@ constexpr int CORRHIST_MAX = 16384;
|
|||||||
constexpr int32_t ScoreNone = -255000;
|
constexpr int32_t ScoreNone = -255000;
|
||||||
constexpr int inf = 100000;
|
constexpr int inf = 100000;
|
||||||
|
|
||||||
inline int lmrTable[MAX_DEPTH+1][MAX_MOVES];
|
// first index: [0] noisy, [1] quiet
|
||||||
|
inline int lmrTable[2][MAX_DEPTH+1][MAX_MOVES];
|
||||||
|
|
||||||
#ifdef TUNING
|
#ifdef TUNING
|
||||||
inline std::array<int, 6> SEEPieceValues = {
|
inline std::array<int, 6> SEEPieceValues = {
|
||||||
|
|||||||
+4
-2
@@ -6,8 +6,10 @@
|
|||||||
#define AUTO_STEP(min_val, max_val) ((max_val - min_val) / 20.0)
|
#define AUTO_STEP(min_val, max_val) ((max_val - min_val) / 20.0)
|
||||||
|
|
||||||
#define TUNABLE_LIST \
|
#define TUNABLE_LIST \
|
||||||
X_DOUBLE(lmrBase, 0.77, 0.5, 1.5) \
|
X_DOUBLE(lmrBaseQuiet, 0.98, 0.5, 1.5) \
|
||||||
X_DOUBLE(lmrDivisor, 2.36, 1.5, 3.5) \
|
X_DOUBLE(lmrDivisorQuiet, 2.33, 1.5, 3.5) \
|
||||||
|
X_DOUBLE(lmrBaseNoisy, 0.39, 0.5, 1.5) \
|
||||||
|
X_DOUBLE(lmrDivisorNoisy, 3.48, 1.5, 3.5) \
|
||||||
X_INT(lmrCutnode, 2048, 1024, 3072) \
|
X_INT(lmrCutnode, 2048, 1024, 3072) \
|
||||||
X_INT(lmrIsPV, 1024, 512, 2048) \
|
X_INT(lmrIsPV, 1024, 512, 2048) \
|
||||||
X_INT(lmrHistoryDivisor, 8192, 6000, 10000) \
|
X_INT(lmrHistoryDivisor, 8192, 6000, 10000) \
|
||||||
|
|||||||
Reference in new issue
Block a user