mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 14:27:45 +00:00
Add more information for factorizers at the start of training.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Eval::NNUE::Features {
|
|||||||
class Factorizer {
|
class Factorizer {
|
||||||
public:
|
public:
|
||||||
static constexpr std::string get_name() {
|
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() {
|
static constexpr std::string get_factorizers_string() {
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace Eval::NNUE::Features {
|
|||||||
static constexpr IndexType kBaseDimensions = FeatureType::kDimensions;
|
static constexpr IndexType kBaseDimensions = FeatureType::kDimensions;
|
||||||
|
|
||||||
static constexpr std::string get_name() {
|
static constexpr std::string get_name() {
|
||||||
return FeatureType::kName;
|
return Factorizer<FeatureType>::get_name();
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr std::string get_factorizers_string() {
|
static constexpr std::string get_factorizers_string() {
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ namespace Eval::NNUE::Features {
|
|||||||
|
|
||||||
// Learning feature information
|
// Learning feature information
|
||||||
static constexpr FeatureProperties kProperties[] = {
|
static constexpr FeatureProperties kProperties[] = {
|
||||||
// kFeaturesHalfKPK
|
// kFeaturesHalfA
|
||||||
{true, FeatureType::kDimensions},
|
{true, FeatureType::kDimensions},
|
||||||
// kFeaturesPK
|
// kFeaturesA
|
||||||
{true, Factorizer<A>::get_dimensions()},
|
{true, Factorizer<A>::get_dimensions()},
|
||||||
// kFeaturesHalfRelativeKPK
|
// kFeaturesHalfRelativeKA
|
||||||
{true, Factorizer<HalfRelativeKA<AssociatedKing>>::get_dimensions()},
|
{true, Factorizer<HalfRelativeKA<AssociatedKing>>::get_dimensions()},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ namespace Eval::NNUE::Features {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static constexpr std::string get_name() {
|
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() {
|
static constexpr std::string get_factorizers_string() {
|
||||||
@@ -59,18 +59,18 @@ namespace Eval::NNUE::Features {
|
|||||||
static void append_training_features(
|
static void append_training_features(
|
||||||
IndexType base_index, std::vector<TrainingFeature>* training_features) {
|
IndexType base_index, std::vector<TrainingFeature>* training_features) {
|
||||||
|
|
||||||
// kFeaturesHalfKPK
|
// kFeaturesHalfA
|
||||||
IndexType index_offset = append_base_feature<FeatureType>(
|
IndexType index_offset = append_base_feature<FeatureType>(
|
||||||
kProperties[kFeaturesHalfKA], base_index, training_features);
|
kProperties[kFeaturesHalfKA], base_index, training_features);
|
||||||
|
|
||||||
const auto sq_k = static_cast<Square>(base_index / PS_END2);
|
const auto sq_k = static_cast<Square>(base_index / PS_END2);
|
||||||
const auto a = static_cast<IndexType>(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 += inherit_features_if_required<A>(
|
||||||
index_offset, kProperties[kFeaturesA], a, training_features);
|
index_offset, kProperties[kFeaturesA], a, training_features);
|
||||||
|
|
||||||
// kFeaturesHalfRelativeKPK
|
// kFeaturesHalfRelativeKA
|
||||||
if (a >= PS_W_PAWN) {
|
if (a >= PS_W_PAWN) {
|
||||||
index_offset += inherit_features_if_required<HalfRelativeKA<AssociatedKing>>(
|
index_offset += inherit_features_if_required<HalfRelativeKA<AssociatedKing>>(
|
||||||
index_offset, kProperties[kFeaturesHalfRelativeKA],
|
index_offset, kProperties[kFeaturesHalfRelativeKA],
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace Eval::NNUE::Features {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static constexpr std::string get_name() {
|
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() {
|
static constexpr std::string get_factorizers_string() {
|
||||||
|
|||||||
Reference in New Issue
Block a user