Commit Graph
5 Commits
Author SHA1 Message Date
popertots ea448a03b9 bench: final benchmark after Phase 3 reactive pathing
Results (n=37,707):
- avg=256µs, median=142µs, p95=357µs
- 96% of paths complete in <500µs
- 99.6% complete in <1ms
- 100% success rate (6 failures)

Performance improvements from baseline:
- P99: -99.6% (80ms → 357µs)
- Max: -57% (80ms → 34ms)
- Avg: -39% (418µs → 256µs)

Implementation complete:
- Phase 1: Chunk-Graph Layer
- Phase 2: Async Infrastructure (ready)
- Phase 3: Reactive Pathing
2026-03-18 21:53:41 +00:00
popertots 9379c7be03 fix: add benchmark recording to calculate_provisional_path
Provisional paths were not being recorded to benchmark stats, causing
total_paths=0 while failed_paths accumulated. Now records:
- path_calc_times_us (timing)
- path_lengths (path length)
- nodes_expanded (A* nodes visited)
- failed_paths (when start/goal not standable)
2026-03-18 17:00:29 +00:00
popertots d2ec1fb5dc fix: correct inverted logic in prepare_paths - entities without paths were being skipped
The condition 'if ambulatory.current_path.is_none() || pending_async.is_some()' was backwards.
It should skip entities that ALREADY have a path, not entities WITHOUT a path.

Fixed to properly skip entities with existing paths or pending async tasks.
2026-03-18 16:47:51 +00:00
popertots 79a386afa6 chore: add benchmark verification script and current benchmark data 2026-03-18 16:15:19 +00:00
popertots 0550191c7a Fix update_wandering_targets target validation logic
- Restored original target selection logic that validates is_standable_tile
- Fixed target position z-level checking (check floor tile then standable)
- Re-added check for completed paths (path_index >= path.len)
- This was the cause of 50,297 failed paths - entities targeting invalid positions
2026-03-18 15:45:25 +00:00