- Modified plan_next_actions in server.py to remove selected positions from regard_list, preventing reuse in subsequent planning steps for better AI decision-making
- Added comprehensive unit tests in test_map.py for enemy_to_walls and choose_enemy functions to ensure correct behavior and distance calculations in the game map
- Remove unused `random` import and introduce `collections` for BFS queue.
- Decrease `GameMap` update interval from 1000 ms to 1 ms and lower `update_threshold` from 100 to 1 for near‑real‑time world state.
- Add thread‑safe lock, timestamp tracking, and rename `player_to_flag_assignments` to `player_to_flag_assign`.
- Introduce `my_side_is_left` flag to differentiate safe‑zone logic.
- Implement new `Map` class:
* Stores grid, edges, and safe‑zone status.
* Updates grid with walls, allies, enemies, and safe‑zone handling.
* Computes adjacency edges respecting obstacles.
* Provides `guideance` (BFS) to obtain the first movement direction towards a target.
- Overall refactor improves AI flag‑picking speed and decision accuracy.
Adjusted range checks for flag handling:
- Changed `lentime<=5` to `lentime<6`.
- Updated `lentime<=10` to `lentime<12`.
- Modified `lentime<8` to `lentime<6`.
These tweaks refine the decision logic for flag acquisition, ensuring more consistent behavior at boundary values.
Added a debug print statement to log each player's current position and target destination, aiding in troubleshooting movement decisions.
- Decrease `GameMap` update interval from 10 ms to 1 ms and lower `update_threshold` to 1 for more responsive state syncing.
- Remove unused `random` import.
- Adjust safe‑zone detection to offset player position based on team side.
- Restrict enemy marking to opponent side, preventing incorrect obstacle placement.
- Update edge generation logic to correctly handle safe‑zone and opponent cells.
- Add `closest` and `closest_in_range` helper methods that compute nearest positions while respecting team side boundaries.
- Introduce global `my_side_is_left` handling within `Map.update` for side‑dependent calculations.
These changes improve map accuracy, AI pathfinding, and overall game performance.
Introduce a new `CTF/backend/mypolicy` Python module that implements a comprehensive game policy for the capture‑the‑flag bot. The file defines a global world model, thread‑safe state handling, and a `Map` class that builds a grid representation of the game map, generates traversable edges, and provides BFS‑based `guideance` and `length` methods for pathfinding and distance calculation. This policy enables the bot to make informed movement decisions based on safe zones, walls, allies, and enemies. Additionally, macOS `.DS_Store` placeholder files were added to the repository.