docs: design, plan, and the execution record

The thinking behind the organism, versioned alongside the three code repos rather than
living only on one machine.

- AILED_General_Specification.md, the authoritative design, and the implementation plan
  the code was built from
- AGENTS.md, the project-wide rules, including the two that were learned the hard way:
  this is not a performance benchmark, and a null recorded early beats a claim propped up
  later
- the nine superseded module specs, each carrying a banner naming what replaced it
- .sdd/, the execution ledger and every task brief and report: each ruling taken, what it
  would cost if wrong, every correction, and every number verified independently

The three code repos are siblings, each its own repository, and are git-ignored here so
nothing is nested.

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 13:17:39 -05:00
commit 8ed2944518
47 files changed
+7498

No files matched your search

+118
View File
@@ -0,0 +1,118 @@
# AILED — working notes for agents
Read this before touching anything. The authoritative design is
`AILED_General_Specification.md`; this file says what the project is *for* and which
mistakes cost the most here.
## What this project is
AILED is a relational-affective organism: a unit that perceives a **set of entities and
the relations between them** rather than a flat vector, carries **per-entity memory**, and
modulates both with an internal affective state derived from its own error stream.
Three pieces, all defined in the spec:
- **RP (Relational Perceptron)** — message passing over entity pairs. The weights are not
constants; they are generated by a CPPN from the relation itself, so the kernel is a
function of geometry rather than a lookup. Spec §3–§4.
- **GRP (Gated Relational Perceptron)** — the RP plus true per-entity recurrence: a memory
vector `M_i` per entity, a candidate transform, and a gate deciding how much of the past
to keep. Spec §4.
- **ψ = (valence, arousal)** — two axes computed from two-speed EMA baselines of the loss.
Arousal is relative surprise; valence is learning progress. Arousal biases the memory
gate; both feed the CPPN as context. Spec §5.
The paper's claims are **A1, affect-gated adaptation** (arousal opens the gate after an
unannounced regime change) and **A2, affective topology** (the CPPN kernel depends on ψ).
## The framing that matters most
**This is not a performance benchmark.** The question is whether relational structure and
per-entity memory let an organism *come to understand a domain* — its entities, their
relations, and when those relations change. It is not whether some configuration reaches a
lower number.
Two consequences, both of which have already bitten this project once:
1. **RP vs GRP is the comparison.** They are two forms of the same unit and the question
between them is what memory buys in *understanding*, not in error. Do **not** introduce
a standard MLP or perceptron baseline — that measures mechanical performance and is not
commensurable with what is being claimed here.
2. **Do not tune a baseline until it catches up.** In Task 7 the memory advantage measured
2.99x at `lr=1e-3` and 1.06x at `lr=1e-2`. The tempting move — raise the learning rate
so the comparison is "fair" — changes the question instead of answering it. What that
ablation actually tells you is about the *domain*: relational particles do not
distinguish state from fast weights on mean error. When a metric cannot tell your
mechanism apart from a cheaper one, change the metric, not the baseline.
## Rules that keep the results honest
These are not style preferences. Each one exists because violating it produced a wrong
result in this project or its predecessor.
- **Measure the ceiling before building the mechanism.** Every mechanism ships with an
oracle — a condition that is *given* the information the mechanism is supposed to infer.
If the oracle does not beat the baseline, the mechanism has no job in that setup and no
amount of tuning will give it one. Four nulls in the previous project came from setups
that left the mechanism nothing to do.
- **A null recorded early beats a claim propped up later.** Report negatives plainly. Do
not soften them, and do not go looking for a configuration that rescues a positive.
- **ψ never carries gradient.** It is built from `loss.item()`. `affect.py` imports no
torch and holds no tensors. If gradient flowed through ψ it would silently become a
learned latent and there would be no oracle for what it means.
- **Oracles are opt-in and free.** Turning an oracle on may only add columns to `attrs`.
The trajectory, regime schedule, switch times and noise draws must stay byte-identical to
the non-oracle run at the same seed. Otherwise a measured difference could come from a
different world rather than from the extra information.
- **`kappa = 0` is a single flag** that disables affect on the gate and changes nothing
else. It is the control A1 is measured against.
- **Affect axes are read by name.** `Organism.forward` is the one sanctioned place a
`(valence, arousal)` tuple is unpacked positionally.
- **A test that cannot fail is worse than no test.** Twice now, a full suite passed against
a deliberately broken implementation. When a test defends a central property, break the
property on purpose and confirm the test fails. Say in your report that you did.
- **Seeds.** Across-seed spread here is comparable to the effects being claimed. Three
seeds supports a direction; it does not support a ratio.
## Layout
```
ia-stuff/ not a git repo — design docs and this file live here
├── ailed/ git: the library, src/ailed/{affect,core}.py
├── experiments/ git: the domain and the runs; installs ../ailed editable
└── paper/ git: the manuscript
```
Commit inside the repo you touched. Root is deliberately not a repo.
- `ailed/src/ailed/affect.py` — spec §5. Pure functions over floats, no torch.
- `ailed/src/ailed/core.py` — spec §3–§4. `AffectiveCPPN`, `RelationalPerceptron`,
`GatedRelationalPerceptron`, `Organism`, `detach_memory`.
- `experiments/particles.py` — spec §7. The domain: particles on a torus whose type-by-type
coupling matrix switches without announcement.
- `experiments/regime.py` — spec §8. The eight conditions, the training loop, the metrics.
- `experiments/ceilings.py` — least-squares information ceilings for the domain.
- `experiments/results/*.md` — the audit trail the paper's setup section cites. These are
committed; the `.json` files are not.
## Documents
`AILED_General_Specification.md` is authoritative. The nine older module specs
(`RP_Deep_Dive.md`, `GRP_Deep_Dive.md`, `Psyche_Calculator_Specification.md`, and the rest)
are **superseded** and each carries a banner pointing at the section that replaces it —
they are chess-bound and several contain code with real bugs. Read them for intent, never
for implementation. `AILED_Organism_Specification.md` is the exception: it describes the
chess instance and is still valid as such.
`AILED_Implementation_Plan.md` is the task breakdown. `.sdd/progress.md` is the execution
ledger: what was done, every ruling taken and what it costs if wrong.
## Conventions
- Python ≥3.11, `uv`, PyTorch, pytest. Run tests with `uv run pytest -q` from inside the
repo you changed.
- Autograd only. No hand-written backward passes.
- CPU, small models, short runs. A 2000-step run takes about a second — spend the budget on
more seeds, not longer runs.
- Prior art worth knowing: the chess ψ and the EQ signal chain exist at
`github.com/chrnx-dev/ailed-chess`. Take ideas, not code. This paper is a blank slate.