Enable consensus tracker by default + round-world Strömbom fix
Two changes that together raise diff/round gym success ~52%→88% (BC)
and ~68%→88% (RL) without retraining; diff/field stays at 100%.
* TrackerConfig.consensus_k default 1 → 3 (radius 0.5 m, max_age 15
frames). The same candidate-promotion mechanism that closed the
Webots LiDAR gap also filters gym tracker phantoms — they show up
on the round field where sheep run further between detection
cycles than GATE_M, so each new position spawns a fresh track
while the stale one persists in memory. SheepTracker() called with
no tracker_cfg keeps the legacy pass-through behaviour for
backwards compatibility.
* Strömbom + universal teachers now detect when the natural
"behind the flock" drive target leaves the curved boundary and
fall back to pushing the flock radially inward toward the centre.
Breaks the wall-circling pattern that previously trapped both the
analytical baselines and the trained policies.
A/B numbers (n_sheep ∈ {1,2,3,5,10}, 5 seeds each, max_steps=15000):
diff/field bc: baseline 100% consensus 100%
diff/field rl: baseline 100% consensus 100%
diff/round bc: baseline 52% consensus 88%
diff/round rl: baseline 68% consensus 88%
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+10
-7
@@ -175,12 +175,13 @@ class TrackerConfig:
|
||||
from permanently consuming tracker slots as false "penned" sheep.
|
||||
"""
|
||||
|
||||
consensus_k: int = 1
|
||||
consensus_k: int = 3
|
||||
"""New tracks must accumulate this many matches before they appear in
|
||||
``get_positions``. ``1`` (default) disables the candidate stage —
|
||||
behaviour-identical to the original tracker. ``3-4`` filters one-shot
|
||||
LiDAR phantoms in Webots while a real sheep promotes within
|
||||
``consensus_k * timestep`` ≈ 50-65 ms.
|
||||
``get_positions``. ``1`` disables the candidate stage entirely;
|
||||
``3`` (default) requires three nearby confirmations within
|
||||
``consensus_max_age`` and reliably filters single-shot detection
|
||||
splits / out-of-range stragglers that confuse the policy on the
|
||||
round field while real sheep promote in ~50 ms (3 frames).
|
||||
"""
|
||||
|
||||
consensus_radius_m: float = 0.5
|
||||
@@ -190,9 +191,11 @@ class TrackerConfig:
|
||||
≪ 0.05 m / step at max speed so this gate is very loose for them.
|
||||
"""
|
||||
|
||||
consensus_max_age: int = 8
|
||||
consensus_max_age: int = 15
|
||||
"""A candidate that has not been matched for this many steps is dropped.
|
||||
Short — phantoms get one window to confirm or die.
|
||||
Short enough that a one-shot phantom can't keep itself alive, long
|
||||
enough that a real sheep glimpsed twice in a short interval
|
||||
confirms.
|
||||
"""
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user