learn -> tools

This commit is contained in:
Tomasz Sobczyk
2021-04-18 19:18:41 +02:00
parent 8169de72e2
commit 696e849a30
24 changed files with 64 additions and 64 deletions

View File

@@ -30,8 +30,8 @@
#include "nnue/nnue_accumulator.h"
#include "learn/packed_sfen.h"
#include "learn/sfen_packer.h"
#include "tools/packed_sfen.h"
#include "tools/sfen_packer.h"
/// StateInfo struct stores information needed to restore a Position object to
@@ -179,17 +179,17 @@ public:
// --sfenization helper
friend int Learner::set_from_packed_sfen(Position& pos, const Learner::PackedSfen& sfen, StateInfo* si, Thread* th);
friend int Tools::set_from_packed_sfen(Position& pos, const Tools::PackedSfen& sfen, StateInfo* si, Thread* th);
// Get the packed sfen. Returns to the buffer specified in the argument.
// Do not include gamePly in pack.
void sfen_pack(Learner::PackedSfen& sfen);
void sfen_pack(Tools::PackedSfen& sfen);
// It is slow to go through sfen, so I made a function to set packed sfen directly.
// Equivalent to pos.set(sfen_unpack(data),si,th);.
// If there is a problem with the passed phase and there is an error, non-zero is returned.
// PackedSfen does not include gamePly so it cannot be restored. If you want to set it, specify it with an argument.
int set_from_packed_sfen(const Learner::PackedSfen& sfen, StateInfo* si, Thread* th);
int set_from_packed_sfen(const Tools::PackedSfen& sfen, StateInfo* si, Thread* th);
void clear() { std::memset(this, 0, sizeof(Position)); }