ydy0615 5e76bb2452 feat(ai): add Map class for pathfinding and speed up world updates
- 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.
2025-12-28 11:38:50 +08:00
2025-12-27 07:24:28 +00:00
2025-12-27 07:24:28 +00:00
Description
No description provided
Readme MIT 2.7 MiB
Languages
JavaScript 95.9%
Jupyter Notebook 2.7%
Python 1.4%