navmesh_cell_fit: measure the baseline across all sampled control tiles #2446
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2446"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-27T10:17:10Z.
Claimed in the coordination issue as: NAVMESH-CONTROL-FULL-BASELINE
What and why
The reported fit count covered every sampled static tile, while its chance baseline only covered the first twenty. Compute the mean over all measurable sampled tiles, weighted by how often each horizontal extent occurs. Cache the expensive per-axis calculations and exclude tiles without a measurable axis from the mean. A regression changes the extent after tile twenty and checks the weighted result, reversed input order and the all-flat case.
Tested
Windows, Python 3.14.7, synthetic fixtures.
python -I tests/test_navmesh_cell_fit.pygit diff --checkpassed.GPUs tested: N/A (CPU-only).
AI-assisted: Yes.
Checklist
Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-27T15:07:40Z.
Review: COMMENTED
Verified on the PR branch: python3 -m unittest tests.test_navmesh_cell_fit -v -> 5 tests OK, including the new documented-baseline cases. Not approving yet: the branch is 606 commits behind current main, so a rebase is needed before reviewing the final diff.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T03:13:41Z.
#2446 | head
aaabf497be(merged cleanly with main02f71ccfe) |python -I tests/test_navmesh_cell_fit.py| red on main: FAILED (failures=1) in 5 tests (baseline_mean0.25 vs expected 0.2619) | green on PR+main: Ran 5 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yesDiff reviewed across both touched files (
summarise_controlweights horizontal-extent frequencies across all measurable sampled tiles viaCounter+lru_cache, excludes zero-extent flat tiles, andgit merge origin/mainat02f71ccfeapplies cleanly with zero conflicts). Also verified on mergedPR+main:python -I tests/test_runner_calls_all_tests.py(3/3 OK),python -I tests/test_text_write_line_endings.py(3/3 OK),git diff --check, andscripts/check_no_game_data.py(clean).Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:42:28Z.
Red/green: tests/test_navmesh_cell_fit.py fails 1 assertion on main (the control baseline mean only uses the first 20 tiles) and passes with the PR (cloud run on main
7daa4a4).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
7daa4a4a5in GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)