Revert some unwanted changes from merge conflict resolution.

This commit is contained in:
Tomasz Sobczyk
2020-09-24 21:10:10 +02:00
parent 56f1a2fe49
commit 9f3de8b40e
3 changed files with 15 additions and 20 deletions

View File

@@ -42,7 +42,7 @@ namespace Eval {
// The default net name MUST follow the format nn-[SHA256 first 12 digits].nnue
// for the build process (profile-build and fishtest) to work. Do not change the
// name of the macro, as it is used in the Makefile.
#define EvalFileDefaultName "nn.bin"
#define EvalFileDefaultName "nn-03744f8d56d8.nnue"
namespace NNUE {

View File

@@ -47,7 +47,6 @@ namespace Learner
static bool detect_draw_by_consecutive_low_score = false;
static bool detect_draw_by_insufficient_mating_material = false;
static std::vector<std::string> bookStart;
static SfenOutputType sfen_output_type = SfenOutputType::Bin;
static bool ends_with(const std::string& lhs, const std::string& end)
@@ -817,7 +816,7 @@ namespace Learner
auto th = Threads[thread_id];
auto& pos = th->rootPos;
pos.set(bookStart[prng.rand(bookStart.size())], false, &si, th);
pos.set(StartFEN, false, &si, th);
int resign_counter = 0;
bool should_resign = prng.rand(10) > 1;
@@ -1127,28 +1126,12 @@ namespace Learner
output_file_name = output_file_name + "_" + to_hex(r.rand<uint64_t>()) + to_hex(r.rand<uint64_t>());
}
bookStart.clear();
{
std::string line;
std::ifstream myfile ("3moves_v2.epd");
if (myfile.is_open())
{
while (getline(myfile,line))
{
bookStart.push_back(line);
}
myfile.close();
} else {
bookStart.push_back(StartFEN);
}
}
std::cout << "gensfen : " << endl
<< " search_depth_min = " << search_depth_min << " to " << search_depth_max << endl
<< " nodes = " << nodes << endl
<< " loop_max = " << loop_max << endl
<< " eval_limit = " << eval_limit << endl
<< " thread_num = " << thread_num << endl
<< " bookStart = " << bookStart.size() << endl
<< " thread_num (set by USI setoption) = " << thread_num << endl
<< " random_move_minply = " << random_move_minply << endl
<< " random_move_maxply = " << random_move_maxply << endl
<< " random_move_count = " << random_move_count << endl

View File

@@ -408,11 +408,23 @@ static void* aligned_large_pages_alloc_win(size_t allocSize) {
void* aligned_large_pages_alloc(size_t allocSize) {
static bool firstCall = true;
void* mem;
// Try to allocate large pages
mem = aligned_large_pages_alloc_win(allocSize);
// Suppress info strings on the first call. The first call occurs before 'uci'
// is received and in that case this output confuses some GUIs.
if (!firstCall)
{
if (mem)
sync_cout << "info string Hash table allocation: Windows large pages used." << sync_endl;
else
sync_cout << "info string Hash table allocation: Windows large pages not used." << sync_endl;
}
firstCall = false;
// Fall back to regular, page aligned, allocation if necessary
if (!mem)
mem = VirtualAlloc(NULL, allocSize, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);