retire the no-smoothing variant#100
Merged
Merged
Conversation
Generating a leave table has come in two flavors: english-generate,
which lets a thinly-sampled leave borrow its value from its
one-tile-swap neighbors, and english-generate-no-smooth, which uses
the observed averages as they stand. Measuring them left the second
with nothing it is good at.
Smoothing either wins outright or does nothing whatsoever, and never
costs. Sweeping the game count, each table played its unsmoothed twin
over a million game pairs:
games smoothed won confidence
50000 89% 51.6144 100%
200000 76% 50.3209 100%
1000000 52% 50.0328 82%
5000000 26% 50.0010 51%
20000000 0% identical file
Five rows, every one on the same side of 50, not one below. The last
two carry the argument: at 5000000 games a quarter of the table is
still smoothed and plays dead level, so smoothing the thin tail is
free even while it fires -- not merely harmless once it stops. At
20000000 nothing is thin, so the two wrote a byte-identical klv2.
So there was never a run that wanted the unsmoothed table: on a big
one it handed back the same file, on a small one a worse one. And
"no smoothing" was never quite truthful -- a leave no game ever dealt
has no average to report, so a value had to be invented either way.
A knob whose every setting is identical or worse is not a choice, it
is a way to make a mistake.
Remove english-generate-no-smooth and english-generate-full-no-smooth
outright rather than keep them as aliases, since an alias would
preserve exactly the mistake. That collapses generate_leaves' const
DO_SMOOTHING, which every branch it guarded now takes unconditionally.
genleaves.sh loses --smooth / --no-smooth, and with them the rule that
asking for a per-generation min-samples count silently turned
smoothing off -- a coupling with no reason behind it. Its output is
plain leaves<N>, and leaves-smooth<N> leaves the resume scan too:
with one kind of table there is no kind to name, and a half-finished
run directory from before can be renamed.
What remains is the question worth asking -- which leaves count as
too thin -- and its knobs stay: WOLGES_GENERATE_SMOOTH_MIN and
WOLGES_GENERATE_SMOOTH_CI. A floor of 0 keeps every measured average
however thin it is, which is the nearest thing to the retired
variant -- but measurably not the same table. no-smooth reports 0
smoothed and 397964 filled in; a floor of 0 reports 391705 smoothed
and 6259 filled in, and 399749 rows differ. They part company over
the racks no game dealt: both invent a value, one borrowing from the
neighbors one tile swapped, the other averaging the subracks one
tile shorter. "No smoothing" never meant no invented values -- there
is no such option, which is much of why it is going.
Callers break by design. english-generate's output is unchanged --
byte-identical before and after, with and without an interval -- so
only the removed names move.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Generating a leave table came in two flavors:
english-generate, which lets a thinlysampled leave borrow from its neighbors, and
english-generate-no-smooth, which uses theobserved averages as they stand. Measuring them left the second with nothing it is good at,
so it goes.
Changes
english-generate-no-smoothandenglish-generate-full-no-smooth, which collapsesthe
DO_SMOOTHINGconst generic -- every branch it guarded is now unconditional.genleaves.sh's--smooth/--no-smooth, and with them the rule that asking fora per-generation min-samples count silently turned smoothing off.
genleaves.shwrites plainleaves<N>;leaves-smooth<N>is gone.Callers break by design; a half-finished run directory can be renamed.
Correctness
Smoothing either wins outright or does nothing, and never costs -- see the sweep in the
smoothing PR: five game counts, every one at or above 50, none below. At 5,000,000 games a
quarter of the table is still smoothed and plays dead level, so smoothing the thin tail is
free even while it fires. At 20,000,000 the two commands wrote a byte-identical file.
"No smoothing" never meant no invented values: a leave no game dealt has nothing to report,
and the retired variant invented 397964 of them by another route. There is no such option,
so the flag only offered a way to pick the worse one.
english-generate's output is byte-identical before and after, with and without aninterval -- only the removed names move.
Test plan
english-generatebyte-identical across the removal, with and without an interval.english-generate-no-smoothnow exits with an invalid-argument error.