- Reduce `GameMap` update interval from 1000 ms to 10 ms for more responsive gameplay. - Introduce thread lock, update thresholds, and player‑to‑flag tracking variables for safer concurrent access. - Add `my_side_is_left` flag to determine team orientation. - Implement new `Map` class: * Builds a grid representation of the world, marking walls, enemy flag carriers, and allies. * Generates adjacency lists (`edge`) respecting safe‑zone rules. * Provides `guideance` method that runs a BFS (unit‑weight Dijkstra) to compute the shortest path and returns the first movement direction via `world.get_direction`. - Import `collections` for efficient deque usage. - Include compiled `.pyc` for the new module. These changes enable the policy to make quick, informed movement decisions based on real‑time map analysis.
9.7 KiB
9.7 KiB