Skip to content

Luna CE v3.1.1

Choose a tag to compare

@Spunc595 Spunc595 released this 05 Sep 11:52
· 3 commits to main since this release

Bug-fix release, based on an independent code review.

Fixed: mate scores stored in the transposition table weren't adjusted for
search depth (ply), which could make the engine miscalculate or stall on a mate
it had already found, once the same position recurred via a transposition.
Fixed using the standard technique other engines use for this
(value_to_tt/value_from_tt), with a regression test covering a mate score
stored at one ply and probed from another.

Fixed: UCI output always reported mate scores as an absurd centipawn value
(e.g. score cp 48999) instead of the standard score mate N — a GUI would
show "+489.99" instead of "#1".

Removed: a flawed "progress adjustment" heuristic (passed-pawn bonus + king
mop-up + 50-move-rule decay, stacked onto every evaluation), added earlier to
fix conversion issues in won endgames. It measured as a large net loss, likely
because the real cause of those conversion issues was the mate-score bug above,
not a weakness in the NNUE. Removed entirely rather than re-tuned; a properly
phase-guarded, non-discontinuous version would be a new experiment, not a
revival of this one.

SPRT: -96.6 ±35.5 Elo, LOS 100%, H1 accepted after 380 games (233-130-17)
with the heuristic left in place.

Removing it also made the engine measurably faster: the heuristic rescanned
every pawn on the board on each eval() call, i.e. at every quiescence node.
On a middlegame test position, single-threaded, this is worth roughly 40-50%
more nodes per second — one extra ply of search depth in the same time. Part of
the Elo gain above is this speedup, not evaluation quality alone.

All fixes are covered by the test suite and verified against perft (unchanged).
The removal of the progress-adjustment heuristic was validated by the SPRT
above; the other two are correctness fixes — the UCI one changes reported
output only, with no effect on playing strength.