Benchmark
ARC-AGI-1 was created in 2019 (before the rise of LLMs). It endured five years of global competitions, a 50,000x scale-up of base LLMs, and saw little progress until late 2024, with the introduction of test-time adaptation methods pioneered by ARC Prize 2024 entrants and OpenAI.
ARC-AGI-2 - the next iteration of the benchmark - is designed to stress-test the capabilities of state-of-the-art AI reasoning systems, provide useful signal on AGI progress, and inspire researchers to work on new ideas.
Can you create a system that can reach 85% accuracy?
aicpp approach
aicpp approaches ARC-AGI-2 as a program synthesis problem.
Given demonstrations:
input → output
the system searches for an executable DSL program that reproduces the observed transformations.
DSL
Types
BooleanIntegerTypeIntegerTupleNumericalIntegerSetGridTypeCellObjectTypeObjectsIndicesTypeIndicesSetPatchElementPiece
Constants
FTZEROONETWOTHREEFOURFIVESIXSEVENEIGHTNINETENNEG_ONENEG_TWODOWNRIGHTUPLEFTORIGINUNITYNEG_UNITYUP_RIGHTDOWN_LEFTZERO_BY_TWOTWO_BY_ZEROTWO_BY_TWOTHREE_BY_THREE
Functions
identity: identity functionadd: additionsubtract: subtractionmultiply: multiplicationdivide: floor divisioninvert: inversion with respect to additioneven: evennessdouble_: scaling by twohalve: scaling by one halfflip: logical notequality: equalitycontained: element ofcombine: unionintersection: returns the intersection of two containersdifference: set differencededupe: remove duplicatesorder: order container by custom keyrepeat: repetition of item within vectorgreater: greatersize: cardinalitymerge: mergingmaximum: maximumminimum: minimumvalmax: maximum by custom functionvalmin: minimum by custom functionargmax: largest item by custom orderargmin: smallest item by custom ordermostcommon: most common itemleastcommon: least common iteminitset: initialize containerboth: logical andeither: logical orincrement: incrementingdecrement: decrementingcrement: incrementing positive and decrementing negativesign: signpositive: positivetoivec: vector pointing verticallytojvec: vector pointing horizontallysfilter: keep elements in container that satisfy conditionmfilter: filter and mergeextract: first element of container that satisfies conditiontotuple: conversion to tuplefirst: first item of containerlast: last item of containerinsert: insert item into containerremove: remove item from containerother: other value in the containerinterval: rangeastuple: constructs a tupleproduct: cartesian productpair: zipping of two tuplesbranch: if else branchingcompose: function compositionchain: function composition with three functionsmatcher: construction of equality functionrbind: fix the rightmost argumentlbind: fix the leftmost argumentpower: power of functionfork: creates a wrapper functionapply: apply function to each item in containerrapply: apply each function in container to valuemapply: apply and mergepapply: apply function on two vectorsmpapply: apply function on two vectors and mergeprapply: apply function on cartesian productmostcolor: most common colorleastcolor: least common colorheight: height of grid or patchwidth: width of grid or patchshape: height and width of grid or patchportrait: whether height is greater than widthcolorcount: number of cells with colorcolorfilter: filter object by colorsizefilter: filter items by sizeasindices: indices of all grid cellsofcolor: indices of all grid cells with valueulcorner: index of upper left cornerurcorner: index of upper right cornerllcorner: index of lower left cornerlrcorner: index of lower right cornercrop: subgrid specified by start and dimensiontoindices: indices of object cellsrecolor: recolor patchshift: shift patchnormalize: moves upper left corner to origindneighbors: directly adjacent indicesineighbors: diagonally adjacent indicesneighbors: adjacent indicesobjects: Objects occurring on the gridpartition: each cell with the same value part of the same objectfgpartition: each cell with the same value part of the same object without backgrounduppermost: row index of uppermost occupied celllowermost: row index of lowermost occupied cellleftmost: column index of leftmost occupied cellrightmost: column index of rightmost occupied cellsquare: whether the piece forms a squarevline: whether the piece forms a vertical linehline: whether the piece forms a horizontal linehmatching: whether there exists a row for which both patches have cellsvmatching: whether there exists a column for which both patches have cellsmanhattan: closest manhattan distance between two patchesadjacent: whether two patches are adjacentbordering: whether a patch is adjacent to a grid bordercenterofmass: center of masspalette: colors occurring in object or gridnumcolors: number of colors occurring in object or gridcolor: color of objecttoobject: object from patch and gridasobject: conversion of grid to objectrot90: quarter clockwise rotationrot180: half rotationrot270: quarter anticlockwise rotationhmirror: mirroring along horizontalvmirror: mirroring along verticaldmirror: mirroring along diagonalcmirror: mirroring along counterdiagonalfill: fill value at indicespaint: paint object to gridunderfill: fill value at indices that are backgroundunderpaint: paint object to grid where there is backgroundhupscale: upscale grid horizontallyvupscale: upscale grid verticallyupscale: upscale object or griddownscale: downscale object or gridhconcat: concatenate two grids horizontallyvconcat: concatenate two grids verticallysubgrid: smallest subgrid containing objecthsplit: split grid horizontallyvsplit: split grid verticallycellwise: cellwise match of two gridsreplace: color substitutionswitch_: color switchingcenter: center of the patchposition: relative position between two patchesindex: color at locationcanvas: grid constructioncorners: indices of cornersconnect: line between two pointscover: remove object from gridtrim: trim border of gridmove: move object on gridtophalf: upper half of gridbottomhalf: lower half of gridlefthalf: left half of gridrighthalf: right half of gridvfrontier: vertical frontierhfrontier: horizontal frontierbackdrop: indices in bounding box of patchdelta: indices in bounding box but not part of patchgravitate: direction to move source until adjacent to destinationinbox: inbox for patchoutbox: outbox for patchbox: outline of patchshoot: line from starting point and directionoccurrences: locations of occurrences of object in gridfrontiers: set of frontierscompress: removes frontiers from gridhperiod: horizontal periodicityvperiod: vertical periodicity
Search
aicpp formulates ARC solving as a constrained program synthesis problem.
Starting from the identity program I, the system iteratively generates candidate programs using the neural model. The model combines representations of the ARC task, the current program structure, and its execution cost to predict the next program tokens.
Program generation is constrained by the DSL grammar and the current AST state. This prevents syntactically invalid programs from entering the search space.
At each iteration, generated candidates are executed symbolically on the training examples. Their outputs are compared with the expected outputs and a cost is computed. The resulting candidates are then ranked, and the most promising programs are retained for subsequent search iterations.
The process can be summarized as:
ARC task
↓
Task representation
↓
Neural program generation
↓
DSL-constrained candidate programs
↓
Symbolic execution
↓
Cost evaluation
↓
Candidate selection
↓
Next search iteration
The search terminates when an exact solution is found, when the search budget is exhausted, or when no further improvement is obtained.
Evaluation protocol
aicpp evaluates candidate programs by executing them on the ARC demonstrations and comparing their outputs with the expected outputs.
Training examples
For each ARC task, the training examples consist of input/output grid pairs provided by the benchmark.
Candidate programs are executed on every training input. Their generated grids are compared with the corresponding expected outputs, and a training cost is computed from these comparisons.
The training cost is used to guide program search and to rank candidate programs.
Test examples
Once the search process has produced a set of promising candidate programs, the candidates are executed on the test inputs provided by the benchmark.
Test outputs are not used to train or guide the model. They are used only to evaluate whether the synthesized programs generalize to unseen inputs.
Symbolic execution
Every candidate is executed by the aicpp symbolic engine using the operations defined by the DSL.
Because programs are executable symbolic objects, their behavior can be evaluated deterministically on arbitrary ARC grids.
Cost
The cost function measures the discrepancy between the program outputs and the expected training outputs.
A cost of zero means that the candidate reproduces all expected training outputs exactly.
Lower costs therefore indicate better agreement with the demonstrations.
Exact match
A program is considered an exact solution for a task when its output matches the expected output for every relevant example.
For a test example, an exact match means that every cell of the predicted grid is identical to the corresponding cell of the ground-truth grid.
Candidate selection
At each search iteration, generated candidates are evaluated and ranked according to their cost.
Only the most promising candidates are retained for subsequent iterations. This limits the effective search space while allowing the neural model to progressively refine its exploration of the DSL program space.
The final evaluation is performed by executing the selected candidate programs on the benchmark test inputs and checking for exact grid matches.
An interesting aspect of the evaluation is that training cost and test performance are not necessarily perfectly correlated. In particular, some synthesized programs may fail to reproduce all training examples while still producing the correct output on unseen test inputs. This provides an additional perspective on the generalization properties of the learned program search.
Current results
- 10.83% on subset of public training dataset (120 tasks)
- 0% on public evaluation dataset
- 0% on private dataset