McRogueFace/tests/benchmarks
John McCardle 17f2d6e1ef Refactor EntityBehavior SEEK/FLEE to use PathProvider strategy; refs #315
EntityBehavior no longer holds a direct DijkstraMap reference. A new
PathProvider interface has three concrete implementations:

- DijkstraProvider: steps along a (possibly inverted) DijkstraMap. SEEK
  descends a normal map toward roots; FLEE descends an inverted map away
  from threats.
- AStarProvider: follows a pre-computed AStarPath step-by-step.
- TargetProvider: takes a single (x, y) target and picks the Chebyshev
  neighbor closest to it each turn.

Entity.set_behavior() gains a pathfinder= kwarg accepting any of the above
(DijkstraMap, AStarPath, or (x, y) tuple). The old executeSeek/executeFlee
helpers collapse into a single executeProviderStep() that delegates to the
provider.

EntityBehavior.h forward-declares PathProvider so the header stays light.
EntityBehavior::reset() moves out of line to avoid pulling PathProvider
into the header.

New tests: tests/regression/issue_315_path_provider_test.py covers all three
providers driving SEEK, FLEE via inverted DijkstraMap, mid-run pathfinder
swap, and invalid-argument handling. grid_step_bench baseline refreshed
against the new provider dispatch path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 09:19:05 -04:00
..
baseline Refactor EntityBehavior SEEK/FLEE to use PathProvider strategy; refs #315 2026-04-18 09:19:05 -04:00
_baseline.py Phase 5.2: performance benchmark suite for grid/entity/FOV/pathfinding 2026-04-18 06:45:40 -04:00
benchmark_moving_entities.py Remove legacy string enum comparisons from InputState/Key/MouseButton, closes #306 2026-04-09 22:19:02 -04:00
benchmark_suite.py Remove camelCase module functions (setScale, findAll, getMetrics, setDevConsole), closes #304 2026-04-10 01:07:22 -04:00
dijkstra_bench.py Phase 5.2: performance benchmark suite for grid/entity/FOV/pathfinding 2026-04-18 06:45:40 -04:00
entity_scale_benchmark.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
fov_opt_bench.py Phase 5.2: performance benchmark suite for grid/entity/FOV/pathfinding 2026-04-18 06:45:40 -04:00
grid_step_bench.py Phase 5.2: performance benchmark suite for grid/entity/FOV/pathfinding 2026-04-18 06:45:40 -04:00
gridview_render_bench.py Phase 5.2: performance benchmark suite for grid/entity/FOV/pathfinding 2026-04-18 06:45:40 -04:00
layer_performance_test.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
pathfinding_bench.py Phase 5.2: performance benchmark suite for grid/entity/FOV/pathfinding 2026-04-18 06:45:40 -04:00
spatial_hash_bench.py Phase 5.2: performance benchmark suite for grid/entity/FOV/pathfinding 2026-04-18 06:45:40 -04:00
stress_test_suite.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
tcod_fov_isolated.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
tcod_scale_test.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00