Skip to content

Game guides

Five games ship with orbitalgym. Each has a typed Game subtype attached to cfg.game, a matching reward and termination, and a make_<game>(...) builder that wires everything up.

Game Page Summary
Lady-Bandit-Guard → Guard protects the reference orbit from the bandit
Pursuit-Evasion → 1v1 — bandit pursues, guard evades
Sun-Blocking → Bandit occludes the guard's view of the Sun
Observation-Blocking → Bandit blocks the guard's view of an Earth target, gated on visibility
Get-Off-My-Lawn → Bandit loiters in an HCW elliptical keep band near the lady; guard intercepts or repels beyond a keep-out shell

Every builder defaults to a 1-guard / 1-bandit RTN scenario in a circular LEO orbit (~7000 km radius), with a 10-second timestep and a game-appropriate IC sampler. Override any field by keyword:

cfg = make_pursuit_evasion(
    capture_distance_m=5.0,
    max_horizon_s=4000.0,
    seed=42,
)

A registry-keyed dispatch is also available for code that needs to choose a game by enum:

from orbitalgym import make_game, GameKey
cfg = make_game(GameKey.OBSERVATION_BLOCKING, target_lat_deg=37.4, target_lon_deg=-122.2)

For a tutorial walkthrough that uses each game, see Tutorials:

  • T1 uses Lady-Bandit-Guard.
  • T2, T3, and T4 use Pursuit-Evasion.

ScenarioConfig.to_json() / from_json() round-trip every game, including derived fields like ObservationBlocking.target_ecef_m (recomputed in __post_init__ on load). See Round-trip config to JSON.