Skip to content

Commit

Permalink
ablation: no hybrid classical eval
Browse files Browse the repository at this point in the history
test r15
  • Loading branch information
dhbloo committed Jul 29, 2024
1 parent 49a8c22 commit b9e09c2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Rapfi/eval/eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,20 @@ Value evaluate(const Board &board, Value alpha, Value beta)

if (board.evaluator()) {
// Use evaluator eval if classical eval are in alpha-beta window margin
int margin = classicalEvalMargin(eval);
if (eval >= alpha - margin && eval <= beta + margin) {
ValueType v = board.evaluator()->evaluateValue(board);

// Adjust draw rate according to draw ratio and draw black win rate
if (Config::EvaluatorDrawRatio < 1.0) {
float newDrawRate = Config::EvaluatorDrawRatio * v.draw();
float drawWinRate = Config::EvaluatorDrawBlackWinRate;
drawWinRate = self == BLACK ? drawWinRate : 1.0f - drawWinRate;
v = v.valueOfDrawWinRate(drawWinRate, newDrawRate);
}

return v.value();
// int margin = classicalEvalMargin(eval);
// if (eval >= alpha - margin && eval <= beta + margin) {
ValueType v = board.evaluator()->evaluateValue(board);

// Adjust draw rate according to draw ratio and draw black win rate
if (Config::EvaluatorDrawRatio < 1.0) {
float newDrawRate = Config::EvaluatorDrawRatio * v.draw();
float drawWinRate = Config::EvaluatorDrawBlackWinRate;
drawWinRate = self == BLACK ? drawWinRate : 1.0f - drawWinRate;
v = v.valueOfDrawWinRate(drawWinRate, newDrawRate);
}

return v.value();
//}
}

return eval;
Expand Down

0 comments on commit b9e09c2

Please sign in to comment.