Skip to content

Latest commit

ย 

History

142 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CogniARC ๐Ÿง โœจ

Python License Status Nano-NN on Hugging Face ARC-AGI-3

ARC-AGI-3 Cognitive Architecture โ€” 6 human drives, 9 reasoning modes, SkillDAG, SocraticCritic, V-JEPA World Model tool, and human-like skill acquisition from zero.

Discover, simulate, then solve. World model as a tool, not the architecture.


๐Ÿ โ˜€๏ธ Maison Cluster Ensoleillรฉe โ€” signรฉe NOTRE MAISON en lettres apprises par la boucle de pratique
๐Ÿ โ˜€๏ธ ยซ Notre maison ยป โ€” dessinรฉe ร  la main apprise (ฯƒ=0.012).
Chaque trait est organique, chaque lettre a รฉtรฉ pratiquรฉe.
Voir cรดte-ร -cรดte ฯƒ=0.10 (enfant) vs ฯƒ=0.012 (appris)


๐Ÿ‘ค About This Project

This is a one-person research project by Sylvain Galliez (zedarvates). I have zero prior knowledge of the ARC-AGI-3 games โ€” I have never looked at the solutions, never read walkthroughs, and never studied the game mechanics before building this agent. Every discovery (wall colors, changer positions, lock mechanics, action mappings) was made by the agent itself through observation and experimentation.

My approach is not to code solutions โ€” it's to accompany LLMs in their reflection. I design cognitive architectures (drives, reasoning modes, Socratic critics) that push language models to think deeper, question their own hypotheses, and explore alternatives when stuck. The code is a harness for reasoning, not a solver.

I work on this in my spare time, a few hours per week, iterating alongside AI coding agents. The 16 commits that took LS20 from 0% to solved in 40 steps were done in a single day of focused pair-programming with Hermes (my AI agent). Every line of code is a dialogue between human intuition and machine reasoning.

"The harness should give general thinking patterns, not game-specific phases." โ€” Tufa Labs, ARC-AGI-3 winners


๐Ÿงญ Two Complementary Tracks

Track Repository Focus
Cognitive Solver cogniarc/ (this repo) ARC-AGI-3 puzzle solving via 6 drives + 9 reasoning modes + SocraticCritic + World Model + Perception Stack
Human Skills arc-human-skills/ Learn to read, write, paint like a human from zero โ€” Watch tutorials โ†’ Practice in MS Paint โ†’ Self-evaluate โ†’ Transfer skills

Both share the SkillDAG architecture (atomic skills + topological dependencies) for composable, transferable learning.


๐Ÿ—๏ธ Cognitive Architecture (Solver Track)

CogniARC Solver
โ”œโ”€โ”€ ScientificState          โ€” structured hypothesis/evidence/assumptions
โ”œโ”€โ”€ SocraticCritic           โ€” 6 Socratic operations (midwifery)
โ”œโ”€โ”€ ReasonModeManager        โ€” 9 reasoning modes with automatic selection
โ”œโ”€โ”€ WorldModelTool ๐Ÿ†•        โ€” V-JEPA 2.1 encoder + k-NN predictor
โ”‚   โ””โ”€โ”€ "If I do X, what happens?" โ€” simulate without executing
โ”œโ”€โ”€ Drives (6)
โ”‚   โ”œโ”€โ”€ novelty, simplicity, doubt, pleasure, caution, impulse
โ”œโ”€โ”€ Reasoning Modes (9)
โ”‚   โ”œโ”€โ”€ EXPLORATION, PATHFINDING, ROTATION, TRANSFORMATION
โ”‚   โ”œโ”€โ”€ GOAL_INFERENCE, CAUSAL, COUNTERFACTUAL, ANALOGICAL, SOCRATIC
โ”œโ”€โ”€ Perception Stack
โ”‚   โ”œโ”€โ”€ TemporalReasoner     โ€” โฑ๏ธ time as change (no clock)
โ”‚   โ”œโ”€โ”€ SpatialReasoner      โ€” ๐Ÿ—บ๏ธ space as relations (no ruler)
โ”‚   โ”œโ”€โ”€ AttentionModel       โ€” focus follows changes
โ”‚   โ””โ”€โ”€ SymbolicInference    โ€” perception โ†’ SkillDAG
โ””โ”€โ”€ Dynamic Workflows (6)
    โ”œโ”€โ”€ Classify and Act, Fan Out & Synthesize, Adversarial Verification
    โ”œโ”€โ”€ Generate and Filter, Tournament, Loop Until Done

๐ŸŒ World Model Tool (V-JEPA 2.1 + k-NN)

"The world model is a tool, not the entire architecture." โ€” Yann LeCun, V-JEPA paper (2024)

The WorldModelTool lets ScientistAgent answer "what happens if I take action X?" without executing it in the real environment. It memorizes observed transitions and replays them via nearest-neighbor lookup.

Architecture & Sources

Component Detail Link
Encoder V-JEPA 2.1 ViT-B/16 (80M params, 384px, RoPE) arXiv:2402.04107, GitHub
Inference vjepa2_infer.py โ€” extracts 768-dim latent from ARC grids skill script
Predictor k-NN (k=3) โ€” cosine similarity on stored transitions world_model.py (330 loc)
Fallback Statistical encoding (mean/std histograms) if checkpoint unavailable Same file, FallbackEncoder
Benchmark 10-run LS20 with persistent memory benchmark_wm.py
Checkpoint vjepa2_vitb_384.pt (~320MB, manual download) HF: facebook/v-jepa-2.1

How It Works

Observation (64ร—64 ARC grid)
    โ†“
V-JEPA 2.1 ViT-B/16 encoder โ†’ 768-dim latent vector
    โ†“
k-NN Predictor (k=3):
  "Which stored transition (latent_t + action โ†’ latent_{t+1}) 
   is most similar to my current latent?"
    โ†“
(predicted_next_latent, confidence 0-1)

Usage

from cogniarc import ScientistAgent

# With V-JEPA checkpoint (320MB, ~6s to load)
agent = ScientistAgent('ls20-9607627b', enable_world_model=True)

# Without checkpoint โ€” uses fallback statistical encoder
agent = ScientistAgent('ls20-9607627b', enable_world_model=True, 
                        world_model_config={'checkpoint_path': None})

# Every step() records transitions
agent.step(1)  # latent_before + action + latent_after โ†’ stored

# Simulate
predicted, confidence = agent._world_model_simulate(action=1)
# โ†’ (768-dim latent, 0.73)

# Report
print(agent._world_model_report())
# โ†’ "World model: 47 transitions, avg confidence 0.61"

Key Features

  • Token-free: World model queries cost 0 LLM tokens
  • k-NN predictor: Learns from real experience โ€” no training needed
  • Graceful degradation: Falls back to statistical encoding if V-JEPA unavailable
  • Memory: 10,000 transitions with automatic eviction, stored in preallocated numpy ring buffers (no per-call rebuild)
  • Per-game persistence: .npz cache in ~/.cache/cogniarc/world_model/
  • Harness-compatible: Optional tool โ€” agent works without it

Current Status

Metric Value
Encoder loaded โœ… V-JEPA 2.1 ViT-B/16
k-NN accuracy (LS20) ~60% (needs more transitions)
Encoder inference time ~6s (V-JEPA) / <1ms (fallback)
k-NN predict() time ~9.7ms at 10k transitions/768-dim (was ~13.4ms โ€” vectorized via einsum, see cogniarc/world_model.py)
Fallback quality Statistical only โ€” 0% real grid understanding
Integration โœ… Wired into ScientistAgent tier chain

โฑ๏ธ Temporal Inference

Time is not an absolute measure. It's the perception of changes between states.

The temporal_inference.py module implements clockless temporal reasoning: "time" is modeled as a sequence of DELTAS (differences between observed states) and METACHANGES (relations between those deltas).

Pattern Description Detection
CONSTANT Same change repeats Equal magnitudes
ACCELERATING Change amplifies Increasing magnitude
DECELERATING Change attenuates Decreasing magnitude
OSCILLATING Change reverses Added pixels = removed
WAVE Change moves Center of mass shifts
STASIS Stable state Magnitude ~0
from cogniarc import TemporalReasoner

r = TemporalReasoner(frames=[grid1, grid2, grid3])
pattern = r.analyze()
print(f"Pattern: {pattern.type.value} (confidence: {pattern.confidence:.0%})")
python -m cogniarc.temporal_inference

๐Ÿ—บ๏ธ Spatial Inference

Space is not a grid of coordinates. It's a set of relations between objects.

The spatial_inference.py module models space as a graph of regions: no absolute ruler โ€” only LEFT_OF, CONTAINS, TOUCHING, ALIGNED_H relations.

Global patterns: SYMMETRY_H, SYMMETRY_V, GRID, CASCADE, RAY, CHAIN, RING, CLUSTER

from cogniarc import SpatialReasoner

sr = SpatialReasoner(grid)
regions = sr.segment()       # -> list[Region]
relations = sr.relate()      # -> list[Relation]
pattern = sr.analyze()       # -> SpatialPattern
python -m cogniarc.spatial_inference

๐Ÿ“Š Benchmark Results (ARC-AGI-3)

โš ๏ธ Read the dev/holdout split before trusting any number below. arc_agi exposes 25 real environments; cogniarc/eval_games.json classifies 15 as dev and 10 as holdout (zero references anywhere in the repo, verified by git grep).

๐ŸŽ‰ ScientistAgent: Generic Harness (2026-07-04)

LS20 Level 1 & 2 SOLVED. The generic harness (observeโ†’hypothesizeโ†’planโ†’executeโ†’verifyโ†’refine) replaces the legacy LS20-specific phase machine. Zero game-specific knowledge โ€” the agent discovers mechanics through observation and exploration.

Game Level Solved Steps Time Notes
ls20-9607627b L1 โœ… 40 ~2s Reproducible. Descend-then-left wall bypass + A* waypoint
ls20-9607627b L2 โœ… 48 ~30s Auto-rotate on changer, walk-on lock collection
sp80 L1 โœ… 17 ~1s ObjectTracker exploration โ€” level completed during random exploration
17 other games L1 โŒ 16-25 ~1s Active exploration (was 1 step before). ObjectTracker learns movement directions but needs better exploit/explore balance

Architecture that made it work

Component Role
Generic harness observeโ†’hypothesizeโ†’planโ†’executeโ†’verifyโ†’refine โ€” game-agnostic
GoalSanityChecker 4 checks (distance, action loop, critic staleness, goal plausibility) โ€” detects wrong-goal loops
Failed hypothesis memory Never repeats a failed hypothesis (lockโ†’changerโ†’lock switch on LS20)
Descend-then-left Wall bypass: when same-column blocked, descend 15 cells then waypoint left
Random exploration "Just give it a go" โ€” unblocks player when stagnation โ‰ฅ 5
ObjectTracker Discovers player, movement directions, and interactable objects without tags
Multi-step exploration 5 exploration steps to feed ObjectTracker (was 1 step before)
Auto-interact Auto-rotates on changer, collects lock by walking on it
A waypoint* Intermediate waypoint when direct path blocked

LS20 Mechanics (discovered 2026-06-28)

Mechanic Detail
Actions 1=UP, 2=DOWN, 3=LEFT, 4=RIGHT (non-standard!)
Step size 5 cells per action
Wall colors {3, 5, 11} โ€” color 5 blocks lock area
Changer at (19,30) โ€” cycles rotation 3โ†’0โ†’1โ†’2โ†’3
Lock at (34,10) โ€” intangible, all rotations valid
Topology Column-34 wall blocks direct path. Player must descend below wall, go left, then up.

Key Metrics

Metric Value
LLM tokens consumed 0 per game (all solvers; nano-LLM tier is opt-in and off by default)
Solve rate (dev) 3/20 games (LS20 L1, LS20 L2, SP80)
Architecture Generic harness + GoalSanityChecker + ObjectTracker + A* + heuristic
L1 steps (LS20) 40 (was 200+ before generic harness)
L2 steps (LS20) 48

๐Ÿ“‰ Holdout generalization (latest measured: 2026-07-05, scripts/run_holdout.py --max-steps 80)

Metric Value ฮ” vs 2026-07-03
Holdout games solved 0 / 10 (0.0%) โ†’ stable
Holdout levels solved 0 / 394 attempted 5 more attempts, still 0
Dev games solved 1 / 15 โ€” only ls20-9607627b (the other 14 dev games have never been run) โ†’ stable
Dev levels solved (LS20) 55 / 96 (57.3%) โ†’ stable
Generalization gap 57.3 pp worse-looking, but see note below

The 40-step LS20 milestone above is real and reproducible. It has not transferred to any of the 10 pristine holdout games โ€” full history and raw run logs: docs/reports/2026-07-05-holdout.md. Reproduce: python scripts/run_holdout.py --list / python scripts/generalization_report.py.

Two bugs are actively blocking holdout progress (from the 2026-07-05 report):

  1. Cross-game import crash ('list' object has no attribute 'get' in generalization.py) โ€” stops sp80 from starting at all, slows every other holdout run.
  2. _navigate_one_step() doesn't use ObjectTracker for real navigation โ€” it still assumes self.player is populated; on holdout games this loops through SocraticCritic COUNTEREXAMPLE warnings 8ร— before giving up, without ever attempting ObjectTracker.current_position()-based movement. This is the same class of bug documented in docs/EVALUATION.md (hardcoded player-attribute lookups), now surfaced in the navigation path specifically rather than just discovery.

Performance Evolution

Date Version Modules L1 Resolution
2026-06-14 v1 (simple BFS) arc_agent.py โŒ Failed
2026-06-15 v2 (BFS + transforms) +transforms.py โœ… 72% (dev-only BFS)
2026-06-25 v3 (Perception) +temporal, spatial, attention, symbolic ๐Ÿšง In progress
2026-06-27 v3.1 (AHOIS) +ScientificState, SocraticCritic, 9 modes ๐Ÿšง In progress
2026-06-28 v3.2 (World Model + micro-NN) +WorldModelTool, micro-NN, heuristic path ๐Ÿšง 0% L1 (mechanics discovered)
2026-07-01 v3.3 (audit) Dev/holdout harness, ObjectTracker, program synthesis DSL ๐Ÿ“Š 0% dev, 0% holdout
2026-07-04 v4.0 (generic harness) ๐ŸŽ‰ GoalSanityChecker, generic phases, descend-then-left, random explore, ObjectTracker hypotheses โœ… LS20 L1 40 steps, L2 48 steps, SP80 17 steps
2026-07-05 Holdout measurement Full 10-game holdout sweep, per-game error logs ๐Ÿ“Š 0/10 holdout, 55/96 dev levels (57.3%), gap 57.3pp โ€” 2 blocking bugs identified
post-07-05 hotfix Import/naming fix world_model/ (physics) renamed to world_model_physics/ โ€” it collided with world_model.py (WorldModelTool/k-NN), silently shadowing it; fixed 7 files' hardcoded /home/redgamer/... absolute imports to relative imports; guarded the physics-tools import block so a future physics-tree issue can't break import cogniarc again ๐Ÿ”ง Package was unimportable outside the original dev machine โ€” now fixed and guarded

๐ŸŽจ Human Skills Track (arc-human-skills)

Learn to READ, WRITE, and PAINT like a human โ€” from absolute zero โ€” using Windows Paint, video tutorials, and iterative self-evaluation.

Five Learning Levels (Drawing Fundamentals)

Level Skills Description
0 โ€” Line Control 13 Horizontal, vertical, 4 diagonals, pressure fade in/out/wave
1 โ€” 2D Primitives 9 Cross, square, rectangle, X, diamond, โ–ณ, hexagon, octagon, circle
2 โ€” 3D Wireframes 8 Cube/box (iso/1pt/2pt), pyramid, prism, cylinder, cone
3 โ€” Perspective 7 Horizon/VPs, grids (ground/wall), ellipses, shadows, measuring
4 โ€” Construction 3 Still life, interior corner, building exterior

Total: 39 drawing skills + 12 writing + 4 reading + 12 painting + 7 transfer = 74 atomic skills in unified DAG.

Key Features

  • Geometric evaluation โ€” Angle tolerance ยฑ3ยฐ, length ยฑ5%, closure <5px (no vision needed for basics)
  • Real Paint automation โ€” pywinauto on Windows, headless fallback on Linux
  • Cross-domain transfer โ€” Strokesโ†’Letters, Primitivesโ†’Shapes, Perspectiveโ†’Scenes
  • SkillDAG mastery โ€” Skills unlock via 5 attempts with avg โ‰ฅ80%

๐Ÿš€ Quick Start

CogniARC Solver (This Repo)

cd ~/projects/cogniarc
pip install -e .
python -m cogniarc.arc_agent --task <arc_task.json>

# With world model (requires V-JEPA checkpoint)
python -c "
from cogniarc import ScientistAgent
agent = ScientistAgent('ls20-9607627b', enable_world_model=True)
"

Windows (Full Training โ€” ODIN-PC)

cd C:\Users\redga\projects\arc-human-skills
run_windows.bat

Linux/WSL (Headless Testing)

cd ~/projects/arc-human-skills
python -m arc_human_skills.trainer --headless --max-sessions 1 --domains drawing

๐Ÿ“‹ Requirements

Component Purpose
Python 3.11+ Runtime
V-JEPA 2.1 checkpoint World model encoder (~320MB, auto-downloaded)
PyTorch + torchvision V-JEPA inference (CPU OK, GPU recommended)
LocalAI on EUREKAI (192.168.1.47:8080) qwen3.6-27b (vision), whisper-1 (STT), tts-1 (TTS)
Qdrant on EUREKAI (192.168.1.47:6333) Vector embeddings

๐Ÿ“ Project Structure

cogniarc/                          # Cognitive solver (this repo)
โ”œโ”€โ”€ cogniarc/
โ”‚   โ”œโ”€โ”€ arc_agent.py                # Main ARC solver entry point
โ”‚   โ”œโ”€โ”€ scientist_agent.py          # ๐Ÿง  Core orchestration: init/step/solve_level/phases (852 lines, down from 1610 โ€” split into mixins below)
โ”‚   โ”œโ”€โ”€ scientist_agent_discovery.py# Mechanics discovery: source reading, wall detection, sprite tags
โ”‚   โ”œโ”€โ”€ scientist_agent_skills.py   # Skill execution: navigate/rotate/interact + phase advance
โ”‚   โ”œโ”€โ”€ scientist_agent_ml_tiers.py # World-model + nano-LLM escalation tiers
โ”‚   โ”œโ”€โ”€ object_perception.py        # ๐Ÿ†• Generic player/wall/action-direction inference โ€” no tags, no hardcoded mapping
โ”‚   โ”œโ”€โ”€ active_experiment.py        # ๐Ÿ†• Pick the action that best disambiguates competing hypotheses (info-gain scoring)
โ”‚   โ”œโ”€โ”€ program_synthesis.py        # ๐Ÿ†• BFS program search over a grid-transform DSL + online discrete-state search (used to plan LS20 rotation for real)
โ”‚   โ”œโ”€โ”€ generalization.py           # ๐Ÿ†• Dev-vs-holdout report (see eval_games.json, docs/EVALUATION.md)
โ”‚   โ”œโ”€โ”€ eval_games.json             # ๐Ÿ†• 15 dev / 10 pristine-holdout game classification
โ”‚   โ”œโ”€โ”€ world_model.py             # V-JEPA 2.1 encoder + k-NN predictor (vectorized storage)
โ”‚   โ”œโ”€โ”€ micro_predictors.py        # โšก Rule-first Domain/Action predictors (NN mode kept for comparison) + NN Pathfinder/CAPTCHA
โ”‚   โ”œโ”€โ”€ grid_viz.py                # ๐Ÿ” Instant ASCII grid visualizer
โ”‚   โ”œโ”€โ”€ audio_cartography.py       # ๐Ÿ”Š 18 paramรจtres, 10 รฉmotions, 10 archรฉtypes
โ”‚   โ”œโ”€โ”€ audio_perception.py        # ๐ŸŽง Son โ†’ comprรฉhension du jeu
โ”‚   โ”œโ”€โ”€ scientific_state.py        # Structured hypothesis/evidence tracking
โ”‚   โ”œโ”€โ”€ socratic_critic.py         # 6 Socratic operations for hypothesis validation
โ”‚   โ”œโ”€โ”€ cognitive_player.py        # 6 cognitive drives + game interface
โ”‚   โ”œโ”€โ”€ pathfinding.py             # A* navigation with walkable overrides
โ”‚   โ”œโ”€โ”€ skill_tree.py              # Cross-game skill transfer
โ”‚   โ”œโ”€โ”€ temporal_inference.py      # โฑ๏ธ Time as change patterns
โ”‚   โ”œโ”€โ”€ spatial_inference.py       # ๐Ÿ—บ๏ธ Space as region relations
โ”‚   โ”œโ”€โ”€ attention.py               # Focus follows changes
โ”‚   โ”œโ”€โ”€ symbolic_inference.py      # Perception โ†’ SkillDAG bridge
โ”‚   โ”œโ”€โ”€ skill_dag/                 # SkillDAG v2 (atomic skills)
โ”‚   โ”œโ”€โ”€ benchmark_tracker.py       # JSONL experiment tracking
โ”‚   โ””โ”€โ”€ goal_inference.py          # Goal hypothesis from observation
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ run_holdout.py             # ๐Ÿ†• Run ScientistAgent on holdout games; refuses dev games by default
โ”‚   โ”œโ”€โ”€ generalization_report.py   # ๐Ÿ†• Dev-vs-holdout solve-rate report
โ”‚   โ”œโ”€โ”€ benchmark_rules_vs_nn.py   # Logic-vs-micro-NN accuracy comparison
โ”‚   โ””โ”€โ”€ demo_program_synthesis.py  # ๐Ÿ†• synthesize -> verify-on-holdout demo
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ EVALUATION.md              # ๐Ÿ†• Dev/holdout discipline + every empirical result this session found
โ”œโ”€โ”€ tests/                         # 127 passing
โ””โ”€โ”€ README.md

arc-human-skills/                  # Human skills (separate repo)
โ”œโ”€โ”€ arc_human_skills/
โ”‚   โ”œโ”€โ”€ drawing_fundamentals/      # Levels 0-4 + geometric evaluators
โ”‚   โ”‚   โ”œโ”€โ”€ line_control.py        # Level 0: motor control
โ”‚   โ”‚   โ”œโ”€โ”€ primitives_2d.py       # Level 1: 2D shapes
โ”‚   โ”‚   โ”œโ”€โ”€ wireframe_3d.py        # Level 2: 3D wireframes
โ”‚   โ”‚   โ”œโ”€โ”€ perspective.py         # Level 3: perspective
โ”‚   โ”‚   โ”œโ”€โ”€ construction.py        # Level 4: scenes
โ”‚   โ”‚   โ”œโ”€โ”€ eval_utils.py          # ๐Ÿ†• Extract + evaluate drawn strokes
โ”‚   โ”‚   โ””โ”€โ”€ curriculum.py          # Orchestrator + 74-skill SkillDAG
โ”‚   โ”œโ”€โ”€ reading/                   # Letter recognition + Qdrant
โ”‚   โ”œโ”€โ”€ writing/                   # Zaner-Bloser strokes + letters
โ”‚   โ”œโ”€โ”€ painting/                  # Shapes + Bob Ross landscapes
โ”‚   โ”œโ”€โ”€ paint_automation.py        # Windows Paint control
โ”‚   โ””โ”€โ”€ trainer.py                 # Main training loop
โ”œโ”€โ”€ tests/                         # 70 passed, 10 skipped (Linux)
โ””โ”€โ”€ README.md

๐Ÿ”Š Audio Cartography โ€” Sound Skills

"Chaque paramรจtre sonore est cataloguรฉ comme les jeux ARC-AGI-3 : effet perรงu โ†’ symbole โ†’ application."

The audio_cartography.py module maps 18 audio parameters to their perceptual effects, symbolic meanings, and practical applications โ€” treating sound design as a cognitive skill to be mastered.

Category Parameters
Dynamics gain, envelope attack/decay/sustain/release
Spectral frequency, timbre, brightness, warmth, air
Modulation vibrato, tremolo, chorus, flanger, phaser
Spatial pan, reverb, delay
Articulation portamento, glissando, staccato/legato

Each parameter maps to:

  • Perceptual effect โ€” what the human ear/brain perceives
  • Symbolic meaning โ€” what the sound communicates (urgency, calm, closeness, mystery)
  • ARC-AGI-3 pattern โ€” which reasoning skill it exercises (temporal, spatial, symbolic)
  • 10 emotions + 10 archetypes โ€” affective mapping for generative audio
from cogniarc.audio_cartography import AudioParameter, AudioParameterMap

freq_map = AudioParameterMap.get(AudioParameter.FREQUENCY)
print(freq_map.what_it_does)     # "Hauteur perรงue. Aigu = petit, proche, urgent. Grave = grand, lointain, calme."
print(freq_map.emotion)          # Emotion.JOY (high) / Emotion.SADNESS (low)
print(freq_map.archetype)        # Archetype.TRICKSTER (high) / Archetype.SAGE (low)

Related: audio_perception.py โ€” bridges audio analysis to CognitiveDrives (novelty response to new sounds, caution response to sudden loudness).


โšก Micro-NN Models (Hugging Face)

Four micro neural networks trained in pure NumPy, deployed in Rust (<400KB binary, <1ms inference). Zero LLM tokens.

Terminology โ€” three distinct model tiers, don't confuse them:

  • Micro-NN โ€” these 4 tiny NumPy/Rust nets (deterministic classifiers/regressors). Published on HF as cogniarc-nano-nn.
  • Nano-LLM โ€” Qwen2.5-0.5B, a real (small) language model run via Ollama. See nano_llm.py.
  • V-JEPA โ€” the world-model encoder. See world_model.py.
Model Architecture NN acc Logic baseline Verdict
Domain Classifier 6โ†’12โ†’4 (relu+softmax) 59% 90.8% (rules) โš ๏ธ use logic
Action Predictor 8โ†’16โ†’1 (relu+sigmoid) 77.5% 92.1% (rules) โš ๏ธ use logic
Pathfinder 105โ†’64โ†’32โ†’4 (relu+softmax) 99.6% walls A*/BFS exact NN as reactive prior only
CAPTCHA Classifier ๐Ÿ†• 256โ†’64โ†’32โ†’6 (relu+softmax) 100% test none (perception) โœ… keep NN

Models published on HF: cogniarc-nano-nn. Numbers above measured by scripts/benchmark_rules_vs_nn.py โ€” see Logic vs Micro-NN.

Pattern: train in Python (numpy) โ†’ export JSON โ†’ infer in Rust (serde only)

# Rust inference โ€” same binary, different JSON
./domain-classifier domain_classifier.json 1.0 1.0 0.3 0.35 0.45 0.02
# โ†’ movement (conf=1.00)

./domain-classifier action_predictor.json 0.3 0.0 0.3 0.33 0 0.0 0 0.1
# โ†’ 0.544 (success probable)

./domain-classifier captcha_classifier.json <64 grayscale values>
# โ†’ turnstile (conf=0.98)

Tiered escalation in ScientistAgent:

Micro-NN (5ยตs) โ†’ if low conf โ†’ ๐Ÿค– Nano-LLM HF (<1s) โ†’ if low conf โ†’ ๐ŸŒ V-JEPA (6s) โ†’ if fails โ†’ ๐Ÿงฑ Heuristic
  • Micro-NN (4 models): domain, action, pathfinder, CAPTCHA โ€” ultra-cheap, deterministic โœ… wired
  • Nano-LLM HF (Qwen2.5-0.5B): reads game state, proposes actions โ€” wrapped in NanoLLMHarness for safety. ๐Ÿšง opt-in tier โ€” enable with ScientistAgent(..., enable_nano_llm=True) (requires Ollama); exposed via agent._nano_propose_action(). Not yet auto-invoked by the phase machine.
  • V-JEPA (world_model.py): simulates "what if I do X?" via k-NN on stored transitions โœ… wired (enable_world_model=True)
  • Heuristic: deterministic wall circumvention โ€” never fails if topology is understood โœ… wired

๐Ÿงฎ Logic vs Micro-NN: when to learn, when to code

We benchmarked our own micro-NNs against plain logic baselines (if/and/or) on the same held-out distribution the nets were trained on. The result is deliberate and reported honestly:

Task Micro-NN Logic rule ฮ”
Domain classification (4-class) 59.0% 90.8% +31.9
Action success (binary) 77.5% 92.1% +14.6

Reproduce: python scripts/benchmark_rules_vs_nn.py

Why logic wins here. Both training sets are generated by rules (see micro_nn/train_domain.py, train_action.py): a sample's label is a rule. A net trained to imitate a known rule can only ever be a lossy, opaque copy of it โ€” so a few hand-written thresholds reproduce the decision boundary almost exactly, while the NN under-fits the overlap and amplifies the injected label noise. This is the classic tabular / known-mapping regime where simple models dominate (Grinsztajn et al., NeurIPS 2022; Rudin, Nature MI 2019), and it echoes the historical lesson that NNs exist for mappings logic can't separate cheaply (XOR needs a hidden layer โ€” Minsky & Papert, 1969), not for ones you can already write down.

Our routing policy (cogniarc/micro_predictors.py, rule-first by default):

Predictor Mapping Decision
Domain, Action known rule logic (mode="rule") โ€” exact, 0-param, interpretable
Pathfinder unknown/partial map A*/BFS exact when walls known; NN only as a fast reactive prior
CAPTCHA raw pixels โ†’ type NN โ€” genuine perception, no closed-form rule

How to actually make the kept NNs earn their place

The fix is not bigger nets โ€” it is training where the mapping is genuinely unknown, and gating every NN behind the simple baseline it must beat:

  1. Train on real data, not rule-generated synthetics. Replace generate_*_data() with logged game observations / real CAPTCHA screenshots. If a net trained on synthetics can't beat the rule that generated them, it has learned nothing new.
  2. Report a generalization number, not "% synth". Use a real train/val/test split and publish the held-out accuracy + the gap.
  3. Always ship the baseline. Every NN result is paired with the logic/A*/ majority baseline. A net only ships if it beats the baseline on real, unseen data (this repo now enforces that for Domain/Action in tests/test_predictors.py).
  4. Pathfinder โ†’ imitation learning. Train on A*-optimal trajectories over many real maps; success metric = goal-reach rate on unseen mazes vs A*, not per-step accuracy. Justified only if it generalizes where A* is too slow or the map is partially observed.
  5. CAPTCHA โ†’ real distribution + capacity. Real screenshots, augmentation, higher input resolution than 8ร—8, calibrated confidence; this is the one task with no closed-form rule, so it's where NN investment pays off.
  6. Calibrate "confidence." Today it's an argmax/softmax artifact; use temperature scaling or held-out reliability so the escalation chain trusts it correctly.

TL;DR โ€” Code the rule when you know it; learn the function when you don't; and never let a net into production without beating the dumb baseline on real data.

References

  • F. Chollet, On the Measure of Intelligence (2019), arXiv:1911.01547 โ€” ARC favors program/rule induction over pattern fitting.
  • L. Grinsztajn, E. Oyallon, G. Varoquaux, Why do tree-based models still outperform deep learning on tabular data? NeurIPS 2022, arXiv:2207.08815.
  • C. Rudin, Stop explaining black box ML for high-stakes decisions and use interpretable models instead, Nature Machine Intelligence 2019, arXiv:1811.10154.
  • M. Minsky, S. Papert, Perceptrons (1969) โ€” the XOR limitation of linear units.
  • D. Wolpert, W. Macready, No Free Lunch Theorems for Optimization (1997) โ€” no model is universally best; match inductive bias to the problem.
  • R. Sutton, The Bitter Lesson (2019) โ€” learning+search scale with compute; the nuance: it assumes you lack the rule and have the data/compute.

๐Ÿ”— Related Projects

Repo Description
hermes-agent Hermes Agent framework
arc-human-skills Human skills track (drawing/writing/reading/painting)
cogniarc-nano-nn ๐Ÿ†• Micro-NNs for ARC-AGI-3 (Rust, 394KB)
hermes-fusion Multi-LLM fusion engine (Rust + Python)
turboquant Autonomous trading agent
ultimate-odycer MMORPG server

๐Ÿ“š Documentation


๐Ÿ“œ License

MIT โ€” See LICENSE for details.


Built for ARC-AGI-3 โ€” Advancing cognitive generalization through world models, socratic reasoning, and human-like skill acquisition.

About

Cognitive ARC-AGI-3 solver: 6 human-like drives, 10 reasoning modes (incl. simulation physique), 20 domaines physiques, micro-NN experts (580 params), multi-agent architecture.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages