Skip to content

Commit 8cbaf3a

Browse files
authored
2.9-dev-3: nnue scale eval based on material (#193)
Network: ign-0-9b1937cc http://chess.grantnet.us/test/9064/ ELO | 8.64 +- 5.52 (95%) SPRT | 10.0+0.1s Threads=1 Hash=8MB LLR | 3.00 (-2.94, 2.94) [0.00, 5.00] Games | N: 6716 W: 1569 L: 1402 D: 3745 http://chess.grantnet.us/test/9065/ ELO | 7.33 +- 4.45 (95%) SPRT | 60.0+0.6s Threads=1 Hash=64MB LLR | 2.97 (-2.94, 2.94) [0.00, 5.00] Games | N: 6924 W: 1099 L: 953 D: 4872
1 parent 6aeaf82 commit 8cbaf3a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/evaluate.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ EVAL Evaluator::evaluate(Position & pos)
133133
PawnHashEntry* ps;
134134
U64 occ;
135135
#if defined(EVAL_NNUE)
136-
EVAL nnueEval;
136+
EVAL nnueEval,
137+
pawns,
138+
material;
137139
#endif
138140

139141
auto score = pos.Score();
@@ -147,7 +149,9 @@ EVAL Evaluator::evaluate(Position & pos)
147149

148150
#if defined(EVAL_NNUE)
149151
nnueEval = static_cast<EVAL>(Eval::NNUE::evaluate(pos));
150-
return nnueEval + Tempo;
152+
pawns = pos.Count(PAWN | WHITE) + pos.Count(PAWN | BLACK);
153+
material = pos.nonPawnMaterial() + (pawns * VAL_P);
154+
return nnueEval * (600 + material / 32) / 1024 + Tempo;
151155
#endif
152156

153157
memset(m_pieceAttacks, 0, sizeof(m_pieceAttacks));

src/uci.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <iostream>
3232
#include <sstream>
3333

34-
const std::string VERSION = "2.9-dev-2";
34+
const std::string VERSION = "2.9-dev-3";
3535

3636
#if defined(ENV64BIT)
3737
#if defined(_BTYPE)

0 commit comments

Comments
 (0)