Skip to content

ALGO-01.1 — ADR: ownership, taxonomy, knowledge-pack format and product-workspace distribution #5223

Closed

Description

@EHotwagner

Parent Outcome: #5222
Work level: Delivery · Track: Active delivery · Intended Status: Ready

Owner

Root/fdev assigns.

Done when

An accepted ADR (in .github/docs/adr) plus a framework Atlas pointer record. It decides:

  • Producer: the producer repository, either a new FS.GG.Algorithms repo or FS.GG.Game, with reasons covering dependency direction (Game, Rendering and RuneScape consume it) and release cadence.
  • Library: the package id or ids, namespaces, Fable-portability rules, and the admission bar (property tests plus bench numbers via FS.GG.Game the corpus case 41-residue-and-full-queue is FLAKY in CI — it exits 5 at random, and a gate that fails randomly teaches people to re-run it #761/fix(engine): next/take name the observed reason, not a guessed list of causes (#440) (case 41) #792).
  • Pack format: the knowledge-pack entry schema, reusing the Atlas record format and atlas.py tooling as a product-local archive inside the skill. Covers fields, citation and licence rules (summarise and cite, never copy textbooks or wikis), and size limits.
  • Distribution: the producer's template/skill-manifest/skill-manifest.json, registry/skills.yml rows, ADR-0017 materializes-when predicates (which templates get it), and the fsgg-sdd upgrade re-seed path. Verified against how fs-gg-grids, fs-gg-collision, fs-gg-line-drawing and fs-gg-visibility ship today.
  • Existing skills: how those four skills relate, whether folded in or indexed by the umbrella.
  • Growth loop: the framework capture rule at Delivery closure, plus the upstream contribution route from product workspaces.
  • Taxonomy and seed list: the taxonomy, and the first-tranche entry list harvested from existing reviewed code.

Current deliverable

None.

Next action

Owner dispatched.

Blocked on

Nothing.

Acceptance evidence

None yet.

Refs #5222

Activity

  1. EHotwagner commented on Nov 1, 2026

    @EHotwagner
    ContributorAuthor

    Root/fdev: the ADR owner is dispatched. Three analysts are inventorying the FS-GG repos for seed content (engine and product, games and netcode, coordination and formal), and their findings will be posted here.

  2. EHotwagner commented on Nov 1, 2026

    @EHotwagner
    ContributorAuthor

    Root/fdev analyst (coordination & formal repos): inventory of algorithm and optimization techniques for ALGO-01.1 (analysis only; nothing modified; Outcome #5222).

    Method. Read local checkouts (.github 936283c0, Governance 3b8543e8, SDD 2a2770be, FsQuint 69fa62a, Authority e5ebd077, Coordination c0e7afc; see Unknowns for the last). Sources read directly; SHAs below are the last commit touching the cited path. Tested? and Benched? come from reading the test tree. I ran no tests or benchmarks.

    Cross-cutting findings

    • No benchmark harness exists for any technique in these repos (no BenchmarkDotNet; Stopwatch hits are timeouts and server code). Every row is Benched? No, so all need bench numbers from the FS.GG.Game the corpus case 41-residue-and-full-queue is FLAKY in CI — it exits 5 at random, and a gate that fails randomly teaches people to re-run it #761/fix(engine): next/take name the observed reason, not a guessed list of causes (#440) (case 41) #792 harness before the ALGO-01 — Shared algorithms & optimization capability: F# library + product skill knowledge pack, available in product workspaces #5222 admission bar is met.
    • Property tests are rare. FsCheck appears in .github/tests/FS.GG.Coord.Core.Tests/TouchSetTests.fs (5d7e2328) and in some Governance JSON/budget tests. The graph, diff and scheduling code has example-based xUnit only.
    • The LEARN-01 statistics are design only. The roadmap (docs/roadmaps/2026-09-12-095059-...-statistical-learning.md@02e6839a) specifies block randomization, cluster-resampling intervals, sequential error budgets, IPS/effective-sample-size checks and logged-bandit caveats. I found no executable randomizer, bandit, estimator or power calculation in scope. LearningAssignmentAdapter.fs@513acdb only persists and replays an immutable assignment (SHA-256 bound), not a draw. The pod design (docs/coordination/2026-10-30-learn-finite-executor-pod-design.md@18d2fb7a) is container/infra, with no algorithm content.
    • Not present anywhere in scope: topological sort, critical path, exponential backoff with jitter, token bucket, Merkle trees, constraint solvers, LP, bandits. Retry is fixed tables or constants (scripts/release-successor-publish.py@eb41faf3 ADMISSION_READ_BACKOFF_SECONDS=(0.5,1.5); MainHostComposition.fs@5d525ad constant 15s). Errors.fs@5d7e2328 only advises "honour Retry-After, else back off with increasing delay". These are gaps a library entry could fill, not harvestable code.
    • Authority repo (FS.GG.Coordination.Authority) holds state and evidence JSON only; no algorithms.

    1. Table

    Audience: G = game product, F = framework only, B = both. Rec: H = harvest into library plus entry, E = entry only, L = leave.

    Technique Repo:path@commit Kind Tested? Benched? Aud Rec Notes
    Tarjan SCC (cycle groups in blocked-by graph) .github:src/FS.GG.Coord.Core/Blockers.fs cycles@5d7e2328 graph, F# Yes, examples (BlockerTests.fs: ring, self-loop, diamond, chain); no property test No B H Pure, deterministic, recursive strongconnect (stack depth risk on long chains). Tech trees, quest prerequisites, deadlock detection.
    Naive DFS cycle detection (task deps) FS.GG.SDD:src/FS.GG.SDD.Artifacts/WorkModel.fs cycleDiagnostics@b56aeb32 graph, F# Partial (diagnostic tests only) No F L No visited set across roots or branches, so it can re-explore shared sub-DAGs (read, not measured; likely exponential on diamond-heavy graphs). Use as the "pitfall" in the Tarjan entry.
    Union-find components (path compression, lowest-index root) .github:src/FS.GG.Coord.Core/Lanes.fs partition@5d7e2328 graph/clustering, F# Yes (LanesTests.fs, 27 facts, example-based) No B H (generic over a conflict predicate) Pairwise O(n^2) conflict scan, then union. glue finds tokens whose removal splits a lane (cut analysis). Islands, flood-fill groups, spatial clustering.
    Priority-greedy conflict-free batch admission (maximal independent set with reservations, limit, fail-closed on unknown footprint) .github:src/FS.GG.Coord.Core/Batch.fs scheduleWith@5d7e2328 scheduling, F# Yes (BatchTests.fs, 64 facts) No F (G as analogue) E Deterministic: ranked fold, number as final tiebreak. Entry covers greedy MIS, fail-closed on unknown, determinism across cached windows. Domain types are board-specific.
    Lexicographic rank with aging/starvation and blocking-count (out-degree) term .github:src/FS.GG.Coord.Core/Rank.fs@5d7e232 scheduling/priority, F# Yes (RankTests.fs, 35 facts) No B E StarvationDays=21. Counts come from the whole-board graph, not the scoped candidate list (#1628 pitfall). Utility/priority queues in game AI.
    Slot/wave occupancy model (implementer slots per wave) .github:src/FS.GG.Coord.Core/Batch.fs waveOccupancy@5d7e2328 capacity packing, F# Yes (BatchTests) No F L Arithmetic over a parsed model; little reusable beyond the entry above.
    Capacity admission: load-per-core, MemAvailable, cgroup v2 headroom walk, disk, heavy-process census; unknown input means hold .github:scripts/fdev-lane-capacity.py@f15a0f6 admission control, Python Yes (tests/fdev-lane-capacity/test_fdev_lane_capacity.py, fixture /proc trees) No F E Conjunctive threshold gate, min over cgroup chain, fail-closed. Host-side Python; not an F# candidate. Game analogue: frame/memory budget gates, load shedding.
    Touch-set overlap / path-prefix conflict test .github:src/FS.GG.Coord.Core/TouchSet.fs conflicts, covers@5d7e2328 geometry-lite/set overlap, F# Yes, FsCheck property plus examples (TouchSetTests.fs) No F E Prefix/glob containment; the property-test style to copy for admission.
    Glob matcher (*, ?, **, backtracking) with precedence FS.GG.Governance:src/FS.GG.Governance.Routing/Glob.fs@c4c188a5 string matching, F# Yes (Routing.Tests/GlobMatchTests.fs) No B E Recursive backtracking: worst case exponential with many * (read, not measured). Asset-path routing. A DP or linear matcher would be a better harvest target.
    Arbitration: lease-free election, lowest comment id wins, append-only, keyed on opkey .github:docs/adr/0075-...@26abb2ef; scripts/check-claim-fence.py@cd3049d7 arbitration/fencing Yes (tests/claim-fence) No F E Server-assigned monotonic id is the total order; generation number is a fencing token. No TTL or lease expiry by design. Conceptual pattern, not code.
    Exclusive writer lock via flock on a pair of files, released in reverse order .github:src/FS.GG.Coord.GitHub/V2WriterLock.fs@201ce3a mutex/lease, F# P/Invoke Yes (tests/coord-board-writer-lock-mutation) No F L Linux libc only.
    pidfd liveness lease (poll on pidfd, kill, bounded wait) .github:src/FS.GG.Telemetry.Client/CustodyProjection/CustodyProcessLease.fs@201ce3a; Coordination:src/FS.GG.Coordination.Orchestration.Execution/CustodyProcessLease.fs@3d74e69 process lease Partly (host tests) No F L Linux-specific, 10 ms polling loop.
    Sequence-gated append-only event log: expected-sequence CAS, FOR UPDATE, SERIALIZABLE, SHA-256 per event, idempotent inbox by (command id, body hash), 40001/23505 maps to retry FS.GG.Coordination:src/FS.GG.Coordination.Orchestration.PostgreSql/PostgreSqlObserverStore.fs@513acdb (same shape in PostgreSqlPilotStore.fs, PostgreSqlStore.fs) CAS + journal, F#/SQL Yes (Observer.PostgreSql.Tests, native PG 40/40 per LEARN roadmap) No B E (+ small in-memory reference impl if wanted) Event sourcing for save/replay and rollback netcode. SQL part is not portable; a pure append expectedVersion events reference is.
    Release journal on protected git refs: optimistic parent check, immutable object reads, bounded history walk .github:scripts/release_successor_journal.py@eb41faf journal/CAS over git Yes (tests/release-successor-journal) No F L Python, GitHub API bound.
    Retry/backoff .github:scripts/release-successor-publish.py@eb41faf; Coordination MainHostComposition.fs@5d525ad; Errors.fs@5d7e2328 retry Yes (publish tests) No B E (new, not harvest) Only fixed delays. No exponential/jitter implementation exists to harvest; write fresh. Net/lobby reconnect.
    Proportional apportionment in exact rationals (bigint Fraction; allocated, unallocated remainder, replay-conflict refusal) .github:src/FS.GG.Coord.Core/ProcessEfficiency.fs allocate@2556144c numeric/accounting, F# Yes (ProcessEfficiencyTests.fs, tests/process-efficiency) No B E Exact fractions avoid float drift; shares must sum to at most 1. Loot/currency splitting.
    Interval union (sort + merge sweep, checked arithmetic) and clipped touch/wait overlap -> flow ratio .github:src/FS.GG.Coord.Core/TelemetryBudget.fs unionNanoseconds@5d7e2328; ProcessEfficiency.fs timeSummary@2556144c sweep line, F# Yes (TelemetryBudgetTests.fs) No B H Animation/audio timeline coverage, busy-time metrics. Small, pure.
    Nearest-rank percentile (p95/p99) and max catch-up frames from raw frame-duration samples FS.GG.Governance:src/FS.GG.Governance.Adapters.SddHandoff/Performance.fs nearestRank, recompute@c4c188a5 statistics, F# Yes (SddHandoff.Tests/PerformanceTests.fs, performance-v2.json) No G H Directly serves the bench-numbers admission bar and game frame timing. Sorts per call (O(n log n)); no interpolation, no CI.
    Telemetry accounting joins (flow ratio, retry counts, first-pass summary, populations) .github:src/FS.GG.Coord.Core/ProcessEfficiency.fs, ChurnReading.fs, EfficiencyEvidence.fs@2556144c/5d7e2328 descriptive stats Yes No F L Counts/ratios and schema validation; no inferential statistics anywhere.
    LEARN-01 experiment design: pre-dispatch randomized block assignment, cluster unit, predeclared locks, sequential error budget docs/roadmaps/2026-09-12-...statistical-learning.md@02e6839a (§6); Coordination LearningAssignmentAdapter.fs@513acdb (persistence only) experimental design N/A (design); adapter tested No B E (when implemented) Reference-only today. Entry candidates: blocked randomization, cluster bootstrap, sequential testing. Game use: playtest A/B, balance tuning.
    LEARN-01 policy evaluation: logged-bandit / IPS, overlap, effective sample size, switchback same roadmap §6.5, §7@02e6839 off-policy evaluation N/A (not implemented) No B E Cites Microsoft Research logged-bandit paper. No code; do not claim harvestable.
    Content addressing: SHA-256 over bytes; canonical manifests; digest-pinned inputs; lock-vs-tree staleness Coordination LearningAssignmentAdapter.fs@513acdb, PostgreSqlObserverStore.fs hash@513acdb; .github:src/FS.GG.Coord.Cli/KitDigest.fs@5d7e232; Governance:FreshnessKey/FreshnessKey.fs@c4c188a5; SDD WorkModel source digests@b56aeb32 hashing Yes No B E Thin wrappers on SHA256.HashData; value is the canonicalization discipline (sorted sets, lowercase hex, schema-version prefix). Asset hashing and save integrity.
    Full-text search: SQLite FTS5 with bm25() ranking, deterministic tiebreak by id and digest .github:.agents/skills/atlas/scripts/atlas.py ORDER BY bm25(search),r.id,r.digest@2efc10c0 (also SDD Knowledge/Store.fs@47c11251) information retrieval, Python Yes (tests/atlas/check.py) No G (pack tooling) E The mechanism the product-local archive will reuse; BM25 entry should record this exact configuration.
    Patience-style diff: unique-line anchors + longest increasing subsequence (binary-search LIS), region replace, rename-token inventory .github:src/FS.GG.Coord.Core/SemanticDiff.fs uniqueCommon, longestIncreasing@5d7e2328 diff, F# Yes (SemanticDiffTests.fs, 12 facts) No B H (LIS + anchor diff) O(n log n) LIS, reusable. Replay/state diffs, localization. Rename inventory is repo-specific, leave.
    Reconciliation (board-drift observer, currency rules, generation/fence reconcile) .github:scripts/board-drift-observer.py, board-currency-rules.py, check-reconcile-concurrency-scope.py (not read in detail) reconcile Yes (tests/board-drift-observer, tests/board-currency) No F L Rule engines over GitHub state, not a general merge algorithm. No three-way merge exists in scope.
    Model checking: Quint specs, seeded random schedule sampling (100 runs, seed 42), counterexample traces; ITF decode with exact BigInteger and limits; replay against implementation driver FsQuint:src/FsQuint/Itf.fs, Replay.fs@a981da4; examples/CiPreflight/pipeline.qnt@88d9985; .github:docs/quint/ (combat, communication)@936283c0 ; HostAttempt.qnt (deployment/telemetry-collector) formal methods Yes (FsQuint.Tests, custom Program.fs runner; examples run in CI) No B E Bounded (trace/sample) evidence, not proof; README says so. Templates already ship game models (fs-gg-fable-game/models/svg-arena). Good fit for a "model-based testing of game rules" entry.
    Pipeline-order exploration for missing dependency (model of build/shard/report) FsQuint:examples/CiPreflight@88d9985 model checking Yes (check.sh) No F E Worked example of schedule interleaving; same idea as topological-order testing.
    Gate ordering by ordinal id (explicitly no topological pass, "trivially acyclic") FS.GG.Governance:Gates/Gates.fs@c4c188a5 ordering Yes (Gates.Tests/DeterminismTests.fs) No F L Documents why no toposort is needed.
    Cost-budget ceiling: min of two monotone projections over an ordered Cost DU FS.GG.Governance:CostBudget/Budget.fs@c4c188a5 budgeting/lattice Yes (CostBudget.Tests, FsCheck referenced) No F L Small lattice idiom.
    Advisory promotion on repeated-review confidence threshold (count >= t, no single-sample floor) FS.GG.Governance:AdvisoryPromotion/AdvisoryPromotion.fs@c4c188a5 decision rule Yes No F L Plain count threshold, not statistical.

    2. Top 10 seed candidates (ranked by reuse value for game workspaces, existing tested code, harvest effort)

    1. Tarjan SCC (Blockers.cycles): tested, pure, universally useful; also fixes the framing for the SDD naive-DFS pitfall. Pair with a new Kahn topological sort and longest-path/critical-path entry (absent today).
    2. Nearest-rank percentile + frame-time summary (Performance.fs): small, game-native, and the library needs it to publish its own bench numbers.
    3. Union-find components (Lanes.partition): generalise over a conflict predicate; add a property test against BFS components.
    4. Interval union / sweep merge (TelemetryBudget.unionNanoseconds): tiny, exact, tested.
    5. Patience-diff anchors + binary-search LIS (SemanticDiff.fs): harvest the generic LIS and anchor diff, leave rename inventory.
    6. Priority-greedy conflict-free admission (Batch.scheduleWith + Rank): entry first (greedy independent set, aging, fail-closed on unknown); library only after a generic signature is designed.
    7. Sequence-gated append-only log (expected-version CAS + per-event hash + idempotent inbox) (PostgreSqlObserverStore.fs): entry plus a pure in-memory reference; save/replay and rollback netcode.
    8. Glob / wildcard matching: entry with the existing backtracker as the "naive" version and a DP or linear matcher as the harvested one (assets routing).
    9. Model-based testing with Quint + ITF replay (FsQuint, CiPreflight, template svg-arena models): entry; game rule engines already use this.
    10. SQLite FTS5 BM25 search (atlas.py): entry; documents the exact search configuration the product-local archive depends on.

    Next in line: exact-rational apportionment (ProcessEfficiency.allocate), content-addressing canonicalization discipline, LEARN-01 randomized-block and sequential-test entries (blocked on implementation).

    3. Unknowns

    • Checkout currency: FS.GG.Coordination local checkout is c0e7afc with 3 modified files; origin/main was 27d3c66 after a fetch (read-only fetch only). Coordination rows cite my local SHA and may be stale. .github checkout is detached at 936283c0.
    • Benchmarks: I cannot establish whether any harvested code is fast enough. I found none; Game the corpus case 41-residue-and-full-queue is FLAKY in CI — it exits 5 at random, and a gate that fails randomly teaches people to re-run it #761/fix(engine): next/take name the observed reason, not a guessed list of causes (#440) (case 41) #792 harness is outside my scope.
    • Test depth: I counted facts and read assertions for Blockers.cycles, but did not run or mutate tests; I do not know coverage or deep-graph behavior (Tarjan recursion depth, SDD DFS blow-up, glob worst case are read-only inferences).
    • Not read in detail: board-drift-observer.py, board-currency-rules.py, Governance Calibration, EvidenceReuse/VerdictReuse, Coordination Core/Orchestration.fs, Execution.Processes, and the Quint models under docs/quint and Coordination eng/. Calibration and verdict-reuse may hold additional threshold or invalidation logic.
    • Licensing/provenance: all rows are first-party FS.GG code, but ADR-0017 and licence headers for harvest into a nuget.org package were not checked. FsQuint's NOTICE.md was not read.
    • Fable portability: none of the F# candidates were checked for Fable compatibility (several use System.Collections.Generic.Dictionary, Stack, bigint; the bigint and Checked arithmetic uses may need review).
    • Product-skill audience: I judged game relevance from algorithm shape, not from any existing template usage; whether the templates already carry their own copies (e.g. in fs-gg-fable-game) is outside this scope.
  3. EHotwagner commented on Nov 1, 2026

    @EHotwagner
    ContributorAuthor

    Root/fdev analyst (games & netcode repos): inventory for ALGO-01.1 (#5223) under Outcome #5222. Analysis only; nothing modified, nothing filed, no packet.

    Scope and method. Shallow clones of default branches taken 2026-11-01 into ~/.fsgg-scratch/algo-inv-2/. Commits read: RuneScape 494e32f (main), SC2.Client c1e67cd, FSBarV2 f59c886, FourD 4d4909a, Unity.Client af04307, Net 3b24190. The RuneScape controller-arbitration code is NOT on main: it lives on open PR #14 (branch routine/rs-01-3-control, head 5905ac9), so rows citing it are tagged @5905ac9 (PR #14, unmerged).

    Private-repo constraint. RuneScape, SC2.Client, FourD and Unity.Client are PRIVATE; FSBarV2 and Net are public. This comment carries paths and descriptions only, no source. A nuget.org library or a product-workspace knowledge pack is public, so harvesting from a private repo needs an explicit owner decision on re-publishing that code. I treat every "harvest" below as conditional on it. "External, not harvestable": RecoilEngine and HighBarV3 (third-party C++ forks), excluded.

    Test-style note (applies to the Tested column). None of these repos uses FsCheck or Hedgehog. RuneScape, FourD and SC2 use hand-rolled harnesses or fixtures. RuneScape's one "property" is a seeded System.Random invariant run. Net and Unity use Expecto or xUnit-style example cases. No repo has BenchmarkDotNet or any algorithm benchmark (the only "bench" files are a RuneScape browser render spec and FourD browser/startup measurement scripts), so Benched is "no" throughout. All of it would need the #761/#792 harness before admission.

    1. Inventory

    Technique Repo:path@commit Kind Tested (property or unit, which) Benched? Reusable beyond its game? Fable-portable? Recommendation Notes
    A* over a collision grid: 8-direction, Chebyshev heuristic, bounded search window (max reach), goal tolerance, typed failures (blocked destination, different plane, unreachable), waypoint thinning RuneScape:src/FS.GG.RuneScape.Bots/Pathfinding.fs@494e32f pathfinding Unit, example-based: wall with one gap, legal steps, the three failure kinds, tolerance, waypoint spacing (tests/FS.GG.RuneScape.Bots.Tests/PathTests.fs). No property test; no BFS-optimality comparison No Yes once the flag test is abstracted to a walkability predicate Partial: uses PriorityQueue, Dictionary and struct tuples; heap needs a Fable-friendly replacement Harvest into library + entry The named seed. Single-plane only: a different plane is a typed failure, so there are no stairs or plane transitions. The "optimality against BFS" property named in the Outcome does not exist yet and must be written
    Collision flags, diagonal-clipping step rule, zone-chunked (8x8) flag store, door index with a mask-at-load and a per-session re-close overlay RuneScape:src/FS.GG.RuneScape.Bots/Collision.fs@494e32f spatial structure, grid movement rules Unit: wall blocking, diagonal clipping, null zone, door masking/blocking, one-way doors (PathTests.fs) No The door-overlay and zone-chunk ideas yes; the flag constants are the rsmod and rs-sdk bit layout No (mutable Dictionary, locks) Entry only (door-as-overlay, per-session blocks), plus a generic zone-chunked grid if wanted Entanglement: flag values mirror the vendored rsmod pathfinder (MIT, Lost City); docs/THIRD-PARTY-NOTICES.md carries the notice. Real collision data is never committed (eng/check-no-assets.py enforces it), so only synthetic-tile tests are harvestable
    Controller arbitration: priority bands (human over AI over script), pre-emption with suspend and resume, token-bucket submit rate limit, per-controller queue and action budgets, cancel-all semantics, bounded duplicate-id memory RuneScape:src/FS.GG.RuneScape.Bots/Arbitration.fs@5905ac9 (PR #14, unmerged); decision docs/decisions/0002-controller-arbitration.md arbitration / scheduling Seeded randomized invariant test, 400 runs (one active goal, order rules, human never ended by a lower kind, cancel permissions) in tests/.../ControlTests.fs, plus example cases. Hand-rolled, not FsCheck No Yes: pure state-machine step function, no game types in the rules Likely (pure, ms integers, lists/maps); not verified Harvest into library + entry after PR #14 merges Strongest "decision making" seed after A*. Port the invariant run to FsCheck for admission
    bot { } computation expression: every bind checks cancellation, pre-emption and deadline; tick-budgeted waits; failure ADT with retryable vs final classification RuneScape:src/FS.GG.RuneScape.Bots/Bot.fs@494e32f behaviour model / combinators Unit via the simulator (tests/.../SimTests.fs, 617 lines) No Pattern yes; implementation is Task-based and tied to IBotIo No (Task, threading) Entry only Design rationale in docs/decisions/0001-bot-behaviour-model.md and docs/BOTS.md. Not a classic behaviour tree: it is a monadic goal runner
    Policy driver: pure Observe/Decide split from IO Execute, bounded consecutive and per-step failure counters (catches alternating fail/succeed livelock), persistence window before a Blocked decision ends a goal, death/respawn handling RuneScape:src/FS.GG.RuneScape.Bots/Behaviour.fs@494e32f decision making / recovery Unit: replay of recorded decision fixtures (tests/.../DecisionTests.fs, fixtures/woodcutting-decisions.jsonl) No Yes as a pattern; the decision core is pure Core: likely; driver: no (Task) Entry only; consider harvesting just the pure retry/livelock accounting Good bridge toward utility-AI/FSM entries
    Effect-proof and reconciliation: plan from one fresh snapshot, baseline at ack, prove the effect from later state, uncertain-dispatch ledger with a settle window, never blind re-send, convergent (idempotent) actions RuneScape:src/FS.GG.RuneScape.Bots/Act.fs, Bot.fs (Uncertainty, Proof types), Actions.fs@494e32f; fault-injecting simulator Simulation.fs distributed-systems reliability pattern Unit: fault matrix in SimTests.fs (lost ack, delayed effect, link drop, pre-emption, stale snapshot, no-phase failure) No Yes (any command-then-observe client) No (Task, IO seam) Entry only Valuable as a pattern entry. The SimIo fault-injection idea is also worth a separate testing-technique entry
    Structured trace with secret-name redaction and "untrusted text" labelling RuneScape:src/FS.GG.RuneScape.Bots/Trace.fs@494e32f observability Unit (TraceTests.fs) n/a Yes, but not an algorithm No Leave Out of ALGO taxonomy; maybe a note in an existing logging skill
    Nearest-location queries: squared-distance ordering with a heavy other-plane penalty and a deterministic tiebreak, done in SQL over banks and spawns RuneScape:src/FS.GG.RuneScape.Knowledge/KnowledgeDb.fs@494e32f (NearestBanks, NearestLocs, NearestPlace) spatial query Unit against a generated DB (tests/FS.GG.RuneScape.Knowledge.Tests/Program.fs: nearest bank, ordered top-3, other-plane) No The idea yes; the implementation is a full scan inside SQLite, no spatial index No (SQLite) Entry only, flagged as a baseline for a k-d tree or spatial-hash entry Data is RuneScape game data generated at build time. Tests depend on that data, so only the technique is harvestable
    Name resolution: id then config name then display name then FTS5 candidates, returned as Exact / Ambiguous / Fuzzy / NoMatch so a caller can never silently take the first of several matches; FTS query sanitising and word cap RuneScape:src/FS.GG.RuneScape.Knowledge/KnowledgeDb.fs and Knowledge.Model/Types.fs@494e32f search / disambiguation Unit, including seven same-named items and five same-named NPCs (Knowledge.Tests/Program.fs) No The tagged-result idea yes; search itself is delegated to SQLite FTS5 and bm25 rank No Entry only (small, about tagged resolution results) There is no in-house fuzzy matching (no edit distance or trigram). If a pure fuzzy matcher is wanted for the pack it must be written, not harvested
    Frontend BFS "current path" for display, ignores directional walls RuneScape:src/FS.GG.RuneScape.Frontend/Pathing.fs, Collision.fs@494e32f pathfinding (display estimate) none found No Weak Intended for the browser Leave Superseded by the Bots A*; its own header says it is not the server route
    Weighted Dijkstra reachability and shortest path on a 4D cell grid with an expansion budget, explicit budget-exhausted result, deterministic tie order (cost, insertion order, cell) FourD:src/FS.GG.FourD.Core/Kernel.fs@4d4909a (Movement module) pathfinding / reachability Unit with an independent tiny-map oracle: the oracle enumerates simple routes from raw fixture data without calling production code and compares route and cost (tests/FS.GG.FourD.Kernel.Tests/*Fixtures.fs, docs docs/FOURD-01.1.md) No (only coarse browser timing in docs/evidence/FOURD-01.5a-measurement.json) Yes: generic over a transition function; the 4D cell type is incidental Likely: the product runs in the browser on the shared Fable foundation (docs/FABLE-ADOPT-01.5.md, Fable.Core referenced by the kernel tests); I did not confirm this module compiles Harvest into library + entry Frontier is a list re-sorted on every pop, so complexity is poor: swap for a real heap on harvest and re-run the oracle. This is the only pathfinder in scope that already has a differential oracle
    Exact-rational segment-versus-box (slab) intersection in 4D with bigint arithmetic, face attribution, multi-blocker ray scene with sorted hits and range checks FourD:src/FS.GG.FourD.Core/Geometry.fs@4d4909a computational geometry / ray casting Unit with an independent oracle fraction implementation (GeometryFixtures.fs) No Yes: n-dimensional AABB segment test with exact arithmetic; nothing game-specific Probably (bigint is supported by Fable, cost unmeasured) Harvest into library + entry Possible overlap with fs-gg-collision for the 2D/3D case; entry should cover the exact-arithmetic variant
    Visibility by multi-sample rays from soldier eye to cell sample points, with exposure fraction FourD:Geometry.fs (Visibility, TargetSamples)@4d4909a visibility Unit (GeometryFixtures.fs, EvaluationFixtures.fs) No Moderate As above Entry only; relate to fs-gg-visibility Sampling pattern is the novelty
    Budgeted tactical AI: enumerate shot and move candidates, expansion and destination budgets with a Complete versus BudgetLimited disposition, per-W-layer representative retention, deterministic tie string FourD:src/FS.GG.FourD.Core/TacticalAi.fs@4d4909a; SkirmishAi.fs (a commitment/pressure rule policy) decision making / bounded search Unit fixtures (OpponentFixtures.fs, SkirmishAiFixtures.fs) No The budget-disposition idea yes; scoring is game-specific Likely Entry only Closest thing to GOAP/utility scoring found; small (88 lines)
    Simultaneous-commitment turn resolution and replay canonicalisation FourD:Commitment.fs, Pressure.fs, SkirmishResolution.fs, Replay.fs, SkirmishReplay.fs@4d4909a game rules / deterministic replay Unit and retained saves (tests/retained-saves) No Rules are game-specific; canonical-replay approach is reusable Likely Leave (maybe one replay-determinism entry) Mostly rules, not classic algorithms
    Revision-monotonic delta publication, bounded pending queue that coalesces to a full snapshot when saturated, ack pruning that cannot discard newer deltas, reconnect ticket with identity, token and expiry window Net:src/FS.GG.Net.Core/Delivery.fs@3b24190 netcode: delta/snapshot delivery, reconnect Unit (Expecto): delayed ack, saturation coalescing, reconnect validation, dispose (tests/FS.GG.Net.Core.Tests/DeliveryTests.fs). No property tests No Yes: pure state machine, generic in delta and snapshot types Likely (pure; .fsi present; the Core project also holds Task transports, so split needed) Harvest into library + entry (or leave in FS.GG.Net and index it; ownership question for the ADR) Public repo, no entanglement. It is already a published package line, so duplicating it into an algorithms library is wasteful: an index entry that points to FS.GG.Net may be better
    Sequential and multiplexed request/response channels: monotonic ids, waiter map, correlation mismatch detection, bounded channel backpressure Net:src/FS.GG.Net.Core/Core.fs; src/FS.GG.Net.WebSocket/WebSocket.fs@3b24190 netcode: request correlation, backpressure Unit and integration (ChannelTests.fs 477 lines, tests/FS.GG.Net.Integration.Tests) No Already a reusable library No (Task, sockets) Leave (maybe an index entry) Net contains NO client-side prediction, rollback, interpolation, snapshot delta compression or lag compensation. Those techniques do not exist anywhere in scope, so they would be new work, not harvest
    Browser state: baseline then delta, base-sequence gap detection triggering a resync request, stale-context rejection, removal by lifetime generation Unity.Client:managed/BrowserContract.FSharp/BrowserState.fs@af04307 netcode: baseline/delta reconciliation Unit vectors, run under .NET and under Fable (ContractVectors.fs, tests/browser-contract-fable/) No Yes: contract-agnostic apart from message shapes Yes, proven (Fable vector run in-repo) Entry only (pattern), or harvest a generalised core Pairs naturally with the Net Delivery row as the receive side of the same protocol
    Bounded FIFO with a per-tick drain cap; entity reference = (server epoch, id, generation) to reject stale handles Unity.Client:native/Core/BoundedDispatchQueue.cs, EntityReference.cs@af04307 queueing / handle validity Unit (tests/native/*Tests.cs) No Yes n/a: C#, not F# Entry only C# and Unity-engine adjacent; the stubs under tests/unity-api-stubs keep Unity code out of the tests. Generation-checked handles are the notable technique
    Bresenham line of sight on a grid; reference server rules (range, cooldown, capture ticks) Unity.Client:native/ReferenceGame/TacticalMap.cs, ReferenceServer.cs@af04307 LOS, game rules Unit No Covered by fs-gg-line-drawing and fs-gg-visibility n/a (C#) Leave Reference game for a Unity qualification; Unity assets or licences are not committed (admission doc docs/admission/nebulous/2026-09-30-nebulous-admission.md)
    Bounded command queue with an authority gate (slot ownership, admin only when hosting), drained in capped batches FSBarV2:src/Broker.Core/CommandPipeline.fs, src/Broker.Protocol/BackpressureGate.fs@f59c886 queueing / admission Unit (tests/Broker.Core.Tests/CommandPipelineTests.fs) No Pattern yes; thin wrapper over System.Threading.Channels No (Channels) Entry only, one shared "bounded queue + backpressure" entry across BAR, Unity, Net and SC2 Public repo. Wire types come from the HighBar proto (third-party, excluded)
    Live-slice decode with limits: JSON observation decoder with escape handling, max frame bytes and max entities from the bootstrap; unit and feature bounds for hit-testing (paint order, centre-plus-radius rectangle, box vs ellipse) FSBarV2:src/Broker.Browser.Render/BarObservationJson.fs, BarScene.fs@f59c886 parsing / hit-test bounds Unit and Playwright (tests/Broker.Browser.Render.Tests) No No: protocol decode and display geometry Yes (it targets the browser) Leave No pathfinding, no AI and no strategy code exists in FSBarV2. The roadmap explicitly forbids inferring map scale or pathfinding from screen bounds
    Stale-frame admission (max frame age, monotonic-clock regression check), cumulative stream positions, input sequence high-water fence, 256 pending-input bound, 4 MiB metadata budget SC2.Client:src/SC2.Client.Contracts/RealtimeContract.fs, src/SC2.Client.Browser/InputSequence.fs, MetadataBudget.fs@c1e67cd netcode-adjacent admission Unit (tests/SC2.Client.Gateway.Tests/Program.fs, Contracts and Native tests) No Pattern yes; constants are product-specific Contract vectors exist under Fable (tests/SC2.Client.Contracts.Tests/Fable) Entry only (stale-snapshot admission) Private. SC2 native assets are kept out of the repo by design (README)
    Guest-mediated selection, production placement routing, tactical map markers SC2.Client:src/SC2.Client.Browser/Tactical.fs, ProductionRouting.fs, ProductionState.fs; src/SC2.Client.Contracts/TacticalContract.fs, ProductionContract.fs@c1e67cd UI/protocol validation Unit and browser No No Partly Leave On inspection this is validation of a selection or move intent returned by a WASM guest, plus input routing. I found no selection-box, placement-search, build-order or tactical-evaluation algorithm. The "production placement" is a click-routing mode, not a placement solver

    2. Top 10 seed candidates (value and readiness, in order)

    1. RuneScape A with collision rules* (Bots/Pathfinding.fs, Collision.fs@494e32f). Named in the Outcome; clean typed failures. Gap: BFS-optimality property and a Fable-friendly heap.
    2. FourD weighted reachability and shortest path with budget (Core/Kernel.fs@4d4909a). Only pathfinder with an independent oracle; Fable plausible. Gap: list-sorted frontier.
    3. RuneScape controller arbiter (Bots/Arbitration.fs@5905ac9, PR [registry] Flip governance-overlay-populated → coherent (P3 gate set + P4 overlay delivered) #14). Pure, invariant-tested; blocked on merge of PR [registry] Flip governance-overlay-populated → coherent (P3 gate set + P4 overlay delivered) #14.
    4. Net delta/snapshot delivery with coalescing and reconnect (Net.Core/Delivery.fs@3b24190). Public, pure, tested. Ownership decision: library vs index entry pointing at FS.GG.Net.
    5. FourD exact segment-vs-AABB (slab) ray cast with bigint (Core/Geometry.fs@4d4909a). Oracle-tested and generic.
    6. Unity baseline+delta with sequence-gap resync (BrowserState.fs@af04307). Fable-proven; completes the netcode story with item 4.
    7. RuneScape policy driver (Behaviour.fs@494e32f): Observe/Decide/Execute with livelock-safe retry accounting; fixture-replay tested.
    8. FourD budgeted tactical AI (TacticalAi.fs@4d4909a): bounded search with an explicit Complete/BudgetLimited result.
    9. RuneScape effect-proof and reconciliation with fault-injection simulation (Act.fs, Simulation.fs@494e32f): pattern entry, strong test matrix.
    10. Bounded queue and backpressure family (BAR CommandPipeline.fs, Unity BoundedDispatchQueue.cs, Net WebSocket.fs, SC2 MetadataBudget.fs): one cross-repo entry; plus RuneScape nearest/Exact-Ambiguous-Fuzzy resolution as the first runner-up.

    Counts toward the Outcome's 15-entry floor: these ten, plus visibility-by-sampling (FourD), nearest query baseline and tagged name resolution (RuneScape Knowledge), stale-frame admission (SC2) and door-overlay collision (RuneScape) give about 14 from this slice alone; the remainder is expected from the grids, collision, line-drawing and visibility skills and FS.GG.Game.

    3. Unknowns

    • Visibility policy. Whether code from private repos (RuneScape, FourD, SC2.Client, Unity.Client) may be republished in a public nuget.org package or a scaffolded product pack. Owner decision; I assumed nothing.
    • RuneScape PR [registry] Flip governance-overlay-populated → coherent (P3 gate set + P4 overlay delivered) #14 (arbitration) is open and unmerged; its content may change in review. RuneScape local checkout was one commit behind origin; I used the fresh clone.
    • Fable status is asserted from in-repo proofs only for FourD (compile target), Unity BrowserState and SC2 contract vectors. I did not run any Fable build. PriorityQueue support in Fable is unverified for the RuneScape A*.
    • Overlap with FS.GG.Game is unchecked: FS.GG.Game/tests/Game.Core.Tests/AiTests.fs and HexTests.fs show it already has some AI and grid code, and its four algorithm skills were not read by me. Entries here should be reconciled against it before the ADR fixes the seed list.
    • Licences: RuneScape collision flag values derive from the rsmod pathfinder and rs-sdk (MIT, Lost City; notice in docs/THIRD-PARTY-NOTICES.md); FourD, SC2.Client and Unity.Client licence terms were not found in the paths I read.
    • Not found at all in these repos: client-side prediction, rollback, interpolation, snapshot delta compression, lag compensation, MCTS, minimax, HTN, GOAP, influence maps, k-d trees, spatial hashing, JPS, flow fields, and any BAR or SC2 AI. The netcode technique entries would be new implementations, not harvests.
    • Performance: no numbers exist anywhere for these algorithms; admission needs the the corpus case 41-residue-and-full-queue is FLAKY in CI — it exits 5 at random, and a gate that fails randomly teaches people to re-run it #761/fix(engine): next/take name the observed reason, not a guessed list of causes (#440) (case 41) #792 harness.
  4. EHotwagner commented on Nov 1, 2026

    @EHotwagner
    ContributorAuthor

    Root/fdev decision on the analysts' open question (private-repo content in a public package or pack). FS-GG owns the code in its private repositories.

    • Allowed: generic algorithm code authored by FS-GG may be re-implemented in the public ALGO library and described in the public pack. Examples: A*, budgeted Dijkstra, the exact-rational segment/box ray cast, arbitration and priority banding, effect-proof and reconciliation patterns, and the delta/snapshot delivery state machine.
    • Forbidden in public artefacts:
      • game data, asset- or cache-derived values, or game-specific constants (for example RuneScape collision flags as data, coordinates, ids);
      • code derived from third-party upstreams (rs-sdk or LostCity, RecoilEngine, HighBarV3) unless its licence allows it and the notice is carried. MIT rs-sdk code is allowed only with its notice; prefer clean re-implementation;
      • any private repository's non-algorithmic product code.
    • Harvest is a clean, generic re-implementation with its own tests, not a copy-paste of game modules. Entries may cite a private repo path, but the pack must not reproduce private source.
    • Licences: where a repo's licence is unknown (FourD, SC2.Client, Unity.Client), FS-GG authorship is the basis. The ADR records the rule.
  5. EHotwagner commented on Nov 1, 2026

    @EHotwagner
    ContributorAuthor

    Root/fdev analyst (engine & product repos): inventory of FS.GG.Game, FS.GG.Rendering, FS.GG.Audio and FS.GG.Templates for ALGO-01.1 (analysis only; nothing modified).

    Evidence base: origin/main read with git show/git grep after git fetch (refs only). The local Game checkout (detached d602c2d) and Templates checkout (detached d867ea9) are behind origin, so I did not use their working trees. Atlas consulted first: game/core-host-and-portable-profile (Core publishes a curated Fable subset), contract/game-sim-core, contract/game-physics-box2d; both confirmed against source. Test counts are grep approximations (FsCheck = testCase ... (FsCheck)/Check. hits).

    Legend. G = FS-GG/FS.GG.Game@eb48a19 (GC/ = src/Game.Core/, GH/ = src/Game.Harness/). R = FS-GG/FS.GG.Rendering@2d35dc9. A = FS-GG/FS.GG.Audio@8ce4f33. T = FS-GG/FS.GG.Templates@858b624. Fable column is the grade in GC/Fable/compatibility-profile.v1.json: LE LockstepExact, Port compiles in the curated Fable view with no byte promise, Unc in the Fable view but Unclassified, .NET DotNetOnly. Tests live in G:tests/Game.Core.Tests/ unless stated.

    1. Technique inventory

    Technique Repo:path@commit Kind Tested? Benched? Reusable beyond its game? Fable Recommendation Notes
    A* (4/8-way, integer 14/10 octile, total key (f,h,Col,Row), maxVisited) G:GC/Pathfinding.fs (997 lines) both (code + fs-gg-game-core Pathfinding section) PathfindingTests.fs: 86 tests, ~40 FsCheck (determinism, differential vs other searches, int64 overflow) No (node-count assertions only) Yes: walkability predicate is the map LE (astar only) Harvest + entry Already consumed by T:templates/fs-gg-fable-game/Domain/Room.fs and Client/Movement.fs. I did not find an explicit A*-vs-BFS cost property; the closest are astar vs distanceField cost and the jps/ALT/astarStraight differentials.
    BFS (hop-minimal) G:GC/Pathfinding.fs bfs both PathfindingTests.fs (hop-minimal unit, determinism FsCheck) No Yes Unc Harvest + entry (oracle for A* property) Cheapest oracle for the ALGO-01 admission property.
    Jump Point Search G:GC/Pathfinding.fs jps both PathfindingTests.fs: golden, FR-006 hotspot (#492), FsCheck differential vs astar (cost, validity, reachability) Partial: pops-fewer-nodes assertion, no timing Yes (uniform-cost grids only) Unc Harvest + entry Same-cost not same-cells vs astar, documented.
    ALT landmark A* (farthest-point landmarks) G:GC/Pathfinding.fs Landmarks both PathfindingTests.fs: admissibility + differential FsCheck, "expands strictly fewer nodes" (FR-006) Partial (node counts) Yes Unc Harvest + entry
    Straighter-path tie-break (astarStraight, integer cross product) G:GC/Pathfinding.fs both PathfindingTests.fs: golden + FsCheck (deviation never worse) No Yes Unc Entry (variant of the A* entry)
    Any-angle string-pull smoothing G:GC/Pathfinding.fs smooth both FsCheck (subsequence, LOS-clear, never longer) No Yes Unc Harvest + entry Needs Los.
    Dijkstra map / flow field (multi-source distanceField, flowField) G:GC/Pathfinding.fs both ~10 FsCheck (agrees with astar, downhill always arrives, byte-identical) No Yes Unc Harvest + entry Flee field is a documented composition.
    Weighted move range (reachable + pathTo, reachableWithin, budgetFor) G:GC/Pathfinding.fs both FsCheck (path cost = highlight, within budget) No Yes (tactics) Unc Harvest + entry Documented silent-units trap (baseStep).
    Connected-component early-out (Regions) G:GC/Pathfinding.fs both golden + FsCheck vs astar reachability No Yes Unc Entry (+ harvest)
    Hex grids (cube coords, range/ring/spiral, line, offset/doubled, BFS/A*) G:GC/Hex.fs (336) both (fs-gg-grids) HexTests.fs: 22 tests, ~24 FsCheck No Yes .NET Harvest + entry Red Blob Games reference; code original.
    Thin-wall edge graph (edge-canonical walls, edge A*/BFS) G:GC/Edges.fs (236) both EdgesTests.fs: 9 tests, ~8 FsCheck No Yes LE (edgeBetween); rest Unc Harvest + entry
    Grid parts (face/edge/vertex, pixel map, disc/ring templates) G:GC/Grids.fs (256) both GridsTests.fs: 39 tests, ~11 FsCheck No Yes .NET Entry (fold into grids umbrella) Overlaps Edges.fs: two independent Edge/Vertex models (Grids.Edge, Edges.Edge).
    Bresenham line + supercover + symmetric LOS G:GC/Los.fs (99) both LosTests.fs: 19 tests, exhaustive small-grid symmetry, goldens; FsCheck thin No Yes LE (lineOfSightBy) Harvest + entry Red Blob line-drawing reference. DDA is not separately implemented; supercover is the DDA-family walk.
    Symmetric shadowcasting FOV G:GC/Fov.fs (138) both FovTests.fs: 16 tests, ~3 FsCheck (symmetry) No Yes .NET Harvest + entry Ford/Milazzo algorithm cited; integer rationals. Float-free so a Fable grade is plausible.
    Continuous visibility polygon (angular sweep) G:GC/Visibility.fs (384); also GH/VisibilityPolygon.fs; also R:template/fragments/visibility/src/Product/Visibility.fs (308) both VisibilityTests.fs: 31 tests, ~10 FsCheck; G:tests/Game.Harness.Tests/VisibilityPolygonTests.fs No Yes .NET Harvest Core version; entry notes the two older copies Three implementations of the same sweep (Core promoted, Harness float staging, Rendering frozen fragment). Red Blob reference.
    Uniform spatial hash grid, broad-phase, radius/bounds query G:GC/SpatialGrid.fs (236) both (fs-gg-collision, fs-gg-game-core) SpatialGridTests.fs: 20 tests, ~6 FsCheck (exact, insertion-ordered) No Yes Port Harvest + entry k-d tree, quadtree, BVH: none in scope.
    Narrow phase: SAT, AABB/circle/OBB manifolds, face clipping, segment hits, swept AABB G:GC/Geometry.fs (706) both GeometryTests.fs: 97 tests, ~28 FsCheck No Yes Port Harvest + entry
    Kinematic continuous move (slide/bounce/trigger, thin-wall) G:GC/Kinematics.fs (294) both KinematicsTests.fs: 6 unit tests No Yes LE (op 8 path), rest Port Harvest later (thin test) + entry Used by T:Domain/ArenaContent.fs, Domain/ArcadeRules.fs, SvgFoundation/ContinuousPlayer.fs.
    Arcade resolution (pushOut, slide, grid push) G:GC/Resolution.fs (85) both ResolutionTests.fs: 30 tests, ~5 FsCheck No Yes Port Entry
    Mini rigid-body engine (semi-implicit Euler, sequential impulse, warm start, sleeping, speculative contacts, FNV-1a checksum) G:GC/Physics.fs (1466) both (fs-gg-physics) PhysicsTests.fs: 84 tests, ~2 FsCheck, goldens No (the only perf artifact is Box2D portals, below) Medium (game-sim shaped) .NET Entry; library later Own implementation. No attribution header to Box2D-Lite or other sources (only comments contrasting with Box2D). Provenance not independently verified.
    Box2D integration pattern (headless fixed-tick adapter, entity-ID mapping, immutable snapshots) G:src/Game.Physics.Box2D/Runtime.fs, AreaRuntime.fs; examples/Box2D.Headless both tests/Game.Physics.Box2D.Tests: RuntimeTests.fs, AreaRuntimeTests.fs Yes: G:docs/reports/game-portal-p3-performance-20261010.json Yes as a pattern .NET (native) Entry only (leave code) Third-party dependency Box2D.NET 3.1.654 (ikpil's C# port of Erin Catto's Box2D v3, MIT), referenced as a package, not copied. Core's Fable list excludes it.
    Area portals / cross-area transfer G:GC/AreaTopology.fs (163) code (+docs/roadmaps/game-area-portals.md) AreaTopologyTests.fs: 9 Portal perf report above Medium .NET Leave
    Ballistics (swept cast, lead/intercept solve, splash falloff) G:GC/Ballistics.fs (188) both BallisticsTests.fs: 32 tests, ~7 FsCheck No Yes .NET Entry
    Fixed-timestep accumulator + double step buffer + alpha interpolation G:GC/FixedStep.fs, GC/Loop.fs; Physics.interpolate; AreaPhysics.interpolate both (fs-gg-physics, fs-gg-game-core) FixedStepTests.fs 18, LoopTests.fs 19 (~4 FsCheck) No Yes .NET (float seconds) Harvest + entry Spiral-of-death clamp, never feed alpha back. Highest-value scheduling/interpolation entry.
    Deterministic replay: recorder, checkpoints, seek, divergence report, canonical export; session runtime with integer-microsecond host clock G:GC/Replay.fs (323), GC/SessionRuntime.fs, GC/NetworkSession.fs both (fs-gg-replay, fs-gg-game-fable) ReplayTests.fs 5, NetworkSessionTests.fs 4, SessionContractTests.fs 11; cross-runtime fixtures tests/Game.Core.Fable.Tests No Yes LE Entry (code stays in Core) Thin unit tests relative to size. Lockstep entry.
    Fixed-point arithmetic none n/a n/a n/a n/a n/a Gap Physics.fsi says cross-platform lockstep "needs fixed-point, which is a later, ADR'd decision". Integer-only searches/FOV/LOS substitute for it.
    SplitMix64 RNG with split sub-streams G:GC/Rng.fs (57) both RngTests.fs: 14 tests, ~2 FsCheck No Yes .NET Harvest + entry Steele/Lea/Flood cited; nextInt modulo bias documented. Integer-only, so a good Fable-portable candidate.
    Dice distributions (convolve, advantage, exact moments) G:GC/Dice.fs (123) both (fs-gg-effects) DiceTests.fs: 9 tests, ~4 FsCheck No Medium .NET Entry
    Procedural generation: cellular-automata caves, BSP dungeon, maze, room-graph floors, value-noise fBm heightfield, Bridson Poisson-disk G:GC/MapGen.fs (875) both (fs-gg-mapcraft) MapGenTests.fs: 28 tests, ~21 FsCheck (seed byte-identity) No Yes .NET Harvest + entries Noise is value noise (hashed lattice + bilinear), not Perlin or simplex; no simplex or Voronoi.
    Map analysis: flood reachability, Tarjan articulation points, diameter, exposure/cover/killzones, validation rules G:GC/MapAnalysis.fs (432) both (fs-gg-mapcraft) MapAnalysisTests.fs: 29 tests, ~21 FsCheck No Yes .NET Harvest + entry
    AI decision fields: influence/threat maps, flee field, fog-limited perception with ghosts, difficulty knobs, identity-keyed sub-streams G:GC/Ai.fs (374) both (fs-gg-ai) AiTests.fs: 47 tests, ~7 FsCheck No Yes .NET Entry; harvest influenceMap By design no behaviour trees, utility AI or GOAP (docs/reports/2026-07-10-ai-decision-layer-design.md section 6).
    Damage mitigation pipeline + status stacking G:GC/Effects.fs (219) both (fs-gg-effects) EffectsTests.fs: 66 tests, ~3 FsCheck No Medium (rules shaped) .NET Entry only
    Game-state search / shrinking: BFS witness script (Explore.findScript), seeded property check with counterexample shrinking, bot combinators G:GH/Explore.fs, GH/Properties.fs, GH/Bots.fs both (fs-gg-playtest) ExploreTests.fs, PropertiesTests.fs, BotTests.fs in tests/Game.Harness.Tests No Harness-bound .NET Entry only
    Work-unit workload budgets (deterministic counts of AI/perception/pathfinding units; wall-clock separate) G:GH/Workload.fs both tests/Game.Harness.Tests/WorkloadTests.fs Counts, not timing Yes as a pattern .NET Entry Candidate for the library's bench-evidence format.
    Render bench harness (draw calls, frame time, GPU timer queries, ABBA repeats) G:tools/render-bench/driver.mjs, tests/Render.Browser.Bench/; baselines tools/render-bench/baselines/fdev-2026-11-01-*.json both selftest/validate in driver Yes (it is the bench) Via #792 (open) Fable runner Entry; see Unknowns #761 is a rendering harness, not an algorithm micro-bench.
    Viewport culling / spatial working set (chunk index, overscan, pinned ids) R:src/Scene/SpatialWorkingSet.fs (233) both (fs-gg-svg-performance guidance) R:tests/Scene.Tests/SpatialWorkingSetTests.fs (no FsCheck found) Yes, one-off: R:readiness/svg-coherence-1469/Bench.fs, readiness/svg-coherence-1472/CreateBench.fs Yes (generic 'value) Included in the Scene Fable view (Fable-built) Harvest candidate + entry Public API in FS.GG.UI.Scene; relation to SpatialGrid (two spatial indexes) needs an ADR line.
    Retained-mode diffing, keyed VDOM reconcile, damage regions, picture-replay cache, idle frame cache R:src/Controls/Reconcile.fs (internal), RetainedRender.fs (1881), Internal/CompositorPolicy.fs, src/SkiaViewer/PictureReplayCache.fs, Host/FrameCache.fs implementation + features' tests R:tests/Controls.Tests: Audit_Reconcile.fs, Feature091/092/147-154/174 (parity, damage, work-reduction), Audit_PictureCache.fs RenderLagTrace.fs, PerformanceEvidence.fs exist; no numbers verified No: internal, Skia-bound Not Fable Entry only (leave) Records "reuse is byte-identical to full rebuild by construction". Good technique entry, not library material.
    Structural fingerprint / dirty tracking (FNV-1a over scene data; also Physics.checksum) R:src/Controls/Internal/Hashing.fs (33), Internal/SceneHash.fs; G:GC/Physics.fs checksum implementation covered by retained-render parity tests; Physics goldens No Yes as a pattern Hash is UTF-16/IEEE-bits specific Entry
    Easing, tween, keyframe clips (pure functions of elapsed time) R:src/Scene/Animation.fs (722) both feature tests in R:tests (Animation clock audit) No Yes Fable view Harvest candidate + entry Interpolation entry should link Loop.alpha.
    Layered DAG layout (memoised longest-path layering) R:src/Layout/Graph.fs (227) implementation none found in tests No Low no Leave
    Audio mixing: bus gain, linear fade/duck envelopes, inverse-distance attenuation, sine-azimuth pan A:src/FS.GG.Audio.Engine/Engine.fs (453), Core Audio.fs (97) both (fs-gg-audio, fs-gg-browser-audio) tests/FS.GG.Audio.Engine.Tests/EngineTests.fs: 29 tests, no FsCheck No (Stopwatch only for monotonic clock) Low Core has a Fable build; Engine does not Entry only There is no DSP in these repos (no filters, synthesis, resampling, FFT). Licence: FS.GG.Audio.Host redistributes OpenAL Soft (LGPL-2.0-or-later) per A:THIRD-PARTY-NOTICES.md, so nothing from Host/Engine should enter a shared MIT library.
    Template consumption (no original algorithms) T:templates/fs-gg-fable-game/Domain/Room.fs, Client/Movement.fs (astar), Domain/ArenaContent.fs, Domain/ArcadeRules.fs, SvgFoundation/ContinuousPlayer.fs (Kinematics.advance), Server/NetworkAuthority.fs, Domain/TacticalRules.fs (ReplayRecorder/seek) usage Server.Tests, Domain.Tests, Protocol.Tests/cross-runtime No n/a consumes LE surfaces only Source of "F# usage" snippets The template's template/skill-manifest/skill-manifest.json ships only Fable/Go/Node/Rust language skills; it carries no algorithm skill.

    Provenance and licence summary: every algorithm in G/R/A/T that I read is original F# with literature cited only as references (Red Blob Games for grids, line drawing, visibility and hex; Ford/Milazzo; Steele/Lea/Flood; Bridson; Goldberg-Harrelson ALT; Tarjan). Third-party code is only consumed as packages: Box2D.NET 3.1.654 (MIT), OpenAL Soft (LGPL, via Audio.Host), Noto Sans (OFL, T:SvgFoundation/THIRD-PARTY-NOTICES.md). I ran no text-similarity scan against external sources, so "original" is from header comments and history, not a clean-room check. The Red Blob skills carry links, not copied text.

    2. Existing algorithm product skills

    Two producers currently ship the four ids. The registry (.github:registry/skills.yml rows 202-205, @936283c0) names FS.GG.Rendering the owner, with Rendering's shas. FS.GG.Game's template/skill-manifest/skill-manifest.json @eb48a19 also carries all four with different bytes and (for collision) a different predicate.

    Skill R copy (registry owner) G copy (code-owning repo) Kind Materializes when
    fs-gg-grids R:template/product-skills/fs-gg-grids/SKILL.md, 190 lines, sha 9b1b2bd0. Describes face/edge/vertex over a product-owned adaptable Grids.fs (R:template/fragments/grids/src/Product/Grids.fs, 237 lines). G:template/product-skills/fs-gg-grids/SKILL.md, 336 lines, sha bda8b1bd, last 5605e6c (2026-07-21). Covers Grids, Hex, Edges and AoE templates in Game.Core. Both: guidance + adaptable source (R); guidance over a published package (G) profile in [game, sample-pack] (both)
    fs-gg-collision 357 lines, sha cf22a55d; adaptable Collision.fs (372 lines); includes pierce+prune combat resolution and slideCircle. 241 lines, sha 8bd79af6 (last bf9cbf7, 2026-07-10); narrow-phase manifolds + "write the SpatialGrid loop yourself" + Resolution Both R: profile in [game, sample-pack]; G: same or template == fable-game
    fs-gg-line-drawing 202 lines, sha b9b19b8d; adaptable LineDrawing.fs (114 lines) 195 lines, sha 822a6c42 (last 660ab80); Thin vs Supercover vs symmetric LOS in Los Both profile in [game, sample-pack]
    fs-gg-visibility 197 lines, sha 53f2657f; adaptable Visibility.fs (308 lines) 244 lines, sha bea49973 (last e6acfd8); sweep + Fov shadowcasting Both profile in [game, sample-pack]

    Neighbouring algorithm-bearing skills, all in G:template/product-skills/ (single SKILL.md each; owner fs-gg-game in the registry): fs-gg-game-core (888 lines: fixed step, RNG, collision, culling, pathfinding choice guide, spatial queries, dice, ballistics, AI pointers; the de facto umbrella today), fs-gg-ai (322), fs-gg-physics (309), fs-gg-ballistics (242), fs-gg-effects (475), fs-gg-mapcraft (362), fs-gg-replay (55), fs-gg-rules (52), fs-gg-game-fable (91, the lockstep profile), fs-gg-playtest (512), plus R fs-gg-svg-performance (27 lines, culling/retained-scene guidance) and A fs-gg-browser-audio (34).

    Recommendation: index, do not fold in.

    • The skills are 190-888 lines each, sha-pinned and registry-gated (registry = manifest = bytes), owner-sourced, and already link into each other with [[fs-gg-game:...]] references. Folding them moves ownership and forces new shas, re-seeds and registry migration for no knowledge gain. The umbrella fs-gg-algorithms entries should cite them by id and path and carry only the cross-cutting facts (taxonomy, complexity, bench numbers, when-not-to-use).
    • Before or inside this ADR, the duplicate ownership needs a decision. Game's copies are the current ones (Rendering's grids still teaches a product-owned Grids.fs while Core has shipped Grids/Hex/Edges), the code lives in Game.Core, and Rendering already retired its second copies of the four Game-migrated skills at P6 (.github#1862, FS.GG.Rendering#1147). The precedent points to retiring the Rendering copies and migrating the four rows to owner fs-gg-game. That is a proposal for the ADR owner to confirm with the Rendering owner; I made no change.
    • The new skill's materializes-when should say template == fable-game explicitly: G's grids, line-drawing and visibility rows are profile in [game, sample-pack] only (see Unknowns).

    3. Top 10 seed candidates (value and readiness)

    Readiness = tested implementation exists in reviewed code, Fable grade, and API stability.

    1. A* with BFS oracle: G:GC/Pathfinding.fs astar/bfs. LockstepExact, ~40 FsCheck, already used by the fable-game template. Ready now.
    2. Jump Point Search: same file. Differential property vs astar already exists; only a timing bench is missing.
    3. Dijkstra map and flow field (distanceField/flowField, plus reachable/pathTo as the tactics variant). Property-tested; many-agent use.
    4. Bresenham, supercover and symmetric LOS: G:GC/Los.fs. LockstepExact; exhaustive symmetry test.
    5. Symmetric shadowcasting FOV: G:GC/Fov.fs. Symmetry property; integer-only, Fable grade absent but plausible.
    6. Uniform spatial hash grid and broad-phase (SpatialGrid + Geometry narrow phase, swept AABB/SAT): G:GC/SpatialGrid.fs, GC/Geometry.fs. 28 + 6 FsCheck; Portable.
    7. Fixed-timestep accumulator, double buffer, interpolation: G:GC/FixedStep.fs, GC/Loop.fs. Covers the scheduling and interpolation topics.
    8. SplitMix64 RNG with splittable streams: G:GC/Rng.fs. Small, integer-only; needs a Fable grade.
    9. Procedural generation (CA caves, BSP dungeon, Bridson Poisson-disk, value noise): G:GC/MapGen.fs. Seeded byte-identity properties; several entries from one file.
    10. Hex grids and thin-wall edges: G:GC/Hex.fs, GC/Edges.fs. ~32 FsCheck combined; rounds out the grid taxonomy.

    Next tier (also ready): ALT landmarks, Regions early-out, astarStraight, smooth; Tarjan articulation and map analysis (MapAnalysis.fs); R:src/Scene/SpatialWorkingSet.fs (culling); R:src/Scene/Animation.fs easing/tween; visibility polygon (Core version); deterministic replay/lockstep (entry; Core code); Dice. That is 20+ candidates from my scope, so the "at least 15 entries" bar is reachable from G alone without Rendering, Audio or Templates code.

    4. Unknowns

    • Bench source for the admission bar. FS.GG.Game#761 (merged 2026-11-01) is the GPU rendering benchmark harness and fix(engine): next/take name the observed reason, not a guessed list of causes (#440) (case 41) #792 (open) is publishing its BenchGame runner. Both measure frame cost through SVG/Pixi/Babylon. Nothing in G measures an algorithm kernel (A*, FOV, spatial hash) in time; the existing evidence is deterministic node/work counts (PathfindingTests.fs, Workload.fs). The ADR must either define a micro-bench route (and where numbers are recorded) or state that library admission uses work-count evidence until one exists.
    • Which copy of the four skills reaches a scaffold. Registry shas follow Rendering; G's manifest ids collide. G's fs-gg-collision sha (8bd79af6) differs from the registry row (cf22a55d) and its predicate adds template == fable-game. I did not run fsgg-sdd scaffold; whether a fresh fs-gg-fable-game workspace (no profile) receives fs-gg-grids, -line-drawing or -visibility is unverified. The template repo's own manifest (T) contributes none.
    • Fable portability gaps. Only Pathfinding.astar, Los.lineOfSightBy, Edges.edgeBetween, Kinematics.advance (one path) and the session/replay/planning/network/save surfaces are LockstepExact. jps, fields, ALT, Regions, Fov, Rng, Hex, MapGen and FixedStep are Unc/.NET even where they use only integers. Promoting them is an unscheduled Game.Core decision.
    • Fixed-point and float determinism. No fixed-point library exists; float-based pieces (Physics, Ballistics, Visibility, Kinematics) are deterministic only on a fixed compiler and ISA per their own docs.
    • Physics.fs provenance. The mini rigid-body engine is original code with no attribution header; I did not verify derivation from Box2D-Lite or Catto's published solver notes. A harvest decision for it should be preceded by an author statement.
    • Test depth. FsCheck counts are greps. Replay/session (5-11 tests), Kinematics (6), Layout/Graph (none found), Animation and the retained-render bench numbers were not deeply verified. No A*-vs-BFS optimality property was found by name.
    • Duplicate implementations to reconcile in the entries: visibility (Core, Harness, Rendering fragment), edge/vertex vocabularies (Grids vs Edges), spatial indexes (SpatialGrid vs SpatialWorkingSet).
    • Outside my scope / not found here: HPA*, D* Lite, behaviour trees, HTN, GOAP, utility AI, minimax, MCTS, LP/ILP, annealing, GA, constraint solving, k-d trees, quadtrees and instancing/batching code do not exist in G, R, A or T (the AI design doc excludes BT/utility by decision). RuneScape A* with doors, FourD, SC2, BAR and Unity were not inspected (other analysts).
    • Semantic overlap. Existing prior art is G:docs/reports/2026-07-19-redblobgames-algorithm-incorporation-roadmap.md (a 12-candidate menu, Tier 1-3; JPS, Regions, ALT, astarStraight, Hex, smooth, Edges, visibility polygon and Dice are now implemented; all-pairs tables and a bucketed priority queue were left unbuilt, the latter by a "Set frontier is adequate" gate test). The ADR taxonomy should cite it rather than re-derive it. Sibling Deliveries ALGO-01.2 — Library seed tranche: tested F# implementations harvested from reviewed code #5224/ALGO-01.3 — fs-gg-algorithms product skill + knowledge pack, materialized into fs-gg-fable-game workspaces #5225/ALGO-01.4 — Growth loop: capture rule + product-workspace contribution route #5226 already carry seed, skill and growth-loop scope, so no new issue is proposed from this analysis.
  6. EHotwagner commented on Nov 1, 2026

    @EHotwagner
    ContributorAuthor

    Root/fdev algorithm survey (prior art): additional algorithms for ALGO-01.1 (#5223, Outcome #5222). Analysis only; nothing modified or filed.

    Method. I read #5222, #5223 and the three inventories: C (coordination and formal), N (games and netcode) and E (engine and product). Primary references and the licences of reference implementations were checked on 2026-11-01, using the GitHub licence API or the LICENSE file. Every row is to be summarised and cited, never copied.

    Legend.

    • Use: G = game workspace, F = framework.
    • Has?: "—" means no inventory found it. GC/ is FS.GG.Game src/Game.Core/.
    • Fable:
      • ok = pure integer F#.
      • heap = needs a library-owned priority queue (BCL PriorityQueue under Fable is unverified, N).
      • i64 = fable-library-js maps int64 to JS bigint (slow in hot loops).
      • flt = float output is deterministic only per compiler and ISA (E), so grade it Port, not LockstepExact.
    • Shorthand references: RBG = redblobgames.com; GAP = Game AI Pro (free chapters at gameaipro.com); AIMA = Russell & Norvig, 4th ed.; CLRS = 4th ed.; B&V = Boyd & Vandenberghe; S&B = Sutton & Barto, 2nd ed.; RTCD = Ericson, Real-Time Collision Detection.
    • Licence: "paper" means implement from the paper. A named licence applies only if we port that reference code, and its notice must be carried (owner rule above).

    Already covered, so harvest rather than reimplement (E, C):

    • A*, BFS, JPS, ALT, flow and Dijkstra fields, smooth, Regions, hex and edges;
    • Bresenham, supercover, shadowcasting and the visibility polygon;
    • spatial hash, SAT and manifolds;
    • cellular automata, BSP, maze, Poisson-disk and value noise;
    • influence maps, SplitMix64, fixed-step alpha and easing;
    • articulation points, Tarjan SCC, union-find and patience/LIS diff;
    • FourD's budgeted Dijkstra.

    1. Pathfinding and navigation

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Heap / indexed heap: library priority queue G,F: every search O(log n) No generic one. Game uses a Set frontier, FourD re-sorts a list, RuneScape uses the BCL heap (E, N) P1 ok CLRS ch. 6 paper
    HPA*: cluster/entrance abstraction, then refine G: large maps, RTS Queries about 10× faster than A*, within 1% of optimal — P1 heap Botea, Müller & Schaeffer 2004, webdocs.cs.ualberta.ca/~mmueller/ps/hpastar.pdf paper
    HAA*: HPA* plus clearance for unit sizes G As HPA* — P3 heap Harabor & Botea, CIG 2008 paper
    LPA* / D* Lite: incremental replanning G: destructible terrain, fog reveal Cost tracks the affected nodes — P2 heap + decrease-key Koenig & Likhachev, AAAI 2002 paper
    Theta* / Lazy Theta*: any-angle A* with parent-LOS checks G: natural paths A* × LOS; Lazy needs about 10× fewer checks Partial: post-hoc smooth (E) P1 heap; reuses Los Daniel et al., JAIR 39 (2010); Nash, Koenig & Tovey, AAAI 2010 paper
    Navmesh A* + Simple Stupid Funnel: polygon search, then portal string-pull G: continuous-space arena and svg games A* + O(portals) — (grid only) P1 heap, flt Mononen 2010, digestingduck.blogspot.com/2010/03/simple-stupid-funnel-algorithm.html Recast and DotRecast are Zlib
    Navmesh build: obstacle clipping and triangulation G O(n log n) — P2 flt de Berg et al., Computational Geometry ch. 3 Zlib (Recast)
    Flow-field tiles + portal graph G: thousands of units O(cells) per sector Partial: whole-map flowField (E) P2 ok Emerson, GAP 1 ch. 23 paper
    Contraction hierarchies G: world/road graphs; F: huge DAGs Heavy preprocess, µs queries — P3 heap Geisberger et al., WEA 2008 paper
    Bidirectional Dijkstra / A* G,F ~2·b^(d/2) — P3 heap Goldberg & Harrelson 2005 paper
    WHCA*: windowed space-time reservations G: unit traffic A* in (x, y, t) per agent — P2 heap Silver, AIIDE 2005 paper
    CBS: optimal MAPF over a conflict tree G: puzzles, squads Exponential in conflicts — P3 heap Sharon et al., AIJ 219 (2015) paper

    2. Steering and crowds

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Reynolds steering: seek, arrive, pursue, evade, wander, path follow, separation G O(k neighbours), via SpatialGrid — P1 flt Reynolds, GDC 1999, red3d.com/cwr/steer paper
    Boids, formations (slot-based) G O(n·k) — P2 flt Reynolds, SIGGRAPH 1987; Pottinger 1999 paper
    RVO / ORCA: reciprocal velocity obstacles, a 2D LP per agent G: dense crowds O(n·k) + small LP — P2 flt, order-sensitive van den Berg et al. 2011 (ISRR 2009), gamma.cs.unc.edu/ORCA RVO2 is Apache-2.0 (NOTICE)

    3. Decision-making

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    FSM / HFSM: nested states, entry/exit, guards G; F workflows O(depth) per tick No library. RuneScape arbiter is a state machine (N) P1 ok Millington & Funge, AI for Games ch. 5; Harel 1987 paper
    Behaviour tree + blackboard G O(visited nodes) — (excluded by Game AI design §6, E) P1 ok Isla, GDC 2005 (Halo 2); GAP 1 ch. 6 paper
    Utility AI (IAUS): response curves, product with compensation factor G O(actions × considerations) — (FourD scoring is ad hoc, N) P1 ok in fixed-point Mark & Dill, GDC AI Summit 2010/2015; Lewis, GAP 3 ch. 13 paper
    GOAP: A* over symbolic states G: emergent NPCs A* on state space — P2 heap Orkin, GDC 2006, alumni.media.mit.edu/~jorkin/goap.html paper
    HTN (total-order forward decomposition) G: squads, scripted plans Exponential worst case — P2 ok Humphreys, GAP 1 "Exploring HTN Planners through Example"; Nau et al., JAIR 20 (SHOP2) paper

    4. Adversarial and stochastic

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Negamax α-β with iterative deepening, move ordering, killers, PVS G: board, tactics O(b^(d/2)) best case — P1 ok AIMA ch. 5; Knuth & Moore 1975 paper. Stockfish is GPL-3.0: never port
    Zobrist + transposition table G O(1) per probe — P1 i64, so use two int32s Zobrist 1970 paper
    Expectimax / *-minimax G: dice (pairs with Dice.fs) O((b·c)^d) — P2 flt Ballard 1983 paper
    MCTS / UCT G: no evaluator, wide branching Anytime — P1 ok (Rng split) Browne et al., IEEE TCIAIG 4(1) 2012; Kocsis & Szepesvári 2006 paper
    RAVE / AMAF G: Go-like games As UCT — P3 ok Gelly & Silver, AIJ 175 (2011) paper
    Progressive widening G: continuous actions As UCT — P3 ok Couëtoux et al., LION 2011 paper
    ISMCTS (SO/MO): determinised information sets G: cards, fog of war As UCT — P2 ok Cowling, Powley & Whitehouse, IEEE TCIAIG 4(2) 2012 paper
    CFR / CFR+: regret to Nash equilibrium G: offline bluffing and balance O(|tree|) per iteration — P3 flt, offline Zinkevich et al., NIPS 2007 paper

    5. Learning-lite

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Bandits: ε-greedy, UCB1, Thompson G: dynamic difficulty, A/B; F: LEARN-01 arms O(arms) — (LEARN-01 is design only, C) P2 flt S&B ch. 2; Auer et al., MLJ 47 (2002) paper
    Tabular Q-learning / SARSA G: small learned behaviours O(1) per step — P3 flt S&B ch. 6 paper
    CMA-ES G: offline balance tuning via the playtest harness; F: bench tuning O(n²) per sample — P2 .NET offline is fine Hansen, arXiv:1604.00772 pycma is BSD-3
    (1+1)-ES / GA G,F O(generations × population × eval) — P2 ok Eiben & Smith, Introduction to Evolutionary Computing paper

    6. Procedural generation

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    WFC (simple tiled, overlapping) G: levels, textures O(cells × tiles) per propagation; restart on contradiction — P1 ok github.com/mxgmn/WaveFunctionCollapse; Karth & Smith, FDG 2017 MIT
    OpenSimplex2 G: terrain O(1) per sample Value noise only (E MapGen.fs) P1 flt github.com/KdotJPG/OpenSimplex2; Gustavson 2005 CC0-1.0 (FastNoiseLite is MIT)
    Worley noise G: biomes, cells O(1) per sample (3×3 cells) — P2 flt Worley, SIGGRAPH 1996 paper
    L-systems G: flora, decoration O(output) — P3 ok Prusinkiewicz & Lindenmayer, algorithmicbotany.org/papers/abop/abop.pdf paper (book is copyrighted)
    Graph grammars (mission → space) G: lock-and-key dungeons Exponential worst case — P3 ok Dormans, PCG 2010, pcgworkshop.com/archive/dormans2010adventures.pdf paper
    Alias method (Vose): O(1) weighted draw G: loot/spawn tables; F: randomisation O(n) build, O(1) draw — P2 ok Vose, IEEE TSE 17(9) 1991 paper

    7. Spatial and geometry

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    k-d tree: k-nearest neighbours and range G: nearest target (RuneScape SQL full scan is the baseline, N) O(log n) average — P1 ok Bentley, CACM 1975 kdbush is ISC
    Loose quadtree / octree G: non-uniform density O(log n) — (indexes are uniform, E) P2 ok RTCD §7.3 paper
    BVH (SAH, refit) G: raycasts, static colliders O(log n) — P2 flt RTCD ch. 6 paper
    R-tree (STR or packed Hilbert) G: editors, map objects O(log n) — P3 ok Guttman 1984 flatbush ISC, rbush MIT
    Sweep-and-prune G: coherent motion O(n + overlaps) Interval sweep only (C TelemetryBudget.fs) P2 ok RTCD §7.5 paper
    GJK / EPA G: convex shapes beyond SAT Iterative — (SAT exists, E) P2 flt Gilbert, Johnson & Keerthi 1988; van den Bergen 2001 libccd is BSD-3
    Delaunay (Bowyer-Watson) / Voronoi G: territory, regions, navmesh seed O(n log n) expected — P2 flt; exact predicates de Berg et al. ch. 9; Shewchuk robust predicates Delaunator is ISC

    8. Optimization

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Simplex LP (two-phase, Bland's rule) G: economy balance; F: capacity split Exponential worst case, fast in practice — P2 flt, or exact rationals (C has a bigint Fraction) B&V ch. 4; CLRS ch. 29 paper. OR-Tools (Apache-2.0) only as a test oracle
    Branch-and-bound ILP G: puzzle validation; F: packing Exponential — P3 as LP Wolsey, Integer Programming paper
    CSP: AC-3 + MRV, degree, LCV G: puzzles, placement, WFC core; F: constraints AC-3 is O(e·d³) — P1 ok AIMA ch. 6 paper
    DPLL / CDCL SAT F: configuration feasibility; G: puzzles Exponential; practical — P3 ok Eén & Sörensson, SAT 2003 MiniSat is MIT
    Hill climbing / simulated annealing / tabu G: layout; F: lane packing, schedule repair O(iterations × neighbourhood) — P1 flt for acceptance AIMA ch. 4; Kirkpatrick et al., Science 1983; Glover 1989 paper
    Hungarian (O(n³) potentials) G: units → targets; F: workers → Deliveries O(n³) — P1 ok on integer costs Kuhn, NRLQ 1955 paper
    Max-flow (Dinic) G: chokepoints, min-cut O(V²E) — P2 ok CLRS ch. 24 paper
    Min-cost flow (successive shortest paths) G: logistics O(F · Dijkstra) — P2 heap Ahuja, Magnanti & Orlin, Network Flows paper
    Knapsack DP (0/1, bounded) G: loadouts O(n·W) — P2 ok CLRS paper
    List / EDF / critical-path-first scheduling F: waves (C Batch is greedy MIS); G: build orders O(n log n) Partial (C) P2 ok Graham 1969; Pinedo, Scheduling paper

    9. Graph

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Kahn topological sort F: board and Delivery DAGs; G: tech trees O(V+E) — (gap, C) P1 ok CLRS §20.4 paper
    Critical path (CPM) F: sequencing; G: build timers O(V+E) — P1 ok Kelley & Walker 1959 paper
    Iterative Tarjan F,G: stack-safe cycles O(V+E) Recursive version only (C; depth risk) P1 ok Tarjan 1972 paper
    Bellman-Ford F: difference constraints O(VE) — P3 ok CLRS §22.1 paper
    Floyd-Warshall G: small-map AI tables O(V³) — (left unbuilt by the RBG roadmap, E) P2 ok CLRS §23.2 paper
    MST (Kruskal with the existing union-find) G: corridors, roads O(E log V) Union-find only (C) P2 ok CLRS ch. 21 paper
    Hopcroft-Karp F: pairing O(E√V) — P3 ok Hopcroft & Karp 1973 paper
    Dominators (Cooper-Harvey-Kennedy) F: mandatory gates; G: unavoidable rooms O(N²) worst case, fast in practice Articulation points only (E) P3 ok SP&E 2006 paper

    10. Numerical and simulation

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Fixed-point (Q16.16, Q32.32; mul, div, sqrt, LUT or CORDIC trig) G: lockstep; lets steering, physics and utility reach LockstepExact O(1) — (explicit gap per Physics.fsi, E) P1 Q16.16 ok; Q32.32 is i64 Fiedler, gafferongames.com/post/floating_point_determinism; Pollard & Bradley, GDC 2024 paper
    Deterministic-float pitfalls (entry): FMA, x87, transcendentals, fast-math G,F — Docs only (E) P1 — as above; Dawson, randomascii.wordpress.com —
    Integrators: semi-implicit Euler, Verlet, RK4 G O(1) Semi-implicit Euler inside Physics.fs (E) P2 flt Hairer et al., Geometric Numerical Integration paper
    Catmull-Rom / Hermite splines G: camera, paths O(1) Easing exists (E) P3 flt Catmull & Rom 1974 paper
    Critically damped spring G: follow, camera O(1) — P2 flt Kirmse, Game Programming Gems 4 §1.10 paper
    PID (anti-windup) G: turrets, vehicles; F: governors O(1) — P2 flt or fixed Åström & Murray, Feedback Systems (free) paper

    11. Networking

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Client prediction + server reconciliation G: fable-game authority O(unacknowledged inputs) — (N) P1 ok on a deterministic step Gambetta, gabrielgambetta.com/client-side-prediction-server-reconciliation.html paper
    Entity interpolation / jitter buffer G O(1) per entity — P1 flt Gambetta Part III; Fiedler "Snapshot Interpolation" paper
    Rollback (GGPO-style) over GC/Replay checkpoints G: action and fighting games O(rollback frames × step) Checkpoints only (E) P1 needs a LockstepExact step github.com/pond3r/ggpo GGPO is MIT; GGRS is MIT/Apache
    Delta encoding: quantise, bitpack, changed-field mask G O(state) Delta publication only (N Net Delivery.fs) P2 ok Fiedler "Snapshot Compression" paper
    Lag compensation (server rewind) G: hitscan O(history) — P3 flt Bernier, GDC 2001 paper

    12. Systems

    Algorithm: what Use Complexity Has? Pri Fable Reference Licence
    Token / leaky bucket G: command rate; F: API budget O(1) Inside the unmerged RuneScape PR #14 arbiter (N) P1 ok on integer ms Tanenbaum, Computer Networks §5.4 paper
    Exponential backoff + full/decorrelated jitter F: replaces fixed retry tables; G: reconnect O(1) — (gap, C) P1 ok Brooker, aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter paper
    LRU / W-TinyLFU G: asset and path caches; F: query memo O(1) — P2 / P3 ok Einziger et al., ACM ToS 2017 paper
    Reservoir sampling (R, L) F: telemetry for percentiles O(n) — P2 ok Vitter, ACM TOMS 1985 paper
    Consistent / jump hashing F: shard assignment O(log n) — P3 i64 (jump) Karger et al., STOC 1997; Lamping & Veach 2014 paper
    Bloom filter F: seen-id memory O(k) Bounded duplicate-id memory (N) P3 ok Bloom, CACM 1970 paper

    13. Recommended taxonomy

    Library namespace FS.GG.Algorithms.<Family> equals the pack family tag. Each entry also carries:

    • an audience (G, F or B);
    • a determinism grade, reusing Game.Core's LockstepExact, Port, Unc and .NET;
    • a status: harvested, new, entry-only or pointer. pointer indexes an existing skill or package (grids, collision, line-drawing, visibility, FS.GG.Net), per E's "index, do not fold in".

    The families:

    • Collections: heaps, LRU, bloom.
    • Random: SplitMix64, alias, reservoir.
    • Graph: topological sort and CPM, shortest paths, SCC, dominators, MST, flow, matching.
    • Search.Grid: A*, JPS, ALT, fields, Theta*, HPA*, D* Lite.
    • Search.Mesh: navmesh and funnel.
    • Search.MultiAgent: WHCA*, CBS.
    • Steering: Reynolds, boids and formations, ORCA.
    • Decision: FSM and HFSM, BT, utility, GOAP, HTN, influence, arbitration.
    • Adversarial: α-β with TT, expectimax, MCTS family, CFR.
    • Learning: bandits, Q, ES, CMA-ES, GA.
    • ProcGen: noise, CA, BSP, Poisson, WFC, L-systems, grammars.
    • Spatial: hash, k-d, quad and octree, BVH, R-tree, SAP.
    • Geometry: SAT, GJK and EPA, Delaunay and Voronoi, exact predicates; LOS and FOV are pointers.
    • Optimization: LP, ILP, CSP, SAT, local search, assignment, flows, knapsack, scheduling.
    • Numerics: fixed-point, integrators, splines and easing, springs, PID, percentiles (C nearestRank).
    • Net: prediction, interpolation, rollback, delta.
    • Systems: rate limiting, backoff, hashing.

    Two layering rules apply:

    • Collections.Heap and Numerics.Fixed are layer 0, which everything else may use.
    • Only Net and Systems may touch Tasks or IO, which keeps the rest Fable-viewable.

    14. Ranked first tranche: 24 new implementations (beyond harvest)

    Each needs the #5222 bar: an FsCheck property plus bench numbers. The oracle is in brackets.

    1. Fable-portable binary and indexed heap. Unblocks every search. [sort equivalence]
    2. Kahn topological sort + CPM. [edges respected; cycle reported if and only if Tarjan finds an SCC larger than one node]
    3. Iterative Tarjan. [equals the recursive version; a 10⁵-node chain]
    4. Fixed-point Q16.16. [error bounds; bit-identical under .NET and Fable]
    5. Behaviour tree + blackboard. [tick determinism]
    6. Utility AI (IAUS). [scores bounded to 0–1; monotone curves]
    7. HFSM. [entry and exit properly nested]
    8. Negamax α-β + iterative deepening + Zobrist TT. [equals plain minimax on random trees]
    9. MCTS/UCT with an ISMCTS mode. [converges on small solved games]
    10. Reynolds steering. [arrive within ε, no overshoot]
    11. Prediction, reconciliation and interpolation buffer. [converges to the server under a lossy simulator]
    12. Rollback over Replay checkpoints. [byte-identical to a zero-latency run]
    13. Backoff with jitter + generic token bucket. [bounds; long-run rate ≤ r]
    14. Navmesh A* + funnel. [no longer than the portal-midpoint path; LOS-clear]
    15. Lazy Theta*. [no longer than A* + smooth; LOS-valid]
    16. HPA*. [bounded suboptimality against A*]
    17. k-d tree. [equals a brute-force scan]
    18. CSP (AC-3 + MRV/LCV). [agrees with brute force on small instances]
    19. SA/tabu/hill-climbing toolkit. [never worse than the start; seed-deterministic]
    20. Hungarian. [equals the brute-force minimum for n ≤ 7]
    21. WFC (simple tiled). [all adjacencies legal; seed byte-identity]
    22. OpenSimplex2 + Worley. [range bounds; seed byte-identity]
    23. UCB1 and Thompson bandits. [sublinear regret on synthetic arms]
    24. GOAP. [plan cost equals BFS over states]

    Next in line: D* Lite, ORCA, Delaunay and Voronoi, simplex LP, flows, WHCA*, GJK/EPA, CMA-ES, LRU.

    Unknowns

  7. EHotwagner commented on Nov 1, 2026

    @EHotwagner
    ContributorAuthor

    Root/fdev acceptance: ADR-0098 is accepted and merged (#5227, 8ca8f936) after independent review and a delta approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions