This project simulates a dynamic patrolling system in an unknown 2D continuous space where the goal is to:
- Discover hot points (areas of interest or activity)
- Find the shortest closed path to compare with patrol path
- Dynamically patrol these points to minimize the time they are left unvisited
The experiment is divided into three main phases:
- Space is continuous and initially unknown.
- A synthetic "heat map" is simulated using Gaussian peaks.
- Particle Swarm Optimization (PSO) is used to discover the "hot" points (local maxima) in this space.
- Once hot points are discovered, we compute the shortest closed path visiting all of them (TSP).
- This is solved using Ant Colony Optimization (ACO) to simulate cooperative path building.
- A single agent patrols the discovered hot points.
- Instead of following a fixed loop, the agent uses a dynamic scoring strategy to prioritize:
- Time since last visit
- Distance to each hot point
- (Optional) Importance of the point
- The goal is to minimize the max time between visits to any hot point.
This test is extensible to:
- 🔁 Multiple patrolling agents
- 🧠 Reinforcement Learning-based patrol logic
- ⚡ Energy-aware or probabilistic patrols
- 🎯 Adaptive importance weighting
- Full visualizations of the heat map, discovered hot points, patrol path, and visit intervals.
- Animated patrol showing the latest movement segment only for clarity.
pip install -r requirements.txt