Skip to content

Algernon: learning-computer scaffold and executable circuit mirror - #33

Merged
patrickdugan merged 39 commits into
mainfrom
research/algernon-learning-computer-20261103
Nov 3, 2026
Merged

patrickdugan merged 39 commits into
mainfrom
research/algernon-learning-computer-20261103

Conversation

@patrickdugan

@patrickdugan patrickdugan commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Algernon research scaffold + Algernon-02 circuit mirror

This consolidates the 2026-11-03 Algernon research program into research/algernon/ and adds a runnable, provenance-labelled Circuit Mirror experiment.

Implemented and run locally

  • Typed pointer-machine transition specification and Python BN254 Fr R1CS checker, with public input binding, full intermediate witness, explicit product wires, and negative corruption cases.
  • Circom 2 source emitter for the same intended transition. The Circom binary was not run or witness-verified here.
  • Executed exhaustive small-machine tests: 567 graph/start/depth cases, all valid traces verified. A set of 192 seeded cases (four graph families, 48 each, N=4, depth=8) has a frozen JSON receipt with 0 failures.
  • Trained a 222-parameter toy CPU PyTorch readout on one-step random-function examples (300 updates x 128 batch); assessed 18 family/depth cells, including held-out cycles and sinks through 16 recurrence steps. All 18 cells had 100% final-state and full-trace correctness. The explicit quadratic input features already encode much of the transition; these results only validate the learning/verification interface, and do not demonstrate general latent reasoning.
  • All eight circuit-mirror local unit tests passed. Frozen receipts and source are retained in circuit_mirror/results/.
  • Registered prior Algernon Phase A/B CPU exactness suite and 77-file checkpoint inventory, source pins and interface documents, with old D-drive recovery moved off the critical path.

Independent GitHub Actions

  • Algernon-02 circuit mirror: success at head, checks tests and exact-record reproducibility.
  • Algernon CPU provenance and exact-reference checks: success at head.

Future research gates

  • Compile generated Circom code and witness-test against the Python evaluator (no SNARK proof yet).
  • Independently replicate pinned LOTUS inference and recover post-loop hidden representations; train a state decoder on generator-disjoint data, compare recurrence and matched controls.
  • Replay Qwenputer's real RV32 reference suite, then map this same state transition into its compiled-weight IR.
  • Evaluate constrained recurrent correction, accuracy/compute tradeoffs and base-model regressions before sparse receiver edits.

Reference: research/algernon/circuit_mirror/README.md and EXPERIMENT.md. No Qwen, LOTUS, Qwenputer GPU or Circom executable benchmark was run as part of this PR.

Comment on lines +14 to +32
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Unit tests (torch tests skip if torch absent)
run: python -m unittest discover -s research/algernon/circuit_mirror/tests -v
- name: Reproducible exact reference receipt
run: |
python -m research.algernon.circuit_mirror.run --out /tmp/algernon02
python - <<'PY'
import json
from pathlib import Path
reference = json.loads(Path('research/algernon/circuit_mirror/results/cpu_reference_4x8.json').read_text())
observed = json.loads(Path('/tmp/algernon02/cpu_reference.json').read_text())
assert reference == observed, 'CPU exactness receipt changed'
print('Verified frozen exact reference receipt')
PY
@patrickdugan patrickdugan changed the title Research scaffold: Algernon neural-net processor and learning computer Algernon: learning-computer scaffold and executable circuit mirror Nov 3, 2026
@patrickdugan
patrickdugan marked this pull request as ready for review November 3, 2026 15:15
@patrickdugan
patrickdugan merged commit 723f890 into main Nov 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants