Repository navigation
feat(course): add Final Analytics Epilogue - #72
Merged
Merged
Conversation
Mandatory epilogue after Level 7 closing the "is the game balanced?" question Level 1 opened: NumPy on a deep-dive battle log, Pandas on a multi-run tournament history, both generated by really running Level 7 Project 03's BattleService (no combat-rule reimplementation) — verified byte-for-byte reproducible across clean regenerations. Checker reuses the Data Recall Checkpoint's dual-fixture, independent- ground-truth pattern, extended with technique gates for NumPy reductions/ percentile-or-quantile/boolean-mask-work/2D-axis-aggregation and for pandas groupby across the three grouping functions — each accepting multiple equivalent idioms. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Registers the Final Analytics Epilogue as the mandatory last step after Level 7: root README and COURSE_MAP.md document it, author_check.py verifies its structure/fixtures/doc-coverage, and course_status.py tracks it with the same print_checkpoint() mechanism as the Data Recall Checkpoint — "course complete" no longer shows until the epilogue is also done. Levels 1-7 and the Data Recall Checkpoint are untouched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Implements the last integration piece of the NumPy/Pandas plan: a mandatory Final Analytics Epilogue after Level 7 (not an eighth level) that closes the "is the game balanced?" question Level 1 opened. Student uses NumPy a third time on a deep-dive battle log, and Pandas a third time on a multi-run tournament history — both generated by really running Level 7 Project 03's
BattleService.Levels 1-7 and the Data Recall Checkpoint are untouched (
git diff --statagainst the merge base is empty for all of them).Key findings from verifying the real L7 contract
rpg.domain/rpg.services/rpg.repositoriesinlevel_7.../projects/03_concurrent_tournament_runner/are fully complete and importable (only the API router layer has student TODOs) — used directly, no reimplementation.BattleService.simulate()calls the stdlibrandommodule's global functions (random.randint(...)), not an injected RNG — confirmed empirically thatrandom.seed(n)before a sequence of calls makes it exactly reproducible with zero changes to frozen code.randint(1,6)noise to ever flip an outcome — confirmed via both margin analysis and 150-trial-per-matchup empirical testing with zero flips). This makes per-class/per-monster win rates seed-invariant. The variant fixture therefore uses a genuinely different (but equally real, still fully simulated) tournament run-allocation — not a different seed alone — to produce differentwin_rate_by_classvalues and a differentmost_balanced_classanswer. Full details and honest reporting of which conclusions are structurally invariant (hardest_monster,rank_monsters,unfavorable_matchups) vs. which genuinely change are in the task's final report.What's added
final_analytics_epilogue/{README.md, task.py, check.py, data/*.{json,csv}, scripts/generate_fixtures.py}load_battle_arrays,deep_dive_stats,battle_matrix_summary), 5 Pandas (load_tournament_history,win_rate_by_class,rank_monsters,unfavorable_matchups,balance_conclusions), 1 synthesis (build_final_report)json/csv/statistics/mathonly) plus technique gates: AST-based for NumPy reductions/boolean-mask-work/2D-axis-construction (percentile/quantile via runtime spy, following the Data Recall Checkpoint precedent) and for pandasgroupbyacross the three grouping functions.generate_fixtures.pyis an author-only provenance tool; verified byte-for-byte reproducible across two independent clean regenerations.tools/course_status.py(new mandatory checkpoint tracked via the existingprint_checkpoint()helper — course no longer reports "complete" until the epilogue is also done),tools/author_check.py(newcheck_epilogue()+ doc-coverage registration).Test plan
np.asarray/np.quantile/np.count_nonzero/np.stack/.query/named.agg/different helper names) → PASS.unique()loop) → FAIL technique gate specifically (isolated from tie-break order)build_final_reportignores input, returns primary's answer) → PASS primary, FAIL varianttools/author_check.py→ 750 checks passed, 0 errorstools/course_status.py→ epilogue tracked, "course complete" gated correctly (verified via temporary.progresssimulation, cleaned up after)git diff --statagainst merge base empty).progress/cache/temp generator output in the working tree🤖 Generated with Claude Code