# fchollet/arc-agi architecture

> Architecture diagram of the GitHub repository fchollet/arc-agi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fchollet/arc-agi
- Repository: https://github.com/fchollet/arc-agi

## Overview

ARC-AGI-1 is a benchmark dataset plus a browser tool for manually solving its grid tasks. A user loads a task, reviews training demonstrations and test inputs, edits an output grid with resize, copy, selection, and floodfill tools, then submits it for exact-answer validation and moves through remaining test inputs. The task corpus has separate training and evaluation sets. The excerpts establish grid rendering and state synchronization, but omit some handlers and the HTML wiring, so only documented or directly evidenced relationships are shown.

Main entry points: [`apps/js/testing_interface.js`](https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js) (Task loading), [`apps/testing_interface.html`](https://github.com/fchollet/arc-agi/blob/master/apps/testing_interface.html) (Testing interface), [`apps/js/common.js`](https://github.com/fchollet/arc-agi/blob/master/apps/js/common.js) (Grid rendering), [`data/training`](https://github.com/fchollet/arc-agi/tree/master/data/training) (Training tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Solve Tasks"]
  node_interface["Testing interface"]
  node_task_loading["Task loading"]
  node_demonstrations["Training demonstrations"]
  node_test_inputs["Test inputs"]
  node_answer_check["Answer validation"]
end

subgraph group_dataset["Task Corpus"]
  node_training[("Training tasks")]
  node_evaluation[("Evaluation tasks")]
end

subgraph group_grid["Grid Interaction"]
  node_grid_model["Grid model<br/>[common.js]"]
  node_grid_view["Grid rendering<br/>[common.js]"]
  node_grid_tools["Grid editing tools"]
  node_grid_state["Grid state sync"]
  node_floodfill["Floodfill<br/>[common.js]"]
end

node_solver(("Human solver"))

node_solver -->|"uses"| node_interface
node_interface -->|"hosts"| node_task_loading
node_task_loading -->|"loads task"| node_training
node_task_loading -->|"loads pairs"| node_demonstrations
node_task_loading -->|"loads pairs"| node_test_inputs
node_solver -->|"edits output"| node_grid_tools
node_grid_tools -->|"synchronizes"| node_grid_state
node_grid_tools -->|"offers tool"| node_floodfill
node_grid_tools -->|"updates display"| node_grid_view
node_grid_view -->|"renders grid"| node_grid_model
node_answer_check -->|"reads output"| node_grid_state
node_answer_check -->|"checks expected output"| node_test_inputs
node_solver -->|"submits answer"| node_answer_check
node_solver -.->|"may evaluate"| node_evaluation

click node_interface "https://github.com/fchollet/arc-agi/blob/master/apps/testing_interface.html"
click node_task_loading "https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js"
click node_demonstrations "https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js"
click node_test_inputs "https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js"
click node_answer_check "https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js"
click node_training "https://github.com/fchollet/arc-agi/tree/master/data/training"
click node_evaluation "https://github.com/fchollet/arc-agi/tree/master/data/evaluation"
click node_grid_model "https://github.com/fchollet/arc-agi/blob/master/apps/js/common.js"
click node_grid_view "https://github.com/fchollet/arc-agi/blob/master/apps/js/common.js"
click node_grid_tools "https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js"
click node_grid_state "https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js"
click node_floodfill "https://github.com/fchollet/arc-agi/blob/master/apps/js/common.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_interface,node_task_loading,node_demonstrations,node_test_inputs,node_answer_check toneBlue
class node_training,node_evaluation toneAmber
class node_grid_model,node_grid_view,node_grid_tools,node_grid_state,node_floodfill toneMint
class node_solver toneIndigo
```

## Components

### Solve Tasks

- [Testing interface](https://github.com/fchollet/arc-agi/blob/master/apps/testing_interface.html): `apps/testing_interface.html`
- [Task loading](https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js): `apps/js/testing_interface.js`
- [Training demonstrations](https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js): `apps/js/testing_interface.js`
- [Test inputs](https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js): `apps/js/testing_interface.js`
- [Answer validation](https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js): `apps/js/testing_interface.js`

### Task Corpus

- [Training tasks](https://github.com/fchollet/arc-agi/tree/master/data/training): `data/training`
- [Evaluation tasks](https://github.com/fchollet/arc-agi/tree/master/data/evaluation): `data/evaluation`

### Grid Interaction

- [Grid model](https://github.com/fchollet/arc-agi/blob/master/apps/js/common.js): `apps/js/common.js`
- [Grid rendering](https://github.com/fchollet/arc-agi/blob/master/apps/js/common.js): `apps/js/common.js`
- [Grid editing tools](https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js): `apps/js/testing_interface.js`
- [Grid state sync](https://github.com/fchollet/arc-agi/blob/master/apps/js/testing_interface.js): `apps/js/testing_interface.js`
- [Floodfill](https://github.com/fchollet/arc-agi/blob/master/apps/js/common.js): `apps/js/common.js`

### Other components

- **Human solver**

## Connections

- Human solver → Testing interface: uses (evidence: `README.md`)
- Testing interface → Task loading: hosts (evidence: `README.md`)
- Task loading → Training tasks: loads task (evidence: `apps/js/testing_interface.js`)
- Task loading → Training demonstrations: loads pairs (evidence: `apps/js/testing_interface.js`)
- Task loading → Test inputs: loads pairs (evidence: `apps/js/testing_interface.js`)
- Human solver → Grid editing tools: edits output (evidence: `README.md`)
- Grid editing tools → Grid state sync: synchronizes (evidence: `apps/js/testing_interface.js`)
- Grid editing tools → Floodfill: offers tool (evidence: `README.md`)
- Grid editing tools → Grid rendering: updates display (evidence: `apps/js/common.js`)
- Grid rendering → Grid model: renders grid (evidence: `apps/js/common.js`)
- Answer validation → Grid state sync: reads output (evidence: `apps/js/testing_interface.js`)
- Answer validation → Test inputs: checks expected output (evidence: `apps/js/testing_interface.js`)
- Human solver → Answer validation: submits answer (evidence: `README.md`)
- Human solver → Evaluation tasks: may evaluate (evidence: `README.md`)
