Nnue test #48

Merged
rektdie merged 14 commits from nnue_test into main 2025-04-09 03:23:41 +02:00
3 changed files with 13 additions and 1 deletions
Showing only changes of commit d72a0c341e - Show all commits

No files matched your search

+2
View File
@@ -156,6 +156,8 @@ void Board::PrintNNUE() {
}
std::cout << std::endl;
std::cout << "Final eval: " << NNUE::net.Evaluate(*this) << std::endl;
}
void Board::AddMove(Move move) {
+7 -1
View File
@@ -1,10 +1,12 @@
#include <immintrin.h>
#include <fstream>
#include <algorithm>
#include "nnue.h"
#include "accumulator.h"
#include "board.h"
#include "types.h"
#include "search.h"
namespace NNUE {
@@ -72,5 +74,9 @@ static int32_t Forward(const Board& board,
return (eval * SCALE) / (QA * QB);
}
int16_t Network::Evaluate(const Board& board) {
return Forward(board, this);
}
}
+4
View File
@@ -3,6 +3,8 @@
#include <string>
#include <array>
class Board;
namespace NNUE {
constexpr int INPUT_SIZE = 768;
@@ -19,6 +21,8 @@ struct Network {
int16_t output_bias;
void Load(const std::string& path);
int16_t Evaluate(const Board& board);
};
inline Network net;