Skip to content

FL1c: a fleet's plants (a list, each team's) and its metric (D9) - #1407

Merged
transfix merged 2 commits into
masterfrom
feat/fleet-plants
Nov 21, 2026
Merged

transfix merged 2 commits into
masterfrom
feat/fleet-plants

Conversation

@transfix

@transfix transfix commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

FL1c of FLEETS_AND_NIGHT_ROADMAP.md, following FL1b (#1403). Its branch still carries #1405's rally-test fix, now on master (c1766d6) with the same change, so review only the FL1c commit; the squash merge brings only FL1c.

A fleet now chooses its plants and the metric it plans with.

start:
  - { fleet: city, archetype: humvee, count: 800, spawn: opposed, rally: { count: 16 },
      plant: { 0: jolt, 1: jolt }, metric: policy }

Plants

plant: takes one of:

  • one plant;
  • a list its vehicles cycle over ([jolt, kinematic]);
  • each team's ({ 0: jolt, 2: jolt }). A team that isn't named gets the archetype's plant.

How it works:

  • One navigator per plant, keyed <plant>/<fleet>, as FL1b set up. So a mixed fleet is several navigators, and their vehicles meet each other as foreign agents.
  • All or none float: a fleet's plants are all dynamicboat or none are.
  • The live key: vehicles.fleets.<name>.plant switches the plants. The vehicles start at rest where they are, on the new navigators.
  • The key's text is fleet_plants::text, a superset of what the YAML can say:
    • jolt;
    • jolt, kinematic;
    • 0: jolt, 2: jolt;
    • kinematic, 0: jolt (team 0 on Jolt, the rest kinematic).
  • A bad plant or team is reported in vehicles.status and changes nothing.
  • New: fleet_plants, parse_fleet_plants and vehicle_start::plants.

The metric (D9)

metric: takes:

  • trained: the trainer's vehicle. That is training_scene's rr, d_hat and vmax (a 3 m disc and 18 m/s) at the hosts' tick, as SceneSwarm plans. The plants' plan_with_vehicle is off, and the kinematic bicycle drops its per-vehicle kinematics.
  • vehicle: each plant's own size and limits, which is what world vehicles did before.
  • policy (the default): follows the policy.
    • It is trained while weights drive the fleet or are still on their way. A download's arrival therefore doesn't remake the navigator, which would stop every vehicle on a first run.
    • It is vehicle on the built-in net, whether asked for or a fallback's.

Switching and reporting:

  • .metric switches it.
  • .plans says which metric it plans with now.
  • A change remakes the fleet's navigators, its vehicles at rest where they are. A live switch without the rebuild isn't possible on every plant: sim_world::set_live_knobs and nav_plant::set_plan_with_vehicle would cover kinematic and Jolt, but the dynamic and boat plants take plan_with_vehicle only at construction.
  • plants() now reports each fleet's own bicycle (sim_world::current_config().veh), not the world's, so a twin sees the trained metric.
  • The separation (set_avoid) is sized by each navigator's own vehicle radius.

Docs

  • ARIADNE.md's Fleets section.
  • world_rules.h's start block.
  • The roadmap's FL1c row and D9 text.

Left for FL1 (FL1d):

  • poses(fleet);
  • the summary's tick and bounds;
  • the gym's fleet.

Tests

ariadne_scene_world_test passes locally (MSVC, Jolt).

  • New: AriadneWorldVehicles.AFleetHasPlantsAndAMetric covers:
    • a fleet cycling [kinematic, dynamic] and one with { 0: dynamic } by team, with their four navigators;
    • .plant switched live to dynamic4w, the vehicles where they were and at rest, the old navigators gone;
    • two bad writes, each reported and changing nothing;
    • .metric to trained: the kinematic vehicles' limits are the trainer's 3 m and 18 m/s, all still placed; then back to policy.
  • Extended:
    • AFleetIsANamedStartEntry gains the plants and metric, their errors, and the key's text form;
    • AFleetHasANavigatorAndAPolicyOfItsOwn checks .plans across its policy switches, including both fallbacks.

AFleetIsLaidOutInTeamsAtRallyPoints (FL1a, #1384) stepped 240 times and
asked for the fleet to be 5 m east. On OW1's 1/120 s quantum (#1378)
those steps are 2.0 s, not the 2.4 s it was written at, and the fleet
starting from rest is 4.36 m east by then. Neither PR's CI saw the
other, so master has failed it since OW1 merged.

It now steps 3 s of the clock (3 / kSimQuantum), about 9 m east.
A fleet's plant: is one plant, a list its vehicles cycle over, or each
team's ({ 0: jolt }; a team not named on the archetype's), each plant a
navigator of the fleet's own (<plant>/<fleet>); its plants all float or
none do. vehicles.fleets.<name>.plant switches them live
(fleet_plants::text: "jolt, kinematic", "kinematic, 0: jolt"), its
vehicles at rest where they are; a bad one is said in vehicles.status.

Its metric: trained (the trainer's vehicle: training_scene's rr, d_hat
and vmax at the hosts' tick, the plants' plan_with_vehicle off), vehicle
(each plant's own), or policy (the default: trained while weights drive
or are on their way, so their arrival does not make the navigator again;
vehicle on the built-in net, a fallback's included). .metric switches
it, .plans says which, and a change makes the navigators again.

plants() reports each fleet's own bicycle, and set_avoid sizes each
navigator's separation by its own vehicle.

Tests: AFleetHasPlantsAndAMetric; AFleetIsANamedStartEntry's plants and
metric; .plans across AFleetHasANavigatorAndAPolicyOfItsOwn's switches.
@transfix
transfix merged commit 834a21f into master Nov 21, 2026
30 checks passed
@transfix
transfix deleted the feat/fleet-plants branch November 21, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant