Add src to include paths, remove non-standard ".." in includes in learn directory.

This commit is contained in:
Tomasz Sobczyk
2020-09-11 12:23:29 +02:00
committed by nodchip
parent 3c87d4fa9b
commit 98f24570ab
11 changed files with 64 additions and 54 deletions
+1 -1
View File
@@ -321,7 +321,7 @@ endif
### ========================================================================== ### ==========================================================================
### 3.1 Selecting compiler (default = gcc) ### 3.1 Selecting compiler (default = gcc)
CXXFLAGS += -g -Wall -Wcast-qual -fno-exceptions -std=c++17 $(EXTRACXXFLAGS) $(LEARNCXXFLAGS) CXXFLAGS += -g -Wall -Wcast-qual -fno-exceptions -std=c++17 -I. $(EXTRACXXFLAGS) $(LEARNCXXFLAGS)
DEPENDFLAGS += -std=c++17 DEPENDFLAGS += -std=c++17
LDFLAGS += $(EXTRALDFLAGS) $(LEARNLDFLAGS) LDFLAGS += $(EXTRALDFLAGS) $(LEARNLDFLAGS)
+12 -10
View File
@@ -2,18 +2,20 @@
#include "convert.h" #include "convert.h"
// evaluate header for learning
#include "../eval/evaluate_common.h"
#include "multi_think.h" #include "multi_think.h"
#include "../uci.h"
#include "../syzygy/tbprobe.h"
#include "../misc.h"
#include "../thread.h"
#include "../position.h"
#include "../tt.h"
#include "../extra/nnue_data_binpack_format.h" #include "uci.h"
#include "misc.h"
#include "thread.h"
#include "position.h"
#include "tt.h"
// evaluate header for learning
#include "eval/evaluate_common.h"
#include "extra/nnue_data_binpack_format.h"
#include "syzygy/tbprobe.h"
#include <sstream> #include <sstream>
#include <fstream> #include <fstream>
+14 -10
View File
@@ -1,19 +1,23 @@
#if defined(EVAL_LEARN) #if defined(EVAL_LEARN)
#include "gensfen.h" #include "gensfen.h"
#include "packed_sfen.h"
#include "../eval/evaluate_common.h" #include "packed_sfen.h"
#include "../misc.h"
#include "../nnue/evaluate_nnue_learner.h"
#include "../position.h"
#include "../syzygy/tbprobe.h"
#include "../thread.h"
#include "../tt.h"
#include "../uci.h"
#include "multi_think.h" #include "multi_think.h"
#include "../extra/nnue_data_binpack_format.h" #include "misc.h"
#include "position.h"
#include "thread.h"
#include "tt.h"
#include "uci.h"
#include "eval/evaluate_common.h"
#include "extra/nnue_data_binpack_format.h"
#include "nnue/evaluate_nnue_learner.h"
#include "syzygy/tbprobe.h"
#include <chrono> #include <chrono>
#include <climits> #include <climits>
+2 -2
View File
@@ -1,9 +1,9 @@
#ifndef _GENSFEN_H_ #ifndef _GENSFEN_H_
#define _GENSFEN_H_ #define _GENSFEN_H_
#include <sstream> #include "position.h"
#include "../position.h" #include <sstream>
#if defined(EVAL_LEARN) #if defined(EVAL_LEARN)
namespace Learner { namespace Learner {
+1 -1
View File
@@ -7,7 +7,7 @@
// Floating point operation by 16bit type // Floating point operation by 16bit type
// Assume that the float type code generated by the compiler is in IEEE 754 format and use it. // Assume that the float type code generated by the compiler is in IEEE 754 format and use it.
#include "../types.h" #include "types.h"
namespace HalfFloat namespace HalfFloat
{ {
+15 -11
View File
@@ -20,20 +20,24 @@
#if defined(EVAL_LEARN) #if defined(EVAL_LEARN)
#include "learn.h" #include "learn.h"
#include "convert.h"
#include "../eval/evaluate_common.h" #include "convert.h"
#include "../misc.h"
#include "../nnue/evaluate_nnue_learner.h"
#include "../position.h"
#include "../syzygy/tbprobe.h"
#include "../thread.h"
#include "../tt.h"
#include "../uci.h"
#include "../search.h"
#include "multi_think.h" #include "multi_think.h"
#include "../extra/nnue_data_binpack_format.h" #include "misc.h"
#include "position.h"
#include "thread.h"
#include "tt.h"
#include "uci.h"
#include "search.h"
#include "eval/evaluate_common.h"
#include "extra/nnue_data_binpack_format.h"
#include "nnue/evaluate_nnue_learner.h"
#include "syzygy/tbprobe.h"
#include <chrono> #include <chrono>
#include <climits> #include <climits>
+2 -3
View File
@@ -3,8 +3,6 @@
#if defined(EVAL_LEARN) #if defined(EVAL_LEARN)
#include <vector>
// ---------------------- // ----------------------
// Floating point for learning // Floating point for learning
// ---------------------- // ----------------------
@@ -39,9 +37,10 @@ using LearnFloatType = float;
#include "packed_sfen.h" #include "packed_sfen.h"
#include "../position.h" #include "position.h"
#include <sstream> #include <sstream>
#include <vector>
namespace Learner namespace Learner
{ {
+1 -1
View File
@@ -2,7 +2,7 @@
#if defined (EVAL_LEARN) #if defined (EVAL_LEARN)
#include "../misc.h" #include "misc.h"
using namespace Eval; using namespace Eval;
+3 -3
View File
@@ -3,11 +3,11 @@
// A set of machine learning tools related to the weight array used for machine learning of evaluation functions // A set of machine learning tools related to the weight array used for machine learning of evaluation functions
#include "learn.h"
#if defined (EVAL_LEARN) #if defined (EVAL_LEARN)
#include "../misc.h" // PRNG , my_insertion_sort #include "learn.h"
#include "misc.h" // PRNG , my_insertion_sort
#include <array> #include <array>
#include <cmath> // std::sqrt() #include <cmath> // std::sqrt()
+7 -7
View File
@@ -1,10 +1,10 @@
#include "../types.h" #if defined(EVAL_LEARN)
#if defined(EVAL_LEARN)
#include "multi_think.h" #include "multi_think.h"
#include "../tt.h"
#include "../uci.h" #include "tt.h"
#include "uci.h"
#include "types.h"
#include <thread> #include <thread>
@@ -35,13 +35,13 @@ void MultiThink::go_think()
// Secure end flag of worker thread // Secure end flag of worker thread
thread_finished.resize(thread_num); thread_finished.resize(thread_num);
// start worker thread // start worker thread
for (size_t i = 0; i < thread_num; ++i) for (size_t i = 0; i < thread_num; ++i)
{ {
thread_finished[i] = 0; thread_finished[i] = 0;
threads.push_back(std::thread([i, this] threads.push_back(std::thread([i, this]
{ {
// exhaust all processor threads. // exhaust all processor threads.
WinProcGroup::bindThisThread(i); WinProcGroup::bindThisThread(i);
+6 -5
View File
@@ -3,15 +3,16 @@
#if defined(EVAL_LEARN) #if defined(EVAL_LEARN)
#include <functional> #include "learn.h"
#include <mutex>
#include "../misc.h" #include "misc.h"
#include "../learn/learn.h" #include "thread_win32_osx.h"
#include "../thread_win32_osx.h"
#include <atomic> #include <atomic>
#include <limits> #include <limits>
#include <functional>
#include <mutex>
// Learning from a game record, when making yourself think and generating a fixed track, etc. // Learning from a game record, when making yourself think and generating a fixed track, etc.
// Helper class used when multiple threads want to call Search::think() individually. // Helper class used when multiple threads want to call Search::think() individually.