// Code for calculating NNUE evaluation function
+#include <fstream>
+#include <iomanip>
#include <iostream>
#include <set>
#include <sstream>
-#include <iomanip>
-#include <fstream>
+#include <string_view>
#include "../evaluate.h"
#include "../position.h"
return (bool)stream;
}
+ void hint_common_parent_position(const Position& pos) {
+ featureTransformer->hint_common_access(pos);
+ }
+
// Evaluation function. Perform differential calculation.
Value evaluate(const Position& pos, bool adjusted, int* complexity) {
// overaligning stack variables with alignas() doesn't work correctly.
constexpr uint64_t alignment = CacheLineSize;
- int delta = 24 - pos.non_pawn_material() / 9560;
+ constexpr int delta = 24;
#if defined(ALIGNAS_ON_STACK_VARIABLES_BROKEN)
TransformedFeatureType transformedFeaturesUnaligned[
return t;
}
- static const std::string PieceToChar(" PNBRQK pnbrqk");
+ constexpr std::string_view PieceToChar(" PNBRQK pnbrqk");
// format_cp_compact() converts a Value into (centi)pawns and writes it in a buffer.