Files
agentic-labs-challenge/underdepths/.orchestrator-phase2-astar.log
2026-08-16 19:10:31 +02:00

15 lines
1.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
==> Dispatch: phase 2 A*
supacode: OSC emit failed: code=ENXIO errno=-6 message=ENXIO: no such device or address, open '/dev/tty'
[LCM] Failed to initialize: database is locked
supacode: OSC emit failed: code=ENXIO errno=-6 message=ENXIO: no such device or address, open '/dev/tty'
Done. `engine/pathfinding.py` — the only file touched.
**API**
- `astar_path(game_map, start, goal, occupied=None) -> list[Point]` — 4-directional A*, Manhattan heuristic, returns `[start, ..., goal]`, `[]` on no path / non-floor endpoint / occupied goal. Never raises.
- Obstacles: walls + occupied tiles (no stacking). Start tile is exempt (mover already stands there). `occupied=None` derives blockers from `game_map.entities` via `blocks_movement` (public helper `blocked_positions`); an explicit collection overrides — chase callers pass enemies-only so the player's tile stays a valid goal.
**Verification**
- Self-check (`python -m engine.pathfinding`): 5 generated maps × 20 random floor→floor paths each (endpoints, 4-dir contiguity, no revisits, all-walkable); wall endpoints and walled-off goals → `[]`; occupied chokepoint blocks (explicit set *and* derived from `map.entities`); start-exempt; straight corridor yields the Manhattan-optimal path.
- `python tests/smoke.py --phase 1`: PASS (no regression).
- `--phase 2` fails only on the `phase_not_built(2)` stub — untouched, per instructions, awaiting the gate integrator.