How iamvxrn/alphaarc works
Purpose and Execution Surfaces
AlphaARC is an experimental, non-LLM ARC-AGI-3 agent emphasizing minimum-description-length (MDL) compression as intrinsic drive. The primary implementation is Go; Python provides the canonical Kaggle-bundled agent and benchmarking harness. Go executables expose solving, staged runs, smoke/live-server checks, gate evaluation, and demos: main.go, cmd/alphaarc-solve/main.go, cmd/alphaarc-suite/main.go, cmd/alphaarc-smoke/main.go. Python bench execution begins under python/bench/bench.py.
Environment and Data Boundary
The agent consumes grid observations from either local ARC datasets/practice environments or the ARC-AGI-3 REST service. Environment adapters isolate game I/O and action transport from cognition: pkg/environment/environment.go, pkg/environment/remote/client.go, pkg/environment/bridge/bridge.go. Bundled ARC training/evaluation task JSON is under data/ARC-AGI/data/training and data/ARC-AGI/data/evaluation; live operation requires the ARC endpoint and API-key environment configuration.
Perception and Attention
Raw grids are transformed into stable object, spatial, relational, and affordance representations. Residuals—cells unexplained by the strongest regularity—focus attention on likely interactive controls. This is the perceptual boundary that feeds both structural compression and action selection: pkg/environment/perception/perception.go, pkg/environment/perception/object.go, pkg/environment/perception/relational.go.
Compression, Programs, and Goal Discovery
The macro layer evaluates MDL explanations such as reflection, translation, counting, and correspondence, then represents candidate transformations/programs and unexplained residual structure. The winning compression supplies intrinsic direction rather than a fixed reward target: pkg/macro/mdl.go, pkg/macro/discover.go, pkg/macro/program.go. Causal goal selection and feature affordances refine this into actionable target features: pkg/goalsel/goalsel.go, pkg/feataff/feataff.go, pkg/goals/proposer.go.
Predictive Control Loop
pkg/pipeline/predictive_loop.go is the main cognitive-cycle integration point: observation features, prediction, goal/attention signals, planning, action conditioning, and forecast error feed recurrent learning. Agent roles provide actor, predictor, and associator behavior: pkg/agent/agent.go, pkg/agent/actor.go, pkg/agent/predictor.go. Control is normally cheap one-step credit, with model-based lookahead available through pkg/mbrl/mbrl.go.
Actuation and Feedback
Selected goals are compiled/discovered as click or keyboard control sequences and issued through the environment bridge. Outcome memory, refractory behavior, and observed changes constrain retries and identify dead controls: pkg/actuate/actuate.go, pkg/feataff/motor.go, pkg/environment/bridge/outcome_memory.go. This closes the loop from external observation through internal inference back to game actions.
Learning Substrate and Offline Consolidation
A sparse graph supports concepts, spreading activation, routing, inhibition/WTA competition, and Hebbian/structural plasticity: pkg/graph/concepts.go, pkg/graph/spreading.go, pkg/graph/plasticity.go. Associative recall uses Hopfield memory, while homeostatic signals modulate drive: pkg/memory/hopfield_modern.go, pkg/homeostasis/hormones.go. Offline “sleep” clusters and compresses recurring graph structure via Louvain abstraction: pkg/offline/sleep.go, pkg/offline/abstraction.go.
Measurement and Delivery
The Python package mirrors the agent logic for Kaggle deployment—especially perception, MDL, planning, policy, and glue: python/alphaarc/agent_glue.py, python/alphaarc/planner.py, python/alphaarc/mdl.py. python/bench/ runs reproducible scoring splits, decoding, and experiment variants; persisted run results provide comparative baselines. CI gate automation is defined in .github/workflows/gate.yml.
Main entry points: predictive_loop.go Predictive control loop · environment.go Environment adapters · concepts.go Sparse concept graph · bridge.go Environment bridge
Components 20
Execution surfaces
- Go commands · Solve, suite, smoke, and demo entrypoints.
cmd/alphaarc-solve/main.go - CI gate
.github/workflows/gate.yml
Environment boundary
- ARC task data
data/ARC-AGI/data/training - ARC-AGI-3 service · Live operation requires endpoint and API-key configuration.
- Environment adapters · Isolates observation and action transport from cognition.
pkg/environment/environment.go - Remote client
pkg/environment/remote/client.go - Environment bridge · Tracks outcomes and dead controls.
pkg/environment/bridge/bridge.go
Online cognition
- Perception and residuals · Builds objects, relations, affordances, and attention-driving residuals.
pkg/environment/perception/perception.go - MDL discovery · Selects the shortest structural explanation and residual structure.
pkg/macro/discover.go - Transformation programs
pkg/macro/program.go - Goal and affordance selection · Refines compression into actionable target features.
pkg/goalsel/goalsel.go - Predictive control loop · Integrates prediction, attention, goals, planning, action, and forecast error.
pkg/pipeline/predictive_loop.go - Actor, predictor, associator
pkg/agent/agent.go - Model-based lookahead · Optional deeper planning beyond cheap one-step credit.
pkg/mbrl/mbrl.go - Action compiler · Produces click and keyboard control sequences.
pkg/actuate/actuate.go
Learning substrate
- Sparse concept graph · Supports activation, routing, inhibition, and plasticity.
pkg/graph/concepts.go - Memory and homeostasis · Hopfield recall and hormonal modulation shape behavior.
pkg/memory/hopfield_modern.go - Offline abstraction · Clusters and compresses recurring graph structure.
pkg/offline/sleep.go
Python delivery
- Python bundled agent · Mirrors perception, MDL, planning, policy, and glue.
python/alphaarc/agent_glue.py - Benchmark harness · Runs scoring splits, decoding, and variants.
python/bench/bench.py
Connections 26
- Go commands → Environment adapters: runs agents against
- Go commands → Predictive control loop: starts
- ARC task data → Environment adapters: local observations
- ARC-AGI-3 service → Remote client: REST observations/actions
- Remote client → Environment adapters: implements live I/O
- Environment adapters → Perception and residuals: grid observations
- Perception and residuals → MDL discovery: structures and residuals
- MDL discovery → Transformation programs: evaluates
- MDL discovery → Goal and affordance selection: intrinsic direction
- Perception and residuals → Predictive control loop: features and attention
- Goal and affordance selection → Predictive control loop: goal signals
- Actor, predictor, associator → Predictive control loop: role behaviors
- Model-based lookahead → Predictive control loop: lookahead plans
- Predictive control loop → Action compiler: conditioned action
- Action compiler → Environment bridge: control sequences
- Environment bridge → Environment adapters: action transport
- Environment bridge → Predictive control loop: outcomes and changes
- Predictive control loop → Sparse concept graph: learning signals
- Sparse concept graph → Memory and homeostasis: associative state
- Memory and homeostasis → Predictive control loop: recall and drive
- Sparse concept graph → Offline abstraction: recurring structure
- Offline abstraction → Sparse concept graph: compressed abstractions
- Python bundled agent → Benchmark harness: evaluated by
- ARC task data → Benchmark harness: benchmark tasks
- CI gate → Go commands: gates
- CI gate → Benchmark harness: gates