Remove conditional compilation on EVAL_LEARN

This commit is contained in:
Tomasz Sobczyk
2020-09-12 16:19:24 +02:00
parent 8d499e6efa
commit d33e7a9b07
32 changed files with 6 additions and 144 deletions

View File

@@ -1,5 +1,3 @@
#if defined(EVAL_LEARN)
#include "convert.h"
#include "multi_think.h"
@@ -606,4 +604,3 @@ namespace Learner
convert(args);
}
}
#endif

View File

@@ -5,7 +5,6 @@
#include <string>
#include <sstream>
#if defined(EVAL_LEARN)
namespace Learner {
void convert_bin_from_pgn_extract(
const std::vector<std::string>& filenames,
@@ -32,6 +31,5 @@ namespace Learner {
void convert(std::istringstream& is);
}
#endif
#endif

View File

@@ -1,6 +1,4 @@
#if defined(EVAL_LEARN)
#include "gensfen.h"
#include "gensfen.h"
#include "packed_sfen.h"
#include "multi_think.h"
@@ -1207,4 +1205,3 @@ namespace Learner
std::cout << "gensfen finished." << endl;
}
}
#endif

View File

@@ -5,12 +5,10 @@
#include <sstream>
#if defined(EVAL_LEARN)
namespace Learner {
// Automatic generation of teacher position
void gen_sfen(Position& pos, std::istringstream& is);
}
#endif
#endif

View File

@@ -17,8 +17,6 @@
// → I will not be involved in the engine because it is a problem that the GUI should assist.
// etc..
#if defined(EVAL_LEARN)
#include "learn.h"
#include "convert.h"
@@ -2048,5 +2046,3 @@ namespace Learner
}
} // namespace Learner
#endif // EVAL_LEARN

View File

@@ -1,8 +1,6 @@
#ifndef _LEARN_H_
#define _LEARN_H_
#if defined(EVAL_LEARN)
// ----------------------
// Floating point for learning
// ----------------------
@@ -78,6 +76,4 @@ namespace Learner
void learn(Position& pos, std::istringstream& is);
}
#endif
#endif // ifndef _LEARN_H_

View File

@@ -1,7 +1,5 @@
#include "learning_tools.h"
#if defined (EVAL_LEARN)
#include "misc.h"
using namespace Eval;
@@ -18,5 +16,3 @@ namespace EvalLearningTools
uint64_t Weight::eta1_epoch;
uint64_t Weight::eta2_epoch;
}
#endif

View File

@@ -3,8 +3,6 @@
// A set of machine learning tools related to the weight array used for machine learning of evaluation functions
#if defined (EVAL_LEARN)
#include "learn.h"
#include "misc.h" // PRNG , my_insertion_sort
@@ -98,5 +96,4 @@ namespace EvalLearningTools
};
}
#endif // defined (EVAL_LEARN)
#endif

View File

@@ -1,6 +1,4 @@
#if defined(EVAL_LEARN)
#include "multi_think.h"
#include "multi_think.h"
#include "tt.h"
#include "uci.h"
@@ -118,6 +116,3 @@ void MultiThink::go_think()
Options[s.first] = std::string(s.second);
}
#endif // defined(EVAL_LEARN)

View File

@@ -1,8 +1,6 @@
#ifndef _MULTI_THINK_
#define _MULTI_THINK_
#if defined(EVAL_LEARN)
#include "learn.h"
#include "misc.h"
@@ -151,6 +149,4 @@ protected:
std::mutex task_mutex;
};
#endif // defined(EVAL_LEARN) && defined(YANEURAOU_2018_OTAFUKU_ENGINE)
#endif

View File

@@ -4,7 +4,6 @@
#include <vector>
#include <cstdint>
#if defined(EVAL_LEARN)
namespace Learner {
// packed sfen
@@ -45,5 +44,3 @@ namespace Learner {
using PSVector = std::vector<PackedSfenValue>;
}
#endif
#endif

View File

@@ -1,6 +1,4 @@
#if defined (EVAL_LEARN)
#include "sfen_packer.h"
#include "sfen_packer.h"
#include "packed_sfen.h"
@@ -402,6 +400,3 @@ namespace Learner {
return sfen;
}
}
#endif // USE_SFEN_PACKER

View File

@@ -1,8 +1,6 @@
#ifndef _SFEN_PACKER_H_
#define _SFEN_PACKER_H_
#if defined(EVAL_LEARN)
#include "types.h"
#include "learn/packed_sfen.h"
@@ -19,6 +17,4 @@ namespace Learner {
PackedSfen sfen_pack(Position& pos);
}
#endif
#endif