Skip to content

Commit d81e01a

Browse files
committed
Fix FoW unit harness includes and evaluator usage
1 parent b6ea0ff commit d81e01a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/imperfect/tests/fow_unit_tests.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include "../Selection.h"
1515
#include "../Subgame.h"
1616
#include "../Visibility.h"
17-
#include "../planner.h"
18-
#include "../uci.h"
17+
#include "../Planner.h"
18+
#include "../../uci.h"
1919
#include "../../movegen.h"
2020
#include "../../position.h"
2121
#include "../../thread.h"
@@ -198,13 +198,13 @@ TestSuiteResult run_benchmark_suite() {
198198
TestSuiteResult suite{"benchmarks"};
199199

200200
Position pos = make_position("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
201-
StateInfo st;
202-
pos.set(chess_variant(), pos.fen(), false, &st, nullptr);
201+
ObservationHistory history = seed_observation_history(pos);
202+
BeliefState belief;
203+
belief.rebuild_from_observations(history, pos);
203204

204205
// quick one-ply evaluations for FoW vs baseline consistency
205-
Eval::Evaluator evaluator;
206-
float baseline = evaluator.evaluate(pos);
207-
float fowLeaf = evaluator.evaluate_belief_state({pos.fen()}, pos.variant());
206+
float baseline = evaluate(pos);
207+
float fowLeaf = evaluate_belief_state(belief, pos.variant());
208208

209209
suite.cases.push_back({"benchmark: evaluator parity", std::abs(baseline - fowLeaf) < 1.5f, "baseline=" + std::to_string(baseline)});
210210
return suite;

0 commit comments

Comments
 (0)