Skip to content

Congestion Shield Repair

This note keeps the congestion debugging history, but the environment has since been repaired so exact shielding is feasible again without changing the global shield semantics.

Historical issue

The original congestion label made the repeated game structurally infeasible at small eventual-risk budgets such as max_risk=0.2.

  • The shield reasons about the probability of eventually reaching unsafe.
  • The old congestion label marked the focal agent unsafe whenever the last round jammed or it chose the strictly more congested road.
  • From reset, every pure action kept substantial positive one-step hazard alive, so eventual unsafe demand quickly rose to 1.0.

That made both learned and exact shielding fail at reset for semantic reasons, not because WM/OM were stale.

Chosen repair

Congestion now adds an explicit safe fallback action: Detour.

  • Action space: RoadA, RoadB, Detour
  • Reward rule:
  • RoadA and RoadB still use congestion-dependent route costs
  • Detour gets fixed reward -detour_cost
  • Public observation contract:
  • action bits changed from 2N to 3N
  • the new per-agent channels are roadA, roadB, detour
  • Safety label:
  • safe if the focal agent took Detour, or
  • safe if the round did not jam and the focal agent did not pick the strictly more congested road

This keeps the environment time-free while giving the shield a genuine zero-risk fallback action at reset.

Artifact implications

The congestion repair changes the public action/state contract.

  • Exact true-shield caches rebuild cleanly from the current env.
  • Learned WM/OM artifacts generated before the detour change are stale and should be regenerated before running IPPO_Shielded.
  • Current notebook defaults enable both learned IPPO_Shielded and IPPO_TrueShielded. A learned run still requires refreshed Congestion WM/OM artifacts; stale pre-detour exports should fail during shield setup rather than silently training against the old contract.

Relationship to time semantics

This repair is intentionally not a time-bit fix.

  • No public time bits were added.
  • Hidden episode caps still live outside the public state contract.
  • Truncation should still use the time-free bootstrapping path documented in docs/AI/environments/hidden-episode-cap.md.