ARCLE is a RL environment for training Abstraction and Reasoning Corpus and ARC-like datasets, built on Farama Gymnasium.
ARCLE implements several environments with various actions on editing grids of ARC, with object-oriented grid operations. Inspired by O2ARC Interface, O2ARC 3.0 - the game-like human interface collecting human ARC solutions, ARCLE contains this interface as a RL environment, as well as the testing interface given with ARC Dataset.
Our work is presented at CoLLAs 2024! This paper contains initial experiments equipping ARCLE with PPO-optimized pixel-wise transformer on small grid pairs, in addition to a detailed description of ARCLE. Check out our Paper.
Python >= 3.8
pip install arcle
Env Name | Description | Latest Version |
---|---|---|
RawARCEnv |
Environment with actions only coloring, resizing to answer grid, and submit operations | v0 |
ARCEnv |
Implements browser-based testing interface of ARC, with coloring, flood-filling, copy and paste | v0 |
O2ARCv2Env |
Implements O2ARCv2 Interface, an extension of ARCEnv containing Move, Rotate, Flip, Crop, ... |
v0 |
Env Changes
O2ARCv2Env
is accessible via O2ARCEnv
or O2ARCEnv-v2
.np.int8
(that were previously np.uint8
)Box
or MultiBinary
to flatten observations properly by Gymnasium APIs@abstractmethod
) requirements of AbstractARCEnv
. Now user must only override create_operations
only.Added action wrappers (BBoxWrapper
, PointWrapper
) to change selection
to bounding box selection or one-point selection.
Loader
now supports definable random number generator.
Orginized examples
Bug Fix
terminated
is not emitted when max_trial
is infinity (-1)Python 3.8 Support (minimum requirement of Gymnasium)
Env Changes
ARCEnv
into RawARCEnv
in this version.MiniARCEnv
. Please use RawARCEnv
with loader=MiniARCLoader()
instead.ARCEnv
added, consisting action space of ARC testing interface given along with the ARC Dataset.current_state
dictionary.
state
and action
, and it changes state
in-place.env.transition(state_copied, action)
to get next state without changing original state on O2ARCv2Env
. env.transition
will be replaced as separated utility function in the future.gym.make()
by putting argument max_trial=num
. Unlimited trial mode is available when it is set by -1 (default).Submit
operation. It is defined in each env class as a method, not in a separated module.
reset_on_submit
in env.reset
(default=False
)Bug fix
FloodFill
operation without selection case fixedPaste
operation out-of-bound case fixedCopyI
operation out-of-bound case fixedResizeGrid
action to CropGrid
actionFloodFill
action to select only one pixel (otherwise, it is NoOP)CopyI
, CopyO
, Paste
regards black pixels (pixel value 0) as a background. It copies pixels where the value is nonzero and the pixel is selected.action['selection']
can handle int (automatically casts into np.bool_
)current_grid
variable to grid
& grid_dim
selection
and selected
. Some internal variables should be initialized.