Add more information for factorizers at the start of training.

This commit is contained in:
Tomasz Sobczyk
2020-11-13 11:14:19 +01:00
committed by nodchip
parent 4e1653d53a
commit 691da3bdad
4 changed files with 10 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ namespace Eval::NNUE::Features {
class Factorizer {
public:
static constexpr std::string get_name() {
return std::string("No factorizer");
return "Factorizer<" + FeatureType::get_name() + "> -> " + std::string("No factorizer");
}
static constexpr std::string get_factorizers_string() {

View File

@@ -82,7 +82,7 @@ namespace Eval::NNUE::Features {
static constexpr IndexType kBaseDimensions = FeatureType::kDimensions;
static constexpr std::string get_name() {
return FeatureType::kName;
return Factorizer<FeatureType>::get_name();
}
static constexpr std::string get_factorizers_string() {

View File

@@ -31,11 +31,11 @@ namespace Eval::NNUE::Features {
// Learning feature information
static constexpr FeatureProperties kProperties[] = {
// kFeaturesHalfKPK
// kFeaturesHalfA
{true, FeatureType::kDimensions},
// kFeaturesPK
// kFeaturesA
{true, Factorizer<A>::get_dimensions()},
// kFeaturesHalfRelativeKPK
// kFeaturesHalfRelativeKA
{true, Factorizer<HalfRelativeKA<AssociatedKing>>::get_dimensions()},
};
@@ -43,7 +43,7 @@ namespace Eval::NNUE::Features {
public:
static constexpr std::string get_name() {
return std::string("Factorizer<") + FeatureType::kName + ">";
return std::string("Factorizer<") + FeatureType::kName + "> -> " + "A, HalfRelativeKA";
}
static constexpr std::string get_factorizers_string() {
@@ -59,18 +59,18 @@ namespace Eval::NNUE::Features {
static void append_training_features(
IndexType base_index, std::vector<TrainingFeature>* training_features) {
// kFeaturesHalfKPK
// kFeaturesHalfA
IndexType index_offset = append_base_feature<FeatureType>(
kProperties[kFeaturesHalfKA], base_index, training_features);
const auto sq_k = static_cast<Square>(base_index / PS_END2);
const auto a = static_cast<IndexType>(base_index % PS_END2);
// kFeaturesPK
// kFeaturesA
index_offset += inherit_features_if_required<A>(
index_offset, kProperties[kFeaturesA], a, training_features);
// kFeaturesHalfRelativeKPK
// kFeaturesHalfRelativeKA
if (a >= PS_W_PAWN) {
index_offset += inherit_features_if_required<HalfRelativeKA<AssociatedKing>>(
index_offset, kProperties[kFeaturesHalfRelativeKA],

View File

@@ -46,7 +46,7 @@ namespace Eval::NNUE::Features {
public:
static constexpr std::string get_name() {
return std::string("Factorizer<") + FeatureType::kName + ">";
return std::string("Factorizer<") + FeatureType::kName + "> -> " + "HalfK, P, HalfRelativeKP";
}
static constexpr std::string get_factorizers_string() {