fly-session: LegacyAgentWorker, the legacy Game Boy agent over the neural core
Agent.Initialize checks the profile against the dataset fingerprint and warms up as the legacy fresh start does; Prepare applies sugar, ticks the 548625/32768 ms frame on the rational clock and decodes with gameboy-readout-context-v1; Commit installs the frame, stimulates, then reinforces once; Agent.Rollback is legacy-ratchet-rollback-v1's agent half; capture is agent_to_chunks in an envelope and a restore resets the readout transient as a fresh legacy process has it.
This commit is contained in:
parent
72cefb773b
commit
9bdfb079e5
5 changed files with 1811 additions and 0 deletions
2
services/flysim/Cargo.lock
generated
2
services/flysim/Cargo.lock
generated
|
|
@ -439,7 +439,9 @@ dependencies = [
|
|||
name = "fly-session"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"fly-session-types",
|
||||
"flybrain-core",
|
||||
"flybus",
|
||||
"serde_json",
|
||||
"tempfile",
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ path = "src/bin/fly-session.rs"
|
|||
# Everything else this crate needs is std or Tokio.
|
||||
fly-session-types = { path = "../fly-session-types" }
|
||||
flybus = { path = "../flybus" }
|
||||
# AGENT-01: the legacy agent worker is an adapter over the existing neural core (LIF kernel,
|
||||
# plasticity, retina, fixed readout, checkpoint chunks). Pure Rust, no emulator.
|
||||
flybrain-core = { path = "../flybrain-core" }
|
||||
# The toy connectome fixture is written as gzipped `.binz` arrays, the dataset loader's format.
|
||||
flate2 = { workspace = true }
|
||||
|
||||
serde_json = { workspace = true }
|
||||
# `rt-multi-thread` is not only for the tests: a worker process and a dedicated-thread
|
||||
|
|
|
|||
1796
services/flysim/crates/fly-session/src/legacy_agent.rs
Normal file
1796
services/flysim/crates/fly-session/src/legacy_agent.rs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -29,6 +29,7 @@ pub mod dedup;
|
|||
pub mod environment;
|
||||
pub mod harness;
|
||||
pub mod launcher;
|
||||
pub mod legacy_agent;
|
||||
pub mod measure;
|
||||
pub mod media;
|
||||
pub mod metrics;
|
||||
|
|
|
|||
|
|
@ -606,6 +606,13 @@ async fn execute<E: WorkerEndpoint>(
|
|||
fn classify_default(method: &str) -> Option<OpClass> {
|
||||
match method {
|
||||
"Agent.Prepare" | "Agent.Commit" | "Environment.Advance" => Some(OpClass::StepMutation),
|
||||
// The extension methods of `workers-v1` section 7 are mutations under the step operation
|
||||
// key (`legacy-gameboy-v1` section 11): `SaveSlot` at `(e, k)`, `RestoreSlot` and
|
||||
// `Agent.Rollback` at the new epoch `(e', k)`. A lost reply replays from the same cache
|
||||
// rather than rolling back twice.
|
||||
"Agent.Rollback" | "Environment.SaveSlot" | "Environment.RestoreSlot" => {
|
||||
Some(OpClass::StepMutation)
|
||||
}
|
||||
// `ipc-v1` section 5 retains lifecycle *and capture* replies until
|
||||
// `Worker.Acknowledge`. The restore methods join them: their replies carry a
|
||||
// once-only token and, for an environment, the restored observation's artifact, and a
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue