mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 03:26:24 +08: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 {
|
||||
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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user