This repository contains the official implementation of experiments for the paper Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning. This includes PPO, SAC, and DreamerV3 implementations along with scripts to reproduce all results.
The code for PPO and SAC was adapted from the CleanRL implementation, and the code for DreamerV3 was adapted from the official implementation. The benchmark environment itself can be found here.
- Setup the benchmark
To install the Sliding Puzzles Gym (SPGym), run the following commands:
git clone https://github.com/bryanoliveira/sliding-puzzles-gym
cd sliding-puzzles-gym
pip install -e .To use the imagenet-1k dataset you will also need to download the dataset from https://huggingface.co/datasets/ILSVRC/imagenet-1k/blob/main/data/val_images.tar.gz and extract it to <package install location>/imgs/imagenet-1k. You can do this automatically by running the following command:
sliding-puzzles setup imagenetYou can also use the diffusiondb dataset by running the following command:
sliding-puzzles setup diffusiondb- Prepare Python environments
Create separate Python environments for Dreamer and PPO. requirements.txt can be found inside each correspondent folder, and Dockerfiles are also available. See dreamerv3/README.md and ppo_sac/README.md for more details.
Scripts for reproducing the paper results can be found in dreamerv3/scripts and ppo_sac/scripts. Seeds are generated automatically by the algorithms if not specified. For example, inside dreamerv3 folder, run:
bash scripts/run.sh
These are the expected results:
Learning curves for DreamerV3, PPO and SAC variants. Shaded regions represent 95% confidence intervals across 5 independent runs.
Success rate as a function of environment steps. The gradual increase in representation complexity affects the sample efficiency of standard PPO, SAC, and DreamerV3 agents at different rates. Each line represents a different pool size, from 1 to 100 images. Shaded regions represent 95% confidence intervals across 5 independent seeds.






