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