re-init SEE values and LMR table on tuning | bench 1398874
This commit is contained in:
1 parent
13cb768c67
commit
cfcd24318b
4 files changed
+25
No files matched your search
@@ -47,7 +47,11 @@ int main(int argc, char* argv[]) {
|
|||||||
MOVEGEN::initLeaperAttacks();
|
MOVEGEN::initLeaperAttacks();
|
||||||
MOVEGEN::initSliderAttacks();
|
MOVEGEN::initSliderAttacks();
|
||||||
UTILS::InitZobrist();
|
UTILS::InitZobrist();
|
||||||
|
#ifdef TUNING
|
||||||
|
SEARCH::RefreshTunableCaches();
|
||||||
|
#else
|
||||||
SEARCH::InitLMRTable();
|
SEARCH::InitLMRTable();
|
||||||
|
#endif
|
||||||
|
|
||||||
Board board;
|
Board board;
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,19 @@ void InitLMRTable() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TUNING
|
||||||
|
void InitSEEPieceValues() {
|
||||||
|
SEEPieceValues = {
|
||||||
|
seePawnValue, seeKnightValue, seeBishopValue, seeRookValue, seeQueenValue, 0
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
void RefreshTunableCaches() {
|
||||||
|
InitLMRTable();
|
||||||
|
InitSEEPieceValues();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int16_t ContHistory::GetNPly(Board& board, Move& move, SearchContext* ctx, int ply, int n) {
|
int16_t ContHistory::GetNPly(Board& board, Move& move, SearchContext* ctx, int ply, int n) {
|
||||||
int prevType = ctx->ss[ply-n].pieceType;
|
int prevType = ctx->ss[ply-n].pieceType;
|
||||||
int prevTo = ctx->ss[ply-n].moveTo;
|
int prevTo = ctx->ss[ply-n].moveTo;
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ constexpr std::array<int, 6> SEEPieceValues = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void InitLMRTable();
|
void InitLMRTable();
|
||||||
|
|
||||||
|
#ifdef TUNING
|
||||||
|
void InitSEEPieceValues();
|
||||||
|
void RefreshTunableCaches();
|
||||||
|
#endif
|
||||||
|
|
||||||
class SearchContext;
|
class SearchContext;
|
||||||
|
|
||||||
class CaptHistory {
|
class CaptHistory {
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ static void SetOption(std::string& command, SEARCH::SearchContext* ctx) {
|
|||||||
if (v < min_val) v = min_val; \
|
if (v < min_val) v = min_val; \
|
||||||
if (v > max_val) v = max_val; \
|
if (v > max_val) v = max_val; \
|
||||||
paramName = v; \
|
paramName = v; \
|
||||||
|
SEARCH::RefreshTunableCaches(); \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,6 +216,7 @@ static void SetOption(std::string& command, SEARCH::SearchContext* ctx) {
|
|||||||
if (v < min_val) v = min_val; \
|
if (v < min_val) v = min_val; \
|
||||||
if (v > max_val) v = max_val; \
|
if (v > max_val) v = max_val; \
|
||||||
paramName = v; \
|
paramName = v; \
|
||||||
|
SEARCH::RefreshTunableCaches(); \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user