exp: when does per-entity memory have a job -- the theory is wrong and the failure is ours

Part 1: the affect timing fix works (arousal's peak moves from lag 11 to lag 2, inside
the pre-registered 3) and the error does not move -- 0 of 16 seeds reach the registered
1.10, largest ratio anywhere 1.017. A1 is closed on this domain.

Part 2: T_id is 2-3 observations against a T_z of 40-80. One observed displacement
carries the regime at 0.958 (exact) and 0.909 (no privileged knowledge), against 0.574
from the instantaneous configuration alone. History nearly doubles the present's
above-chance information, so this is the rememberable kind of domain -- and the GRP's
memory decodes it at 0.332.

Part 3: the predicted peak does not exist. Capacity-controlled state gain is flat at
1.09-1.26 across four orders of magnitude of regime duration, and is largest at the
frozen regime, where there is no regime to identify and G is exactly 1.00. What the
state gain measures is temporal smoothing.

The pre-registered theory is falsified. The domain had the information all along and the
organism does not take it, which closes the project's habit of reaching for a new domain
whenever memory failed to help.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KAWnnPg2qvmLNySamE2k85
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-09-02 12:29:38 -05:00
1 parent 39ffbc5272
commit a4f45c331a
6 files changed
+1513 -10

No files matched your search

+21 -5
View File
@@ -39,12 +39,24 @@ SPLIT = 0.7 # probe train fraction, taken as a prefix in time
# -- construction and the two phases ---------------------------------------------
def _build(name: str, seed: int, hidden: int, omega: float, kappa: float):
"""Construct exactly as `regime.run` does, in the same order, so the RNG stream matches."""
def _build(name: str, seed: int, hidden: int, omega: float, kappa: float,
t_min: int | None = None, t_max: int | None = None):
"""Construct exactly as `regime.run` does, in the same order, so the RNG stream matches.
`t_min`/`t_max` override the regime duration for Task 9 Part 3. They are passed to
`ParticleConfig` here rather than changed in `particles.py`, so every other caller
keeps the 40-80 default and `test_train_copy_is_identical_to_regime_run` still pins
this loop against `regime.run`.
"""
spec = dict(CONDITIONS[name])
if spec["kappa"] == KAPPA_FLAG:
spec["kappa"] = kappa
wcfg = ParticleConfig(seed=seed, oracle=spec["oracle"])
dur = {}
if t_min is not None:
dur["t_min"] = t_min
if t_max is not None:
dur["t_max"] = t_max
wcfg = ParticleConfig(seed=seed, oracle=spec["oracle"], **dur)
torch.manual_seed(seed)
world = ParticleWorld(wcfg)
ctx_dim = wcfg.n_regimes if spec["ctx"] == "regime" else 2
@@ -55,7 +67,7 @@ def _build(name: str, seed: int, hidden: int, omega: float, kappa: float):
def _train(spec: dict, wcfg: ParticleConfig, world: ParticleWorld, org: Organism,
steps: int, bptt: int, lr: float, stateless: bool = False,
gate_arousal=None, on_step=None):
gate_arousal=None, on_step=None, acfg: AffectConfig | None = None):
"""A verbatim copy of `regime.run`'s training loop (the keyword arguments aside).
Copied rather than reused because `regime.run` returns metrics and drops the
@@ -79,9 +91,13 @@ def _train(spec: dict, wcfg: ParticleConfig, world: ParticleWorld, org: Organism
`on_step(t, obs, r, ctx, axes, prev, memory)` is a read-only callback fired after
the forward pass, for measuring the gate. `prev` is the M_prev the organism was
handed, captured before `memory` is rebound.
`acfg` overrides the affect time constants for Task 9 Part 1. It defaults to
`AffectConfig()`, the value this loop always used, so the copy stays verbatim for
every existing caller. `AffectConfig`'s own defaults are not touched.
"""
opt = torch.optim.Adam(org.parameters(), lr=lr)
acfg = AffectConfig()
acfg = AffectConfig() if acfg is None else acfg
affect = Affect()
memory: dict[int, Tensor] = {}