disable material scaling in datagen
bench: 1181803
This commit is contained in:
1 parent
4c4e6d15c8
commit
0f849c1b7f
2 files changed
+6
-5
No files matched your search
+3
-2
@@ -187,8 +187,9 @@ int Forward(const Board& board, const Network& net) {
|
||||
return (eval * SCALE) / (QA * QB);
|
||||
}
|
||||
|
||||
int16_t Network::Evaluate(const Board& board) {
|
||||
const int materialScale = 2048
|
||||
int16_t Network::Evaluate(const Board& board, bool datagen) {
|
||||
// Disabled in datagen
|
||||
const int materialScale = datagen ? 4096 : 2048
|
||||
+ 90 * board.pieces[Knight].PopCount()
|
||||
+ 90 * board.pieces[Bishop].PopCount()
|
||||
+ 180 * board.pieces[Rook].PopCount()
|
||||
|
||||
+3
-3
@@ -33,7 +33,7 @@ constexpr int kingBuckets[2][64] = {
|
||||
3, 3, 3, 3, 3, 3, 3, 3,
|
||||
3, 3, 3, 3, 3, 3, 3, 3
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
3, 3, 3, 3, 3, 3, 3, 3,
|
||||
3, 3, 3, 3, 3, 3, 3, 3,
|
||||
@@ -45,7 +45,7 @@ constexpr int kingBuckets[2][64] = {
|
||||
0, 0, 1, 1, 1, 1, 0, 0
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct Network {
|
||||
alignas(ALIGNMENT) std::array<std::array<int16_t, HL_SIZE * INPUT_SIZE>, INPUT_BUCKETS> accumulator_weights;
|
||||
alignas(ALIGNMENT) std::array<int16_t, HL_SIZE> accumulator_biases;
|
||||
@@ -54,7 +54,7 @@ struct Network {
|
||||
|
||||
void Load(const std::string& path);
|
||||
|
||||
int16_t Evaluate(const Board& board);
|
||||
int16_t Evaluate(const Board& board, bool datagen = false);
|
||||
};
|
||||
|
||||
inline Network net;
|
||||
|
||||
Reference in new issue
Block a user