Repository navigation
FL1b: a navigator per fleet, with its own sense, belief and policy - #1403
Merged
Merged
Conversation
Each fleet (a start: entry with fleet:) has a navigator of its own per plant, "<plant>/<fleet>".
- sense: known or fog (the world's by default); belief: shared, grouped (max(2, n / 64) planes,
teammates together) or private (one per vehicle). vehicles.fleets.<name>.sense and .belief make
it again with the vehicles at rest where they are; .planes counts its maps.
- policy: trained (the default: $CVC_NAV_WEIGHTS, an installed copy, else
cvcpkg://cvc/grl-snam-weights through the data store), builtin, a .cvcnav, { uri, path, sha256 }
or { data: <entry> }. .policy switches it live; .drives says what drives; without the weights
the fleet drives on the built-in net and says why, in .drives and once in the host's log.
- policy_library::get_bytes: weights already in memory, loaded once per hash.
- A fleet refuses controller: pose.
- FL1a's test documents drive on policy: builtin, whatever weights a box has installed.
Docs: ARIADNE.md's fleets, the roadmap's FL1b row, and D3 with ARIADNE_WORLDS section 18 (the
worker is the local server-role holon's).
Test: AriadneWorldVehicles.AFleetHasANavigatorAndAPolicyOfItsOwn; AFleetIsANamedStartEntry
extended.
This was referenced Nov 20, 2026
Merged
transfix
added a commit
that referenced
this pull request
Nov 22, 2026
…#1449) * Fleets: placing and removing vehicles is linear; fleet lookups build no strings Loading a fleet took about twice as long as at FL1a: 88 ms for 800 kinematic vehicles, 500 for 2000. Two causes: - Placing a kinematic vehicle recomputed its fleet's per-vehicle kinematics (kinematics()), which walks every entity with two fleet lookups each. So n vehicles took n^2 lookups (since #1235). Removing one did the same, so teardown, a restart or reseed, and a navigator rebuilt were quadratic too. - FL1b (#1403) gave a named fleet its own navigator, keyed "<plant>/<fleet>", and fleet_of() built that key on every call, which doubled each lookup. The fix: - A fleet's kinematics are marked stale when a vehicle comes or goes, and made once before its navigator next steps. Only the step reads them. - The fleets are searched by the key's parts (nav_ref, through a transparent comparator), so fleet_of() builds no string. FleetBench's [fleet doc] rows also time a reseed, with the tick after it. Medians of three runs, alternating with the code before the fix: - load, 800 vehicles: 105 to 117 ms before, 20 now; - load, 2000 vehicles: 640 to 755 ms before, 40 now; - reseed with summary keys: 228 to 28 ms at 800, 1.6 s to 118 ms at 2000. Ticks didn't change beyond the noise. The roadmap's §3.1 has the numbers. * Fleets: a step without contacts looks no vehicle up; a summary fleet's stats are one line At 2000 kinematic vehicles with summary keys a tick took 23 % longer than at FL1a (43.9 ms against 35.6), more than the seventh physics step (OW1's 120 Hz) accounts for. Timing each phase, with FL1a's code and this branch's run alternately, it was 35.5 against 40.5 ms: 14 %, the rest a busier day. Of the 5.0 ms: - A step is more than its physics: it also counts the step's contacts and moves the kinematic boxes, at 2000 vehicles about half the physics again. At FL1a's costs a step, the seventh is 2.3 ms. - count_contacts() looked up every vehicle (a map of their chassis) before it read the step's contacts, and its lookups cost more since FL1b: 0.52 ms a step at FL1a, 0.69 now. A kinematic fleet's boxes meet nothing, so there were none to count. - The navigator's tick took 0.9 ms more (the same lookups in its loops), and FL1d's pose snapshot 0.25. The fixes: - A step with no contacts that count looks nothing up. - physics.stats.vehicles gives a summary fleet's quiet vehicles one line, as entities.summary does, not a line each built from info() every tick (3.3 ms at 2000 vehicles). Alternating with the code before: 31.8 ms a tick at 2000 vehicles (40.5 before) and 9.5 at 800 (12.4), under FL1a's 35.5 and 10.9 with the seventh step. The roadmap's 3.1 has the numbers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FL1b of FLEETS_AND_NIGHT_ROADMAP.md, following FL0 + FL1a (#1384, merged as 28c371c).
Each fleet now has its own navigator, with its own sense, belief and policy (settled as D8). Nothing in the one-world stack (#1378, #1379, #1381, #1387) touches this part.
A navigator per fleet
<plant>/<fleet>. The plant's unnamed vehicles keep the navigator they had. The fleets meet each other as foreign agents, as different plants already did.sense:isknownorfog. By default it is the world'svehicles.sense, and it follows that key when the key changes.belief:says how the vehicles share what they sense:shared(the default): one map;grouped: max(2, n / 64) maps, teammates together;private: one map per vehicle.vehicles.fleets.<name>.senseand.beliefrebuild the navigator, with the vehicles at rest where they are..planescounts the maps.The policy
policy:takes one of:trained(the default):$CVC_NAV_WEIGHTS, else an installed copy (coef_mlp::default_weights_path), else a download ofcvcpkg://cvc/grl-snam-weights(share/grl-snam-weights/coef_sdf.cvcnav) through the data store, cached by hash;builtin: the built-in net;.cvcnavpath;{ uri, path, sha256 }: a file, an https URL or a cvcpkg:// package, the.cvcnavinside it, and its hash;{ data: <entry> }: one of the document'sdata:entries.Switching and reporting:
vehicles.fleets.<name>.policyswitches it live:sim_world::set_policy, orreset_policyfor the built-in net..drivessays what drives:trained (<where>, sha256:...)orweights (...);builtin;builtin: loading <uri>while a download is under way;builtin: no trained weights (<why>)when the weights can't be had. The fleet then drives on the built-in net, and the host's log gets the same line once. With the network off, the reason reads "the network is off, so ... cannot be fetched: run the host with the network on (--net-allow ORIGIN)".policy_library::get_bytesloads weights already in memory (a download, a data entry) once per hash, asgetdoes for files.Also
controller: poseis refused for a fleet, and so is an archetype whose first controller ispose. A fleet lays out and drives its vehicles, while a pose entity is placed only by its poses.policy: builtin, so their layout and drive tests don't depend on the weights a box has installed.poses(fleet)feeds OW5's playout.Left for FL1:
poses(fleet);Tests
ariadne_scene_world_testpasses locally (MSVC, Jolt).AriadneWorldVehicles.AFleetHasANavigatorAndAPolicyOfItsOwncovers:.cvcnav;$CVC_NAV_WEIGHTS, a missing file, and an unreachable cvcpkg package. The last two fall back visibly.AFleetIsANamedStartEntrygains the new keys and their errors.