Nnue test #48
No files matched your search
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user