Skip to content

Security: Operaciones-USM/polyhedron-coverage

Security

docs/security.md

Security Models

The security models live under src/polyhedron_coverage/security/ and support both 2D polygon targets and 3D cuboid-cell targets.

Overview

In this framework:

  • Defender: A fleet of drones/trucks patrols subsets of targets within a time budget. The goal is to generate a randomized patrol strategy that minimizes the expected payoff for an attacker.
  • Attacker: Chooses a target to intrude, or chooses not to attack. If caught, they pay a penalty; if undetected, they gain a reward.

Detection Model

Detection of an attacker depends on two factors:

  1. Spatial coverage: 2D games use polygon area and circular drone view radii. 3D games use cuboid volume and spherical drone view radii.
  2. Temporal overlap: The probability that the patrol window overlaps the attacker's dwell time. Predictable schedules like Greedy allow attackers to avoid patrols, while randomized schedules create genuine uncertainty.

2D Security

The 2D model uses convex polygon targets generated by the polyhedron-security-2d CLI.

polyhedron-security-2d

Outputs include a 2D target map, profit comparison, visit heatmap, and RL training curve under output/.

3D Security

The 3D model uses cuboid cells from the existing coverage3d tessellation stack. The 3D game preserves the same route/schedule interface as the 2D game, so Greedy, Random, MaxMin, and RL defenders can be reused.

polyhedron-security-3d --divisions 3 2 1 --days 60 --rl-episodes 500 --make-gif

For a faster smoke run:

polyhedron-security-3d --divisions 2 2 1 --days 4 --rl-episodes 2 --no-gif

3D assets:

3D security world

3D security patrol animation

Strategies

The strategies/ subpackage includes several defender approaches:

  • Greedy: A deterministic strategy choosing the highest-value unvisited targets.
  • Maximin (LP): A Linear Programming approach to find the optimal mixed strategy against a rational attacker.
  • RL (Reinforcement Learning): Learning optimal routes through trial and error.
  • Random: A baseline strategy that randomly selects valid routes.

Core Components

  • game_env.py: 2D polygon security game.
  • game_env_3d.py: 3D cuboid-cell security game.
  • coverage_model.py: 2D polygon area and coverage fraction helpers.
  • coverage_model_3d.py: 3D cuboid volume and spherical coverage helpers.
  • visualize_security.py: Shared numeric plots and 2D world map.
  • visualize_security_3d.py: 3D world map and patrol GIF rendering.

Regenerating 3D README Assets

polyhedron-security-3d \
  --divisions 2 2 1 \
  --days 10 \
  --rl-episodes 10 \
  --make-gif \
  --asset-dir docs/assets/security3d \
  --output-dir /tmp/polyhedron_security3d_assets

There aren't any published security advisories