Files
chrnxandClaude Opus 5 1db83b9b33 docs: chess is parked until the property card has no untested row
Not the same reason the GRP is parked. unseen.md found that the CPPN's
advantage over a lookup lives in relation spaces that cannot be enumerated, and
chess's 225 integer offsets can be -- so a chess result cannot settle a question
about the kernel in either direction. The properties get measured where the
measurement is clean; chess is where they are applied afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCydQraDSoZ9WoTm2v23Eb
2026-09-07 17:13:26 -05:00

157 lines
9.4 KiB
Markdown

# 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.
Three consequences, each of which has already bitten this project once:
1. **The gain is knowledge, not performance.** Experiments here exist to establish what is
missing, not to make a mechanism work. Optimising the GRP is a grave error, not a goal.
The operational test: **is the negative result as informative as the positive one?** An
experiment that only makes sense if it comes out positive is a performance experiment
wearing a diagnostic costume. Write every verdict so both branches carry equal weight,
and describe no outcome as good or bad news.
2. **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.
3. **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.
## Sequencing: one line at a time
**RP first, GRP after.** The front is the CPPN and the RP — whether the organism comes to
understand its domain's structure. The memory line is parked at its positive result
(`chess_dist.md`) and is not to be advanced until the RP is established. This is not a verdict
on that result; it is that pushing two unknowns at once means neither can be attributed.
The operational form: an experiment that would change the GRP, tune the gate, or explore what
the state holds is out of scope until the RP question it depends on has an answer. An
experiment on the kernel, the relation, or what the RP represents is in scope. When in doubt,
ask which unknown the result would be about — if the answer is "both", redesign it.
"Enough confidence in RP" is not a feeling. It is: the RP's representation of the domain has
been measured, not assumed, on more than one property, with the negative branch as informative
as the positive one.
**Chess is parked too, and for a different reason than the GRP.** Nothing is to be assumed about
the chess domain until the RP's own properties are established on a domain built to test them.
`unseen.md` is why: the CPPN's advantage over a lookup table lives in relation spaces that cannot
be enumerated, and chess's 225 integer offsets can be — so a chess result cannot settle a
question about the kernel either way. The RP's properties get measured where the measurement is
clean; chess is where they are *applied* afterwards. An experiment that would extend the chess
arc — castling, en passant, the engine that plays — is out of scope until the property card
(`results/rp_properties.md`) has no untested row carrying a claim.
## 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, and it is
worse than that: in Task 10 eight seeds reported the **wrong sign** (+0.010 favouring one
arm on 5/8, flipping to -0.003 at sixteen). Eight seeds does not reliably support a
direction, let alone a ratio. Report per-seed values, the count of seeds won, and a paired
standard error — and if the effect sits inside one se of zero, say so instead of reading
its sign.
## Layout
```
ia-stuff/ git: ailed-docs-rp — design docs, this file, and .sdd/
├── ailed/ git: ailed-rp — the library, src/ailed/{affect,core}.py
├── experiments/ git: ailed-experiments-rp — the domain and the runs
└── paper/ git: ailed-paper-rp — the manuscript
```
Four sibling repositories under `Ailed-AI`. The three subdirectories are git-ignored by the
root repo, so nothing is nested and each stays independent. Commit inside the repo you
touched. `experiments` installs `ailed` from `../ailed`, so the **directory** names matter
even though the repo names differ.
- `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.