An open API service indexing awesome lists of open source software.

https://github.com/neoneye/simon-arc-env

Abstraction and Reasoning Corpus as a Farama Gymnasium environment.
https://github.com/neoneye/simon-arc-env

arc-agi gym-environment gymnasium reinforcement-learning reinforcement-learning-environments

Last synced: about 2 months ago
JSON representation

Abstraction and Reasoning Corpus as a Farama Gymnasium environment.

Awesome Lists containing this project

README

          

# Simon ARC Env


simon arc env



Action Space
Discrete(10)


Observation Shape
(32, 32)


Observation High
255


Observation Low
0


Import
import simon_arc_env
gymnasium.make("SimonARC-v0")

## Description

[Abstraction and Reasoning Corpus](https://github.com/fchollet/ARC) as a [Farama Gymnasium](https://github.com/Farama-Foundation/Gymnasium) environment.

Related project: [ARCLE - ARC Learning Environment](https://github.com/ConfeitoHS/arcle).

### Installation

```bash
pip install simon-arc-env
```

### Usage

1. Play it by running

```bash
python examples/play.py
```

Press `space` to draw a pixel.

2. Import it to train your RL model

```python
import simon_arc_env
env = gymnasium.make("SimonARC-v0")
```

The package relies on ```import``` side-effects to register the environment
name so, even though the package is never explicitly used, its import is
necessary to access the environment.

## Action Space

`SimonARC` has the action space `Discrete(10)`.

| Value | Key | Meaning |
|-------|-------------|-----------------------|
| 0 | TAB | Next page |
| 1 | Return | Submit drawing |
| 2 | Space | Set pixel |
| 3 | Arrow up | Move `cursor_y` up |
| 4 | Arrow down | Move `cursor_y` down |
| 5 | Arrow left | Move `cursor_x` left |
| 6 | Arrow right | Move `cursor_x` right |
| 7 | m | Increment color |
| 8 | n | Decrement color |
| 9 | s | Adjust canvas size |
| N/A | Escape | Exit game |
| N/A | i | Print info to console |

## Observation Space

Observation space `Box(low=0, high=255, shape=(32, 32), dtype=np.uint8)`.

### Rewards

If you solve the task you get `10000` in reward.

If you predict the `width` correct you get `100` in reward.

If you predict the `height` correct you get `100` in reward.

If your prediction have the correct histogram you get `100` in reward.

## Run tests

```bash
make test
```

## Version History

- v0: initial version release