navmesh_cell_fit: measure the baseline across all sampled control tiles #2446

Merged
leonida/mandy
kirigayakazima merged 1 commit from codex/navmesh-control-full-baseline into main 2026-11-28 19:42:31 +00:00

Pull request successfully merged and closed

kirigayakazima commented 2026-11-27 10:17:10 +00:00

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.py
  • Changed-path game-data scan and git diff --check passed.
  • Shared main baseline: 6,374 translator semantic tests passed across 500 files. The combined five-topic checkout passed 172 focused tests.

GPUs tested: N/A (CPU-only).

AI-assisted: Yes.

Checklist

  • Based on current main and merges cleanly with the tested base.
  • One topic.
  • No game data, keys or decryption.
  • Translator contract table: N/A.
Claimed in the coordination issue as: [NAVMESH-CONTROL-FULL-BASELINE](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7215561737) ### 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.py` - Changed-path game-data scan and `git diff --check` passed. - Shared main baseline: 6,374 translator semantic tests passed across 500 files. The combined five-topic checkout passed 172 focused tests. GPUs tested: N/A (CPU-only). AI-assisted: Yes. ### Checklist - [x] Based on current main and merges cleanly with the tested base. - [x] One topic. - [x] No game data, keys or decryption. - Translator contract table: N/A.
MSedgeMC reviewed 2026-11-27 15:07:40 +00:00
MSedgeMC left a comment
No description provided.
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.
zmasi commented 2026-11-28 03:13:41 +00:00

#2446 | head aaabf497bee996b60375a12d4db10ce702fa6d41 (merged cleanly with main 02f71ccfe) | python -I tests/test_navmesh_cell_fit.py | red on main: FAILED (failures=1) in 5 tests (baseline_mean 0.25 vs expected 0.2619) | green on PR+main: Ran 5 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yes

Diff reviewed across both touched files (summarise_control weights horizontal-extent frequencies across all measurable sampled tiles via Counter + lru_cache, excludes zero-extent flat tiles, and git merge origin/main at 02f71ccfe applies cleanly with zero conflicts). Also verified on merged PR+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, and scripts/check_no_game_data.py (clean).

#2446 | head aaabf497bee996b60375a12d4db10ce702fa6d41 (merged cleanly with main 02f71ccfe) | `python -I tests/test_navmesh_cell_fit.py` | red on main: FAILED (failures=1) in 5 tests (`baseline_mean` 0.25 vs expected 0.2619) | green on PR+main: Ran 5 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yes Diff reviewed across both touched files (`summarise_control` weights horizontal-extent frequencies across all measurable sampled tiles via `Counter` + `lru_cache`, excludes zero-extent flat tiles, and `git merge origin/main` at `02f71ccfe` applies cleanly with zero conflicts). Also verified on merged `PR+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`, and `scripts/check_no_game_data.py` (clean).
MoonEyes commented 2026-11-28 19:42:28 +00:00

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 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

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 7daa4a4a5 in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
Sign in to join this conversation.
No description provided.