                        Sliding Puzzles Gym: A Scalable Benchmark for
                     State Representation in Visual Reinforcement Learning


              Bryan L. M. de Oliveira 1 2 Luana G. B. Martins 1 Bruno Brandão 1 2 Murilo L. da Luz 1 2
                                  Telma W. de L. Soares 1 2 Luckeciano C. Melo 1 3


                          Abstract                                      1. Introduction
                                                                        Learning meaningful representations from raw sensory in-
       Effective visual representation learning is crucial              puts, such as visual data, is fundamental to reinforcement
       for reinforcement learning (RL) agents to extract                learning (RL) agents’ ability to generalize across different
       task-relevant information from raw sensory in-                   tasks in complex, open-world environments (Bengio et al.,
       puts and generalize across diverse environments.                 2013; Lesort et al., 2018). In visual RL, agents must process
       However, existing RL benchmarks lack the ability                 high-dimensional pixel data, extract useful features, and uti-
       to systematically evaluate representation learning               lize these features for decision-making (Mnih et al., 2015;
       capabilities in isolation from other learning chal-              Yarats et al., 2021a). This becomes especially crucial as
       lenges. To address this gap, we introduce the Slid-              real-world applications demand adaptability to unstructured
       ing Puzzles Gym (SPGym), a novel benchmark                       and diverse observations. However, measuring an agent’s
       that transforms the classic 8-tile puzzle into a vi-             representation learning capabilities independently of other
       sual RL task with images drawn from arbitrarily                  learning tasks, such as policy optimization or dynamics
       large datasets. SPGym’s key innovation lies in its               modeling, remains a key challenge in RL benchmarks.
       ability to precisely control representation learning
       complexity through adjustable grid sizes and im-                 While traditional RL benchmarks such as Atari (Bellemare
       age pools, while maintaining fixed environment                   et al., 2013) and DeepMind Control Suite (Tassa et al., 2018)
       dynamics, observation, and action spaces. This                   offer valuable evaluation platforms for overall agent effec-
       design enables researchers to isolate and scale the              tiveness, their performance metrics inherently intertwine
       visual representation challenge independently of                 representation learning with policy optimization and envi-
       other learning components. Through extensive ex-                 ronment dynamics. More recent dedicated benchmarks for
       periments with model-free and model-based RL                     visual learning, though promising, fall short in their capac-
       algorithms, we uncover fundamental limitations                   ity to precisely modulate visual complexity. For instance,
       in current methods’ ability to handle visual diver-              ProcGen (Cobbe et al., 2020) simultaneously modifies both
       sity. As we increase the pool of possible images,                visual and task difficulty, obscuring the specific impact
       all algorithms exhibit in- and out-of-distribution               of representation learning, while the Distracting Control
       performance degradation, with sophisticated rep-                 Suite (Stone et al., 2021) introduces visual distractors that
       resentation learning techniques often underper-                  are unrelated to the main task and can be safely disregarded
       forming simpler approaches like data augmen-                     by the model. Consequently, current benchmarks lack the
       tation. These findings highlight critical gaps in                necessary precision to systematically assess an agent’s abil-
       visual representation learning for RL and estab-                 ity to acquire task-relevant visual representations.
       lish SPGym as a valuable tool for driving progress               To address this gap, we introduce the Sliding Puzzles Gym
       in robust, generalizable decision-making systems.                (SPGym)1 , an open-source benchmark created to evaluate
                                                                        how agents handle increasingly diverse visual observations
   1
                                                                        across training runs. As depicted in Figure 1, SPGym trans-
    Advanced Knowledge Center for Immersive Technologies                forms the classic 8-tile puzzle into a visual RL challenge
– AKCIT, Brazil 2 Institute of Informatics, Federal University of
Goiás, Goiânia, Brazil 3 OATML, University of Oxford, United          through three central design principles: (1) preserving con-
Kingdom. Correspondence to: Bryan L. M. de Oliveira <bryanlin-          sistent environment dynamics regardless of difficulty, ensur-
coln@discente.ufg.br>.                                                  ing that the underlying task remains unchanged; (2) enabling
                                                                          1
Proceedings of the 42 nd International Conference on Machine                Available   at       https://github.com/
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025             bryanoliveira/sliding-puzzles-gym.
by the author(s).

                                                                    1
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning




Figure 1. Overview of SPGym. The framework extends the 8-tile puzzle by replacing numbered tiles with image patches. At each
training run, SPGym samples a pool of images and, at each episode, it randomly selects one of those images to form the observations.
While we scale visual diversity by adjusting the pool size, the task and environment dynamics remain fixed.


precise control over visual complexity through adjustable            Contributions. We make three key contributions to visual
grid dimensions and image pool sizes; and (3) establishing           RL research: (1) we introduce SPGym, a novel benchmark
a clear success metric based on puzzle completion. This              that systematically evaluates representation learning by scal-
carefully engineered framework provides researchers with             ing visual complexity while keeping environment dynamics
a controlled environment to systematically examine how               constant; (2) we conduct an extensive empirical analysis
agent performance degrades as visual diversity increases,            of state-of-the-art methods, uncovering critical limitations
offering insights into the fundamental limitations of their          in their ability to process diverse visual inputs; and (3) we
representational abilities while learning from experience.           provide fundamental insights into the challenges of scaling
                                                                     visual RL, offering directions for advancing representation
Our experiments show that SPGym effectively distinguishes
                                                                     learning in decision-making systems.
agents by their out-of-the-box representation learning abil-
ities, with strong correlations between linear probing ac-
curacy of learned encoders and task performance. While               2. Related Work
pretraining and data augmentation are beneficial, many ad-
                                                                     Traditional RL benchmarks. Visual RL environments
vanced methods with standard configurations for discrete
                                                                     such as the Arcade Learning Environment (Bellemare et al.,
visual RL underperform, suggesting either a need for task-
                                                                     2013), DeepMind Control Suite (Tassa et al., 2018), Deep-
specific tuning or fundamental mismatches with SPGym’s
                                                                     Mind Lab (Beattie et al., 2016), and CARLA (Dosovitskiy
visual-structural dynamics. More concerningly, our tiered
                                                                     et al., 2017) are widely used for pixel-based agent evalua-
generalization analysis exposes fundamental limitations: on
                                                                     tion. These platforms have driven progress in visual repre-
SPGym, agents that master the training images fail to trans-
                                                                     sentation learning for decision-making, including pretrain-
fer to unseen ones, even when trained on larger and more
                                                                     ing (Higgins et al., 2017; Stooke et al., 2021; Schwarzer
diverse image pools. In fact, performance often degrades
                                                                     et al., 2021), contrastive methods (Laskin et al., 2020b), self-
as visual diversity increases, indicating that current meth-
                                                                     supervised prediction (Schwarzer et al., 2020), and world
ods struggle to learn truly generalizable representations.
                                                                     models (Hafner et al., 2025). However, by measuring overall
We further demonstrate SPGym’s extensibility through ex-
                                                                     agent effectiveness, which relies on learning representations,
periments with procedurally generated images and larger
                                                                     policies, and dynamics, the specific impact of advances in
puzzles, maintaining fixed observation/action spaces while
                                                                     representation learning for RL may be obscured. SPGym ad-
expanding state space and visual diversity. These findings
                                                                     dresses this drawback by regulating visual complexity while
expose critical gaps in current visual RL methods and estab-
                                                                     maintaining constant environment dynamics, allowing for
lish SPGym as a valuable tool for advancing robust, gener-
                                                                     targeted assessment of representation learning approaches
alizable artificial agents.
                                                                     for decision-making.

                                                                 2
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

Specialized benchmarks for visual RL. Recent bench-                  3. The Sliding Puzzles Gym
marks have sought to better assess visual generalization
and robustness of RL agents. ProcGen (Cobbe et al., 2020)            SPGym extends the classic sliding tile puzzle, a game where
employs procedurally generated levels, but its difficulty            players rearrange shuffled tiles on a grid by sliding a tile
scaling simultaneously affects both visual and task com-             into an adjacent empty space, with the goal of restoring
plexity. The Distracting Control Suite (Stone et al., 2021)          an ordered configuration (Figure 1). Our framework gen-
evaluates robustness to visual variations, but these serve           eralizes this setup by supporting configurable H × W grid
as task-irrelevant distractions that agents can safely learn         dimensions (from 2 × 2 upwards) and diverse observation
to ignore while solving core tasks. COOM (Tomilin et al.,            modalities. In our experiments, we primarily use a 3 × 3
2023) provides a continual learning benchmark for embod-             grid where tiles are image patches, and the agent receives
ied pixel-based RL in 3D environments, focusing on catas-            the composite image of the grid as input. Our implemen-
trophic forgetting and knowledge transfer across tasks rather        tation builds on the Gym (Brockman, 2016) interface for
than isolating representation learning in a single task. How-        modularity between environment and agent.
ever, these approaches do not make visual understanding
essential for task success. SPGym overcomes this limita-             Formalization. We formulate SPGym as a partially ob-
tion by making visual coherency fundamental to puzzle                servable Markov decision process (POMDP) defined by
solving while maintaining fixed task complexity. Through             the tuple (S, A, P, R, S0 , Ω, O), where S is the finite state
controlled scaling of visual diversity in puzzle tiles, SPGym        space representing all solvable puzzle configurations, A is
ensures that the representation learning challenges are tied         the discrete action space (tile movements), P : S × A → S
to task completion, enabling a more precise evaluation of            defines the deterministic transition dynamics, R : S → R
RL agents’ visual learning capabilities.                             is the reward function, S0 is the initial state distribution
                                                                     (e.g., uniform over S), Ω is the observation space, and
                                                                     O : S × I → Ω is the observation function parameter-
Puzzle-based benchmarks. Estermann et al. (2024)
                                                                     ized by a data pool I, which in this work consists of images.
demonstrated puzzle-based environments’ value for evaluat-
ing neural algorithmic reasoning, focusing on discrete state
spaces. Though they tested pixel observations with sparse            State space and observations. Crucially, agents do not
rewards, agents struggled with basic visual inputs. This             have direct access to states s ∈ S and must learn policies
work revealed puzzles’ potential and challenges for visual           based solely on observations in Ω. For visual observations,
learning, showing the need for systematic representation             each training run begins by sampling p images from a pre-
learning evaluation in these controlled settings. SPGym              defined dataset to form an image pool I. At the start of
advances this research direction by incorporating rich vi-           each episode, we select a random image i ∈ I, partition it
sual observations while maintaining the controlled nature of         into H × W distinct patches corresponding to the puzzle
puzzle environments, facilitating systematic assessment of           tiles, and assign each patch to a tile position according to
representation learning in the visual domain.                        the current state s. The observation function O(s, i) then
                                                                     renders the composite image by arranging these patches
                                                                     according to the puzzle configuration. The agent’s task is
Methods for solving the sliding tile puzzle. Classical
                                                                     to reconstruct the original image, testing its ability to form
approaches to sliding puzzles employ search algorithms
                                                                     compositional representations from visual input.
such as A* and IDA*, leveraging domain-specific heuristics
like the Manhattan distance (Korf, 1985; Burns et al., 2012;         This formulation provides two independent mechanisms for
Lee & See, 2022). These methods guarantee optimal solu-              controlling complexity: (1) varying the pool size p adjusts
tions but require direct access to the internal puzzle state         the diversity of observations by changing the number of
and are often computationally intensive. Deep RL offers a            available images in I, directly affecting |Ω|, and (2) mod-
scalable alternative by learning effective strategies without        ifying grid dimensions H × W alters both the state space
hand-crafted heuristics (Agostinelli et al., 2019; Moon &            size |S| and the visual complexity of individual observations.
Cho, 2024; Estermann et al., 2024), though prior work has            Both mechanisms operate while keeping the underlying tran-
primarily focused on discrete state representations rather           sition dynamics P, action space A, and reward function R
than learning directly from visual observations (Agostinelli         invariant. SPGym is dataset-agnostic, supporting any image
et al., 2019; Moon & Cho, 2024). We build on these meth-             dataset, including procedurally generated ones.
ods by using the Manhattan distance as the basis for our
reward function, providing a well-shaped learning signal for         Action space and dynamics. The action space A con-
RL agents. In SPGym, we evaluate standard RL algorithms              tains four possible actions: UP, DOWN, LEFT, or RIGHT,
where agents must learn solely from pixel observations,              which move the corresponding tile to the empty space in a
without access to internal states, to assess their out-of-the-       discrete manner. Once the agent selects a tile to move, the
box performance in this challenging setting.                         dynamics P define the next puzzle state in a predictable and

                                                                 3
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

deterministic way, as illustrated in Figure 1.

Reward function. The reward function R provides dense
feedback to guide agent learning while accommodating the
non-monotonic nature of optimal puzzle-solving paths. Fol-
lowing established approaches in the sliding puzzle liter-
ature (Korf, 1985; Burns et al., 2012; Lee & See, 2022;
Moon & Cho, 2024), we base our reward on the Manhattan
distance between each tile’s current position and its target
                                                                         Figure 2. Different observation modalities in SPGym. Each
position, normalized across all tiles. This distance metric is           modality presents a unique challenge for representation learning.
widely adopted in computational solutions to sliding puzzles             The three presented observations represent the same puzzle state.
due to its efficiency and effectiveness in capturing progress            We focus our experiments on image-based observations.
toward the goal state. Specifically, at each time step, the
reward is computed as follows:
                                                                         While our primary experiments use 3 × 3 image-based puz-
                                                                        zles, SPGym supports larger grids and other observation
             −D, if action is valid
                                                                        modalities, such as one-hot encodings (Figure 2), to isolate
       R(s) = −1, if action is invalid              , with    (1)        specific research questions.
             
             
               +1, if puzzle is solved                                   The primary scaling mechanism in SPGym isolates the chal-
                                                                         lenge of representation learning by increasing visual diver-
           PH PW                   ∗                ∗                    sity, illustrated in Figure 3, while keeping all other task
                i=1   j=1 |ui,j − ui,j | + |vi,j − vi,j |
 D = PH PW                                                   . (2)       components fixed across training runs. As the image pool
          i=1     j=1 max(i, H − i) + max(j, W − j)                      size grows, agents require more samples to solve the task
                                                                         (Table 1), even though the state space, action space, and
Here, (ui,j , vi,j ) represents the current position of the tile         transition dynamics remain unchanged. By design, this
                           ∗
at index (i, j), (u∗i,j , vi,j ) is its target position. D is the        increased difficulty stems directly from the representation
normalized Manhattan distance between current and target                 learning challenge. We further confirm this link through lin-
positions. Invalid actions, such as attempting to move a tile            ear probe analysis (Appendix C.1.2), which shows a strong
outside the grid boundaries, result in a penalty of −1 and               correlation between representation quality and task perfor-
don’t alter the puzzle state. For example, in Figure 1, the              mance. This controlled scaling provides a stress test for vi-
DOWN and RIGHT actions would be invalid for the first                    sual learning that is not possible in settings with fixed visual
state. Successfully solving the puzzle rewards the agent                 inputs or state-based observations (see Appendix C.1.1).
with +1 and terminates the episode. This formulation pro-
vides a well-behaved learning signal between [−1, +1] and                The secondary scaling mechanism modulates the search
encourages solving the puzzle in minimal steps.                          challenge by adjusting grid dimensions. Increasing the grid
                                                                         size from 3 × 3 to 4 × 4 dramatically expands the state space
                                                                         complexity and, as a result, the number of steps required to
Initial state distribution. SPGym’s initial state distribu-
                                                                         solve the task (see Table 3). For example, 3×3 puzzles have
tion S0 can be defined through two methods. The primary                                    2

method generates a uniformly random H × W array where                    approximately 32 ! = 1.81 × 105 possible states, whereas
all tiles (including the blank tile) are placed randomly, and            4 × 4 puzzles pose a much greater challenge with roughly
                                                                         42 !      13
ensures solvability by adjusting the puzzle’s parity through              2 = 10       possible states. This increase in grid size also
swapping the first two tiles when needed (Johnson & Story,               makes representation learning more difficult, since the agent
1879). The second method, designed to support curriculum                 must correctly map and position a greater number of image
learning, starts from a solved state and applies a sequence              patches, modeling a larger observation space. However, the
of random valid moves to reach the initial configuration.                size and shape of each rendered observation (i.e., the obser-
Although this approach guarantees solvability due to the                 vation dimensions) remain unchanged, as does the action
reversibility of moves, it becomes computationally expen-                space (still four directional moves), and the task dynamics
sive for larger grid sizes due to the sequential nature of               continue to be deterministic and fully predictable. While
move application. Given these efficiency considerations, we              this scaling mechanism enables evaluation of exploration
exclusively employ the first method in our experiments.                  and policy-learning capabilities, our experiments show that
                                                                         3 × 3 grids already provide sufficient discriminative power
                                                                         for assessing visual representation learning.
Diversity scalability and extensibility. As previously
mentioned, SPGym provides two orthogonal mechanisms                      By maintaining consistent environment dynamics across
for scaling task difficulty: visual diversity and grid size.             these scaling mechanisms, SPGym creates a controlled ex-

                                                                     4
            Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

                                                                           100% success rate for 100 consecutive episodes, indicating
                                                                           task completion. This early termination serves two purposes:
                                                                           it enables out-of-distribution evaluation before extreme en-
                                                                           coder overfitting occurs, and it reduces computational costs
                                                                           for running the comprehensive set of experiments. Each ex-
                                                                           periment is conducted 5 times with different random seeds,
                                                                           and we report the mean ± 1.96 standard errors (95% confi-
                                                                           dence interval).
                                                                           We evaluate sample efficiency using pools of 1, 5, and 10
                                                                           images across all agent variants. For standard agents, we
                                                                           additionally test with progressively larger pools up to 100
                                                                           images or until final performance is less than 80% success
                                                                           rate after the full 10M training steps. This protocol allows us
                                                                           to analyze both the effectiveness and scalability of different
                                                                           algorithms and representation learning methods.



                                                                           Algorithms and variants. We explore three distinct al-
                                                                           gorithmic approaches: Soft Actor-Critic (SAC) (Haarnoja
                                                                           et al., 2018a), Proximal Policy Optimization (PPO) (Schul-
Figure 3. The visual diversity scalability of SPGym. Each row
                                                                           man et al., 2017), and DreamerV3 (Hafner et al., 2025),
presents the first observation of 3 different episodes of the same
                                                                           each representing different strategies for learning from vi-
training run. The visual diversity scales with the size of the image
pool. Crucially, we keep the grid size fixed, ensuring that the            sual observations. For each algorithm, we evaluate several
increased difficulty comes solely from the agent’s need to handle a        representation learning variants to assess their effectiveness
larger variety of visual observations.                                     in handling visual diversity.
                                                                           For SAC, we begin with the standard implementation for
perimental setting where performance variations can be                     discrete action spaces proposed by Christodoulou (2019).
more directly attributed to an agent’s representation learn-               We then examine several representation learning variants:
ing and generalization capabilities.                                       RAD (Laskin et al., 2020a), which employs data augmenta-
                                                                           tion; CURL (Laskin et al., 2020b), which uses contrastive
                                                                           learning; SPR (Schwarzer et al., 2020), which incorporates
4. Methods                                                                 self-supervised prediction; DBC (Zhang et al., 2021), which
In this section, we detail the evaluation protocol for various             focuses on state metric learning; SAC-AE and SAC-VAE
RL agents within SPGym, focusing on their ability to handle                (Yarats et al., 2021b), which utilize reconstruction-based
increasing visual diversity across training runs.                          learning; and a simple baseline (SB) proposed by Tomar
                                                                           et al. (2023), which implements a simplified approach with
                                                                           reward and transition prediction.
Experimental setup. We sample images from ImageNet-
1k’s validation split (Russakovsky et al., 2015) to construct              For PPO, we evaluate three encoder configurations: the
visual observations, resizing each image to 84 × 84 pixels                 standard version with random initialization, a variant pre-
and normalizing values to [0, 1]. To isolate visual diversity,             trained on the same image distribution (in-distribution, ID),
we fix the puzzle size to 3 × 3 and vary only the image pool               and a variant pretrained on a different image distribution
size p. For each training run, we randomly sample p distinct               (out-of-distribution, OOD). These pretrained variants re-
images to create a fixed image pool I. At episode start, we                spectively provide an upper bound on expected pretraining
randomly select one image from this pool to generate the                   performance and help establish the potential benefits of
puzzle observations. We cap the number of environment                      generally pretrained encoders, though we acknowledge this
steps to 10M and limit episodes to 1,000 steps.                            may make direct sample efficiency comparisons with other
                                                                           methods less fair.
Our analysis focuses on sample efficiency, measured by the
number of environment steps required to solve the puzzle                   For DreamerV3, we compare the standard version against
(lower is better). We calculate this metric by averaging the               a variant without decoder gradients to evaluate the impact
steps needed to reach 80% success rate across all parallel en-             of the reconstruction objective on performance. Detailed
vironments in a run, then average this number across seeds.                descriptions for all agents and their learning objectives are
We terminate training runs early when an agent maintains                   provided in Appendix B.

                                                                       5
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

Hyperparameters. RAD, CURL, and SPR require data                    Table 1. Million steps to reach 80% success rate across pool
augmentation. We apply these augmentations to observa-              sizes during training. Lower is better. Best performing variant
tions after sampling them from the replay buffer. For each          for each algorithm and pool size is highlighted in bold.
algorithm, we conducted individual augmentation searches              Agent                 Pool 1        Pool 5      Pool 10
with the objective of maximizing sample efficiency (detailed
in Appendix A.4.2). These experiments consistently con-               PPO                   1.75±0.44    7.80±1.08    9.73±0.36
verged to a simple two-step pipeline, which we use through-           PPO + PT (ID)         0.95±0.21    5.55±1.22   9.17±1.10
out all evaluations: first converting to grayscale with 20%           PPO + PT (OOD)        1.34±0.42    7.03±1.07    9.70±0.41
probability, then randomly shuffling the color channels.              SAC                   0.33±0.07    0.91±0.12    2.03±0.38
                                                                      SAC + RAD             0.24±0.03    0.42±0.06   0.82±0.18
We evaluate out-of-the-box performance of existing ap-                SAC + CURL            0.46±0.10    1.56±0.31    5.24±1.92
proaches in SPGym by adopting neural architectures and                SAC + SPR             2.09±0.81    3.68±1.68   10.00±0.00
hyperparameters from established visual discrete control im-          SAC + DBC             0.99±0.25    1.12±0.22    2.13±0.41
plementations. Our base architecture uses three-layer CNN             SAC + AE              1.04±0.24    1.02±0.19    2.01±0.38
encoders with mirrored deconvolutional decoders, while                SAC + VAE             1.13±0.14    5.30±0.68   10.00±0.00
actor, critic, and auxiliary components employ multi-layer            SAC + SB              0.98±0.88    2.08±0.30   10.00±0.00
perceptrons (MLPs).                                                   DreamerV3             0.42±0.06    1.23±0.20   1.44±0.58
For SAC-based agents, we follow Yarats et al. (2021b) and             DreamerV3w/o dec.     1.13±0.12    1.79±0.61    2.57±0.91
Tomar et al. (2023) by blocking actor gradients through the
encoder to prevent representation collapse, while allowing          encoders in this setup, we evaluate PPO with two types of
critic and auxiliary gradients. PPO and DreamerV3 main-             pretrained encoders. It is important to acknowledge that di-
tain their original gradient flow patterns. While PPO and           rect comparisons of sample efficiency with encoders trained
DreamerV3 worked robustly with default configurations,              from scratch can be nuanced, as pretrained encoders have
SAC-based agents required tuning of the temperature pa-             inherently been exposed to significantly more data during
rameter α (Appendix A.4.1). We found a fixed value of               their pretraining phase. The in-distribution pretrained en-
0.05 to work best across all SAC variants, as the automatic         coder (PT (ID)) for PPO, intended as a proxy to estimate an
tuning from Haarnoja et al. (2018b) proved ineffective here.        approximate upper bound on performance achievable with
Where applicable, we preserve uniform hyperparameters               pretraining, significantly boosts sample efficiency across all
while drawing algorithm-specific configurations from their          tested pool sizes. The out-of-distribution pretrained encoder
respective source papers. The publicly available code repos-        (PT (OOD)), designed to represent the average performance
itory2 extends both CleanRL (Huang et al., 2022) and the            one might expect from a generally pretrained encoder, offers
official DreamerV3 codebase. Additional methodological              more modest gains which also decrease with larger pools.
details are provided in Appendix A.                                 Notably, however, the rate at which performance degrades
                                                                    as the image pool size increases appears to be similar re-
                                                                    gardless of whether pretraining is used or not.
5. Results
                                                                    For SAC, data augmentation with RAD consistently im-
Our analysis reveals three fundamental tensions in visual           proves efficiency, especially as visual diversity increases. In
RL: between method assumptions and environment struc-               contrast, auxiliary methods like CURL, DBC, VAE, SPR,
ture, sample efficiency and solution optimality, and training       and SB require more samples than standard SAC, partic-
diversity versus generalization capability. We organize find-       ularly with larger pools. The underperformance of these
ings through seven research questions.                              methods appears to stem from different factors. CURL may
                                                                    struggle because enforcing similarity between augmented
5.1. Can SPGym distinguish agents on their approaches               observations could be ineffective when images from the
     to representation learning?                                    pool lack shared structure. DBC might perform poorly when
Table 1 demonstrates SPGym’s ability to differentiate agents        observations with similar visual features correspond to dif-
based on their representation learning approaches across            ferent dynamics and rewards. SPR, SB, and VAE may also
varying levels of visual diversity. Our primary goal in this        be less effective because enforcing latent space smoothness
analysis is to compare the sample efficiency with which             could be unsuited to SPGym’s highly discontinuous obser-
different agents learn useful visual representations.               vations, as suggested by the relatively better performance of
                                                                    the unconstrained AE variant.
To explore the potential benefits of leveraging pretrained
                                                                    Finally, DreamerV3 demonstrates particularly strong per-
   2
   Accessible    at      https://github.com/                        formance, consistently outperforming both PPO and SAC
bryanoliveira/spgym-experiments                                     variants across all pool sizes. The full DreamerV3 model

                                                                6
                         Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning


                                         PPO                                    SAC                                       DreamerV3
                   100               1                5     1     5       10                                1        5   10     20          30
                                                                                                     20
                                                                                                                                            50
Success Rate (%)




                   80                                 10
                                                                                                     30
                   60

                   40                                                                                                                       100
                   20                                 20
                                                                                                     50
                     0
                         2M     4M        6M   8M   10M           2M      4M        6M     8M   10M             2M       4M     6M    8M   10M
                                     Steps                                     Steps                                          Steps
                                                      Pool Size       1   5    10     20   30   50    100



Figure 4. Success rate as a function of environment steps. The gradual increase in visual diversity 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.


shows remarkably stable performance across different pool                           ever, it also faces fundamental limitations, potentially as
sizes, significantly better than most other methods. The vari-                      memorization becomes unsustainable. DreamerV3’s world
ant without decoder gradients shows reduced performance                             model architecture appears to foster more compressed repre-
across all configurations, highlighting the importance of the                       sentations, leading to more graceful degradation, but it too
world model’s discrete reconstruction objective. This sug-                          struggles with very large pools.
gests that DreamerV3’s approach of learning a predictive
                                                                                    Preliminary DreamerV3 experiments with extremely large
model of the environment provides a particularly effective
                                                                                    image pools (10,000-20,000 images) show that agents fail
foundation for handling visual diversity in SPGym.
                                                                                    to learn useful policies, as each observation becomes vir-
These results highlight SPGym’s value as a diagnostic tool,                         tually unique. This suggests that simply increasing dataset
effectively distinguishing which approaches can handle its                          scale is not enough if the RL signal becomes too sparse to
distinct combination of visual diversity and structured dy-                         effectively guide encoder training in the presence of high di-
namics. The benchmark exposes important limitations in                              versity. These methods appear to memorize rather than gen-
methods that have proven successful in other visual RL do-                          eralize, struggling when network capacity is overwhelmed
mains, suggesting that their underlying assumptions may                             by constantly novel inputs. This highlights fundamental
not align with SPGym’s unique characteristics. For detailed                         limitations of current approaches when faced with diverse
performance analysis and proposed explanations for agent                            visuals where assumptions break and the learning signal is
behavior, see Appendix C.2.1.                                                       too weak to support meaningful learning.

5.2. How does visual diversity affect agents?                                       5.3. Can agents generalize to unseen visual inputs?
Figure 4 exposes critical limitations in current methods.                           Our analysis of generalization capabilities on PPO and SAC
While all agents eventually degrade with larger image pools,                        agents reveals a stark contrast between in-distribution and
their failure modes differ. PPO degrades significantly at                           out-of-distribution test performance. We evaluate two levels
pool size 10 and fails at 20. SAC performs well up to pool                          of generalization difficulty: ‘Easy’ OOD, using augmented
size 20, degrades at 30, and fails at 50. DreamerV3 shows                           versions of training images, and ‘Hard’ OOD, using com-
the most robust scaling, learning effectively at pool size 50                       pletely unseen pictures. Despite most agents achieving high
and exhibiting learning even at pool size 100.                                      success rates on their training distribution, they exhibit vary-
                                                                                    ing degrees of failure on both generalization challenges.
These distinct degradation patterns suggest differences in
                                                                                    Since meaningful generalization evaluation requires agents
handling increasing visual diversity, potentially due to
                                                                                    that first achieve competent in-distribution performance, we
agents memorizing features instead of learning general-
                                                                                    primarily focus our OOD analysis on smaller pool sizes (i.e.,
izable representations, thus exhausting network capacity.
                                                                                    1, 5, and 10) where most methods successfully learn the task.
PPO’s early failure indicates difficulty forming robust rep-
                                                                                    Full OOD performance data for both Easy and Hard settings
resentations and rapid capacity exhaustion. SAC’s better
                                                                                    across all configurations can be found in Appendix C.2.
performance on medium pools, possibly aided by its replay
buffer and encoder training independent of actor gradients,                         For Easy OOD evaluation, we measure the success rate
suggests stronger representation learning initially. How-                           of PPO and SAC agents after applying each augmenta-

                                                                                7
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

Table 2. Success rate of PPO and SAC agents on Easy OOD                The rare non-zero success rates in Hard OOD likely stem
across different training image pool sizes. Higher is better.          from chance encounters with nearly-solved initial states
   Algorithm              Pool 1       Pool 5     Pool 10              rather than genuine generalization.

   PPO                   0.49±0.13    0.53±0.14   0.34±0.08            These findings reveal fundamental limitations in current
   PPO + PT (ID)         0.33±0.09    0.53±0.16   0.27±0.07            visual RL methods and point toward specific research di-
   PPO + PT (OOD)        0.49±0.12    0.52±0.14   0.34±0.08            rections. The universal failure on Hard OOD, combined
   SAC                   0.45±0.12    0.58±0.12   0.46±0.12            with degradation on Easy OOD as pool diversity increases,
   SAC + RAD             0.62±0.15    0.42±0.13   0.30±0.11            indicates that memorization-based learning is insufficient
   SAC + CURL            0.76±0.09    0.44±0.10   0.37±0.11            for visual generalization. Future research should focus on
   SAC + SPR             0.65±0.13    0.21±0.09   0.07±0.04            developing techniques that not only achieve good sample
   SAC + DBC             0.44±0.13    0.34±0.13   0.13±0.04            efficiency but also explicitly promote generalization to truly
   SAC + AE              0.78±0.11    0.64±0.16   0.55±0.12            novel visual contexts. This might involve architectures that
   SAC + VAE             0.64±0.15    0.30±0.08   0.12±0.03            better separate visual representation learning from policy
   SAC + SB              0.89±0.08    0.65±0.12   0.06±0.02            learning, incorporate stronger inductive biases for visual
                                                                       reasoning, or leverage self-supervised objectives that en-
                                                                       courage learning of more fundamental visual features, along
tion described in Appendix A.3, averaging results over 100             with regularization methods that explicitly discourage mem-
episodes per augmentation. Table 2 reports these results for           orization. Simply increasing the diversity of training images,
training pool sizes 1, 5, and 10. As the diversity of the train-       as SPGym allows, is insufficient with current algorithms,
ing pool increases, we observe a general decline in OOD                highlighting the need for new approaches.
performance. Some SAC variants show greater robustness to
augmentations than standard SAC, especially when trained               5.4. Is representation quality linked with performance?
with a pool size of 1, but this advantage diminishes as the
pool size grows. Overall, Easy OOD performance tends                   As a proxy for the quality of learned representations, we
to decrease for all methods as training pool size increases.           performed linear probing on frozen encoders from trained
Notably, there is a strong correlation (Pearson r = −0.81,             PPO and SAC agents, using a single-layer MLP to predict
p = 2.5 × 10−12 ) between Easy OOD success and sample                  one-hot puzzle states. We find a statistically significant
efficiency across methods and pool sizes, suggesting that              correlation between probe accuracy and sample efficiency
agents which scale well with increasing visual diversity also          (Pearson r = −0.81, p = 1.1 × 10−13 ), indicating that
tend to generalize better to augmented inputs.                         encoders capturing more task-relevant spatial information
                                                                       are strongly linked with faster learning. As image pool size
For Hard OOD evaluation, we test all 5 seeds of PPO, SAC,              increases, both probe accuracy and task performance sys-
and Dreamer agents on 100 episodes using images inde-                  tematically degrade, with standard SAC maintaining high
pendently sampled from the ImageNet-1k validation split.               accuracy (100% at pool size 1, 97.63% at pool size 5) mir-
Unsurprisingly, agents almost universally fail, achieving              roring its strong efficiency, while less efficient methods like
near 0% success rates across all methods and training con-             SAC+VAE (78.21% at pool size 5) and SPR (dropping from
figurations. This stark failure on completely unseen images            94.31% to 75.48% from pool size 5 to 10) show reduced
is a crucial diagnostic finding, exposing fundamental limi-            probe performance. These consistent trends across algo-
tations of current end-to-end RL methods when faced with               rithms demonstrate SPGym’s ability to identify learning
visual inputs that differ substantially from their training            procedures that develop representations better aligned with
distribution. This finding reinforces our interpretation that          the task’s spatial reasoning needs. Detailed probing results
agents may be memorizing specific visual patterns instead              are provided in Appendix C.1.2.
of learning generalizable representations.
Intuitively, one might expect training on larger, more di-             5.5. Does performance generalize across image sources?
verse image pools to improve generalization. However, our
                                                                       To validate that our findings generalize beyond ImageNet,
results demonstrate that even agents trained on pools of up
                                                                       we evaluated agents on DiffusionDB (Wang et al., 2023),
to 100 images completely fail to transfer skills to novel vi-
                                                                       a dataset of procedurally generated images. As shown in
suals in the Hard OOD setting. Furthermore, performance
                                                                       Figure 8 in Appendix A.5, performance scaling patterns on
on augmented training images often decreases as training
                                                                       DiffusionDB closely mirror those observed on ImageNet
pool size increases. This perhaps counter-intuitive result
                                                                       across PPO, SAC, and DreamerV3. This consistency across
may suggest that, in SPGym, agents trained on smaller, less
                                                                       fundamentally different image sources (real photographs
diverse pools, learn representations more attuned to the spe-
                                                                       versus synthetic generations) demonstrates that visual diver-
cific structural invariances of the task, making them robust
                                                                       sity rather than semantic content drives the representation
to simple perturbations but still not fundamentally general.

                                                                   8
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

learning challenge in SPGym. The similarity in degradation           training approaches the theoretical 22-step average optimal
patterns as pool size increases indicates that our algorithmic       solution (Reinefeld, 1993). This confirms that early termina-
insights reflect fundamental properties of the tested methods        tion, while needed for our experimental objectives, prevents
rather than dataset-specific artifacts. Procedurally generated       agents from discovering more optimal solutions through
images also offer practical advantages for future research:          continued training.
eliminating storage requirements through on-demand gen-
eration, enabling fine-grained control over visual similarity,       6. Conclusion
and providing unlimited training diversity.
                                                                     We introduce the Sliding Puzzles Gym (SPGym), a novel
5.6. How does puzzle size affect learning performance?               benchmark designed to systematically evaluate representa-
                                                                     tion learning in RL algorithms by isolating visual complex-
Beyond visual diversity, we also explore the impact of in-           ity controls from the environment dynamics. Our analy-
creasing puzzle size. As shown in Table 3, the complexity            sis reveals fundamental tensions challenging current visual
increase from 3 × 3 to 4 × 4 grids significantly impacts             RL methods. We show that sophisticated representation
learning. On the simpler 3 × 3 puzzle, PPO solved the                learning techniques struggle with SPGym’s combination
puzzle in 1.75M steps, while SAC and DreamerV3 were                  of visual diversity and structured spatial reasoning require-
more efficient, requiring 0.33M and 0.42M steps, respec-             ments, with auxiliary objectives often underperforming sim-
tively. For the 4 × 4 puzzle, PPO’s sample requirements              pler approaches like data augmentation. We also uncover a
surged to 24.46M steps, far exceeding the 10M step training          complex relationship between sample efficiency and gener-
budget, while SAC and DreamerV3 still solved the puzzle              alization: agents trained on smaller pools learn task-specific
within budget at 8.14M and 2.26M steps, respectively. This           invariances that paradoxically make them more robust to
demonstrates that while larger state spaces pose a major             simple perturbations, with larger pools often degrading gen-
challenge by requiring more exploration and more complex             eralization performance. Most critically, we expose severe
visual representations, more sample-efficient algorithms can         limitations in end-to-end RL methods through universal fail-
still scale to harder tasks.                                         ure on novel visual contexts, achieving near-zero success
Table 3. Million steps to reach 80% success rate across grid         despite strong in-distribution performance – revealing that
sizes, with pool size 1. Lower is better.                            learned representations rely on memorization rather than
    Grid Size       PPO          SAC       DreamerV3                 genuine visual understanding. These findings highlight the
                                                                     need for algorithmic advances that move beyond memoriza-
    3×3           1.75±0.44    0.33±0.07     0.42±0.06               tion toward true visual understanding.
    4×4           24.46±7.58   8.14±3.64     2.26±0.29
                                                                     Limitations. We identify two key limitations in this work.
                                                                     First, our objective was to evaluate out-of-the-box perfor-
5.7. How optimal are the learned solutions?                          mance of all methods with minimal tuning, which means
While our primary focus is on sample efficiency for task             we may not have seen the true peak capabilities of each
completion, we also analyze solution quality by examining            approach. Second, computational constraints limited us to 5
the average number of steps agents take to solve puzzles.            independent runs per configuration. Given the high stochas-
Our experimental design uses early termination when agents           ticity in sampled image pools, more seeds would provide
achieve 100% success rate to enable out-of-distribution eval-        better statistical robustness for comparing methods.
uation before extreme encoder overfitting and to save com-
putational resources. However, this approach may prevent             Future work. SPGym opens several promising research
agents from discovering more optimal solutions through               directions for developing representation learning methods
continued training. To investigate this trade-off, we trained        that can bridge the generalization gap while maintaining
PPO, SAC, and DreamerV3 on pool size 1 for the full 10M              sample efficiency. The benchmark’s controlled nature en-
steps without early termination across 5 seeds. Comparing            ables systematic investigation of the trade-offs between
episode lengths between when these agents first achieve              training diversity and generalization capability, while its
100% success rate (where early termination would occur)              easy integration with external image generation systems al-
and after completing the full training reveals substantial           lows controlled experiments with varying degrees of visual
improvements in solution efficiency. For PPO, the first 100          similarity. Beyond images, SPGym supports incorporating
successful episodes average 214.30 ± 16.52 steps, while              other modalities as puzzle observations, enabling research
the last 100 episodes average 31.35 ± 6.59 steps. SAC                on leveraging powerful pretrained models as representation
shows improvement from 64.16 ± 9.81 to 57.27 ± 12.29                 encoders. We believe these directions would help develop
steps, and DreamerV3 improves from 126.02 ± 17.25 to                 more robust learning approaches that transfer effectively
23.48 ± 0.71 steps. Notably, DreamerV3 with continued                across different domains and modalities.

                                                                 9
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

Acknowledgements                                                       References
The authors gratefully acknowledge the valuable insights               Agostinelli, F., McAleer, S., Shmakov, A., and Baldi, P.
and constructive discussions provided by Professors Marcos               Solving the rubik’s cube with deep reinforcement learning
R. O. A. Maximo and Flávio H. T. Vieira. We also thank                  and search. Nature Machine Intelligence, 1(8):356–363,
the reviewers for their thoughtful feedback and constructive             2019. doi: 10.1038/s42256-019-0070-z.
suggestions that helped improve this paper.
                                                                       Beattie, C., Leibo, J. Z., Teplyashin, D., Ward, T., Wain-
This work has been partially funded by the project Research              wright, M., Küttler, H., Lefrancq, A., Green, S., Valdés,
and Development of Digital Agents Capable of Planning,                   V., Sadik, A., et al. Deepmind lab. arXiv preprint
Acting, Cooperating and Learning supported by Advanced                   arXiv:1612.03801, 2016.
Knowledge Center in Immersive Technologies (AKCIT),
with financial resources from the PPI IoT/Manufatura 4.0               Bellemare, M. G., Naddaf, Y., Veness, J., and Bowling, M.
/ PPI HardwareBR of the MCTI grant number 057/2023,                      The arcade learning environment: An evaluation plat-
signed with EMBRAPII.                                                    form for general agents. Journal of Artificial Intelligence
Luckeciano C. Melo acknowledges funding from the Air                     Research, 47:253–279, 2013.
Force Office of Scientific Research (AFOSR) European
                                                                       Bengio, Y., Courville, A., and Vincent, P. Representation
Office of Aerospace Research & Development (EOARD)
                                                                         learning: A review and new perspectives. IEEE transac-
under grant number FA8655-21-1-7017.
                                                                         tions on pattern analysis and machine intelligence, 35(8):
                                                                         1798–1828, 2013.
Impact Statement
                                                                       Brockman, G.        Openai gym.               arXiv preprint
This work advances our understanding of how visual rep-
                                                                         arXiv:1606.01540, 2016.
resentation learning affects reinforcement learning perfor-
mance and generalization. The insights gained could in-                Burns, E., Hatem, M., Leighton, M., and Ruml, W. Imple-
fluence the development of more robust and efficient RL                  menting fast heuristic search code. Proceedings of the
systems for real-world applications. However, several po-                International Symposium on Combinatorial Search, 3(1):
tential impacts warrant consideration:                                   25–32, 2012.

                                                                       Christodoulou, P. Soft actor-critic for discrete action settings.
Positive impacts: By exposing limitations in current meth-               arXiv preprint arXiv:1910.07207, 2019.
ods, our benchmark may help direct research toward more
reliable and generalizable RL systems. This could acceler-             Cobbe, K., Hesse, C., Hilton, J., and Schulman, J. Lever-
ate progress in areas like robotics and autonomous systems               aging procedural generation to benchmark reinforcement
where visual understanding is crucial. The benchmark’s                   learning. In III, H. D. and Singh, A. (eds.), Proceedings of
controlled nature also promotes more rigorous evaluation                 the 37th International Conference on Machine Learning
practices in RL research.                                               (ICML), volume 119 of Proceedings of Machine Learning
                                                                         Research, pp. 2048–2056. PMLR, 13–18 Jul 2020.

Negative impacts: As with any machine learning bench-                  Dosovitskiy, A., Ros, G., Codevilla, F., Lopez, A., and
mark, there is a risk of overfitting to our specific evaluation          Koltun, V. CARLA: An open urban driving simulator. In
criteria rather than addressing fundamental challenges. Ad-              Levine, S., Vanhoucke, V., and Goldberg, K. (eds.), Pro-
ditionally, improved visual RL capabilities could enable                 ceedings of the 1st Annual Conference on Robot Learning,
automation that displaces human workers or enable surveil-              volume 78 of Proceedings of Machine Learning Research,
lance applications if misused.                                           pp. 1–16. PMLR, 13–15 Nov 2017.

                                                                       Estermann, B., Lanzendörfer, L. A., Niedermayr, Y., and
Mitigations: We have open-sourced our benchmark and                      Wattenhofer, R. Puzzles: A benchmark for neural algo-
evaluation protocols to promote transparency and repro-                  rithmic reasoning. In Advances in Neural Information
ducibility. We encourage future work to consider both per-               Processing Systems (NeurIPS), 2024.
formance metrics and broader societal implications when
building on our findings. Researchers should carefully con-            Ghosh, P., Sajjadi, M. S. M., Vergari, A., Black, M. J., and
sider potential dual-use applications and implement appro-               Schölkopf, B. From variational to deterministic autoen-
priate safeguards when deploying systems based on these                  coders. In 8th International Conference on Learning
techniques.                                                             Representations (ICLR), April 2020.

                                                                  10
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

Haarnoja, T., Zhou, A., Abbeel, P., and Levine, S. Soft               Li, L., Jamieson, K., DeSalvo, G., Rostamizadeh, A., and
  actor-critic: Off-policy maximum entropy deep reinforce-              Talwalkar, A. Hyperband: A novel bandit-based approach
  ment learning with a stochastic actor. In 35th Inter-                 to hyperparameter optimization. Journal of Machine
  national Conference on Machine Learning (ICML), pp.                   Learning Research, 18(185):1–52, 2018.
 1861–1870. PMLR, 2018a.
                                                                      Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Ve-
Haarnoja, T., Zhou, A., Hartikainen, K., Tucker, G., Ha, S.,           ness, J., Bellemare, M. G., Graves, A., Riedmiller, M.,
  Tan, J., Kumar, V., Zhu, H., Gupta, A., Abbeel, P., and              Fidjeland, A. K., Ostrovski, G., Petersen, S., Beattie,
  Levine, S. Soft actor-critic algorithms and applications.            C., Sadik, A., Antonoglou, I., King, H., Kumaran, D.,
 ArXiv, abs/1812.05905, 2018b.                                         Wierstra, D., Legg, S., and Hassabis, D. Human-level
                                                                       control through deep reinforcement learning. Nature, 518
Hafner, D., Pasukonis, J., Ba, J., and Lillicrap, T. Mastering         (7540):529–533, February 2015. ISSN 1476-4687. doi:
  diverse control tasks through world models. Nature, 640              10.1038/nature14236.
  (8059):647–653, April 2025. ISSN 1476-4687. doi:
 10.1038/s41586-025-08744-2.                                          Moon, S. U. and Cho, Y. Improving the training perfor-
                                                                       mance of dqn model on 8-puzzle environment through
Higgins, I., Pal, A., Rusu, A., Matthey, L., Burgess, C.,              pre-training. International Journal of Applied Engineer-
  Pritzel, A., Botvinick, M., Blundell, C., and Lerchner,              ing Research, 6(1):63–67, 2024.
  A. Darla: Improving zero-shot transfer in reinforcement
  learning. In 34th International Conference on Machine               Reinefeld, A. Complete solution of the eight-puzzle and
  Learning (ICML), pp. 1480–1490. PMLR, 2017.                           the bene t of node ordering in ida*. In International
                                                                        Joint Conference on Artificial Intelligence, pp. 248–253.
Huang, S., Dossa, R. F. J., Ye, C., Braga, J., Chakraborty,             Citeseer, 1993.
  D., Mehta, K., and Araújo, J. G. Cleanrl: High-quality
  single-file implementations of deep reinforcement learn-            Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S.,
  ing algorithms. Journal of Machine Learning Research,                 Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein,
  23(274):1–18, 2022.                                                   M., Berg, A. C., and Fei-Fei, L. ImageNet Large Scale
                                                                        Visual Recognition Challenge. International Journal of
Johnson, W. W. and Story, W. E. Notes on the ‘15’ puzzle.               Computer Vision (IJCV), 115(3):211–252, 2015. doi:
  American Journal of Mathematics, 2(4):397–404, 1879.                  10.1007/s11263-015-0816-y.
  doi: 10.2307/2369492.
                                                                      Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and
Korf, R. E. Depth-first iterative-deepening: An optimal                 Klimov, O. Proximal policy optimization algorithms.
  admissible tree search. Artificial intelligence, 27(1):97–            arXiv preprint arXiv:1707.06347, 2017.
 109, 1985.
                                                                      Schwarzer, M., Anand, A., Goel, R., Hjelm, R. D., Courville,
Laskin, M., Lee, K., Stooke, A., Pinto, L., Abbeel, P., and             A. C., and Bachman, P. Data-efficient reinforcement
  Srinivas, A. Reinforcement learning with augmented data.              learning with self-predictive representations. In 8th Inter-
  Advances in Neural Information Processing Systems, 33:                national Conference on Learning Representations (ICLR),
  19884–19895, 2020a.                                                   2020.
Laskin, M., Srinivas, A., and Abbeel, P. Curl: Contrastive            Schwarzer, M., Rajkumar, N., Noukhovitch, M., Anand,
  unsupervised representations for reinforcement learning.              A., Charlin, L., Hjelm, D., Bachman, P., and Courville,
  In 37th International Conference on Machine Learning                  A. C. Pretraining representations for data-efficient rein-
  (ICML), pp. 5639–5650. PMLR, 2020b.                                   forcement learning. In Advances in Neural Information
                                                                        Processing Systems, 2021.
Lee, S. C. and See, T. H. Comparing the hamming and
  manhattan heuristics in solving the 8—puzzle by a* al-              Stone, A., Ramirez, O., Konolige, K., and Jonschkowski,
  gorithm. In Mustapha, A. B., Shamsuddin, S., Zuhaib                   R. The distracting control suite–a challenging benchmark
  Haider Rizvi, S., Asman, S. B., and Jamaian, S. S. (eds.),            for reinforcement learning from pixels. arXiv preprint
  Proceedings of the 7th International Conference on the                arXiv:2101.02722, 2021.
  Applications of Science and Mathematics 2021, pp. 189–
  195, Singapore, 2022. Springer Nature Singapore. ISBN               Stooke, A., Lee, K., Abbeel, P., and Laskin, M. Decoupling
  978-981-16-8903-1.                                                    representation learning from reinforcement learning. In
                                                                        Meila, M. and Zhang, T. (eds.), Proceedings of the 38th
Lesort, T., Dı́az-Rodrı́guez, N., Goudou, J.-F., and Filliat,           International Conference on Machine Learning (ICML),
  D. State representation learning for control: An overview.            volume 139 of Proceedings of Machine Learning Re-
  Neural Networks, 108:379–392, 2018.                                   search, pp. 9870–9879. PMLR, 18–24 Jul 2021.

                                                                 11
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

Tassa, Y., Doron, Y., Muldal, A., Erez, T., Li, Y., Casas, D.
  d. L., Budden, D., Abdolmaleki, A., Merel, J., Lefrancq,
  A., et al. Deepmind control suite. arXiv preprint
  arXiv:1801.00690, 2018.
Tomar, M., Mishra, U. A., Zhang, A., and Taylor, M. E.
  Learning representations for pixel-based control: What
  matters and why? Transactions on Machine Learning
  Research, 2023. ISSN 2835-8856.
Tomilin, T., Fang, M., Zhang, Y., and Pechenizkiy, M.
  Coom: A game benchmark for continual reinforcement
  learning. In Oh, A., Naumann, T., Globerson, A., Saenko,
  K., Hardt, M., and Levine, S. (eds.), Advances in Neural
  Information Processing Systems, volume 36, pp. 67794–
  67832. Curran Associates, Inc., 2023.
Wang, Z. J., Montoya, E., Munechika, D., Yang, H.,
 Hoover, B., and Chau, D. H. DiffusionDB: A large-
 scale prompt gallery dataset for text-to-image generative
 models. In Rogers, A., Boyd-Graber, J., and Okazaki,
 N. (eds.), Proceedings of the 61st Annual Meeting of
 the Association for Computational Linguistics (Volume
 1: Long Papers), pp. 893–911, Toronto, Canada, July
 2023. Association for Computational Linguistics. doi:
 10.18653/v1/2023.acl-long.51.

Yarats, D., Kostrikov, I., and Fergus, R. Image augmentation
  is all you need: Regularizing deep reinforcement learning
  from pixels. In 9th International Conference on Learning
  Representations (ICLR), 2021a.
Yarats, D., Zhang, A., Kostrikov, I., Amos, B., Pineau, J.,
  and Fergus, R. Improving sample efficiency in model-
  free reinforcement learning from images. Proceedings
  of the AAAI Conference on Artificial Intelligence, 35(12):
  10674–10681, 2021b.
Zhang, A., McAllister, R. T., Calandra, R., Gal, Y., and
  Levine, S. Learning invariant representations for rein-
  forcement learning without reconstruction. In 9th Interna-
  tional Conference on Learning Representations (ICLR),
  2021.




                                                                12
          Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

A. Experimental Setup and Configuration
A.1. Model Architectures
We base our implementations on CleanRL’s Atari agents for both PPO and SAC, with minor architectural modifications
including additional normalization layers and increased network depth to approximate our SAC implementation to the one
used by Tomar et al. (2023). The architectures are detailed below.
For PPO agents:
SharedEncoder(
    (encoder): Sequential(
        (0): Conv2d(3, 32, kernel_size=(8, 8), stride=(4, 4))
        (1): ReLU()
        (2): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, stats=True)
        (3): Conv2d(32, 64, kernel_size=(4, 4), stride=(2, 2))
        (4): ReLU()
        (5): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, stats=True)
        (6): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1))
        (7): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, stats=True)
        (8): Flatten(start_dim=1, end_dim=-1)
    )
    (projection): Sequential(
        (0): Linear(in_features=3136, out_features=512, bias=True)
        (1): LayerNorm((512,), eps=1e-05, elementwise_affine=True)
        (2): Tanh()
    )
)
Actor(
    (encoder): SharedEncoder
    (mlp): Linear(in_features=512, out_features=4, bias=True)
)
Critic(
    (encoder): SharedEncoder
    (mlp): Linear(in_features=512, out_features=1, bias=True)
)

For SAC agents:
SharedEncoder(
    (encoder): Sequential(
        (0): Conv2d(3, 32, kernel_size=(8, 8), stride=(4, 4))
        (1): ReLU()
        (2): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, stats=True)
        (3): Conv2d(32, 64, kernel_size=(4, 4), stride=(2, 2))
        (4): ReLU()
        (5): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, stats=True)
        (6): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1))
        (7): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, stats=True)
        (8): Flatten(start_dim=1, end_dim=-1)
    )
)
Actor(
    (encoder): Encoder(
        (shared_encoder): SharedEncoder
        (projection): Sequential(
            (0): Linear(in_features=3136, out_features=512, bias=True)
            (1): LayerNorm((512,), eps=1e-05, elementwise_affine=True)
            (2): Tanh()
        )
    )
    (mlp): Sequential(
        (0): Linear(in_features=512, out_features=512, bias=True)
        (1): LayerNorm((512,), eps=1e-05, elementwise_affine=True)
        (2): ReLU()

                                                          13
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

           (3): Linear(in_features=512, out_features=4, bias=True)
     )
)
Critic(
    (encoder): Encoder(
        (shared_encoder): SharedEncoder
        (projection): Sequential(
            (0): Linear(in_features=3136, out_features=512, bias=True)
            (1): LayerNorm((512,), eps=1e-05, elementwise_affine=True)
            (2): Tanh()
        )
    )
    (mlp): Sequential(
        (0): Linear(in_features=512, out_features=512, bias=True)
        (1): LayerNorm((512,), eps=1e-05, elementwise_affine=True)
        (2): ReLU()
        (3): Linear(in_features=512, out_features=4, bias=True)
    )
    (mlp): Sequential(
        (0): Linear(in_features=512, out_features=512, bias=True)
        (1): LayerNorm((512,), eps=1e-05, elementwise_affine=True)
        (2): ReLU()
        (3): Linear(in_features=512, out_features=4, bias=True)
    )
)



For the representation learning methods, we maintain the same base architecture and use a consistent MLP structure (2 layers
with ReLU activation) for the projector, predictor, transition and reward models. The decoder architecture is as follows:


ImageDecoder(
    (decoder): Sequential(
        (0): Linear(in_features=512, out_features=512, bias=True)
        (1): LayerNorm((512,), eps=1e-05, elementwise_affine=True)
        (2): ReLU()
        (3): Linear(in_features=512, out_features=3136, bias=True)
        (4): Unflatten(dim=1, unflattened_size=(3, 7, 7))
        (5): ConvTranspose2d(3, 64, kernel_size=(3, 3), stride=(1, 1))
        (6): ReLU()
        (7): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, stats=True)
        (8): ConvTranspose2d(64, 32, kernel_size=(4, 4), stride=(2, 2))
        (9): ReLU()
        (10): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, stats=True)
        (11): ConvTranspose2d(32, 3, kernel_size=(8, 8), stride=(4, 4))
        (12): Sigmoid()
    )
)



For DreamerV3 agents, we use the same base 12M architecture as the one used by Hafner et al. (2025). Appendix A.2
contains the specific hyperparameters used in our experiments.

A.2. Hyperparameters
Table 5, Table 6, and Table 7 list hyperparameters used across all experiments, unless noted otherwise. For DreamerV3, we
adopted hyperparameters from (Hafner et al., 2025), modifying only the decoder loss scale (set to 0) for the version without
decoder. Table 8 lists hyperparameters for representation learning methods and components. We use a separate optimizer for
the representation learning gradient flow, and we adopt a higher learning rate. When using representation learning methods,
we update the target network’s encoder faster, with an EMA τ of 0.025. When using a crop augmentation, we set the image
size to 100 and crop it back to 84.

                                                            14
Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning


                                      Table 4. Benchmark settings
                         Parameter        Value
                         Max steps        10M
                         Puzzle size      3x3
                         Action space     discrete
                         Variation        image
                         Render size      100x100 (for crop augmentation)
                                          84x84 (otherwise)
                         Dataset          ImageNet-1k validation split




                                   Table 5. Hyperparameters for PPO
                                PPO Parameter                 Value
                                Input image size              84x84
                                Env instances                 64
                                Optimizer                     Adam
                                Learning Rate (LR)            2.5e-4
                                LR annealing                  yes
                                Adam ϵ                        1e-5
                                Num. steps                    16
                                Num. epochs                   4
                                Batch size                    64
                                Num. minibatches              4
                                γ                             0.99
                                GAE λ                         0.95
                                Advantage normalization       yes
                                Clip coef.                    0.1
                                Clip value loss               yes
                                Value function coef.          0.5




                                   Table 6. Hyperparameters for SAC
                       SAC Parameter                        Value
                       Input image size                     84x84
                       Env instances                        64
                       Optimizer                            Adam
                       Learning rate                        3e-4
                       Replay buffer capacity               3e5
                       Batch size                           4096
                       Warmup steps                         2e4
                       γ                                    0.99
                       Policy update frequency              2
                       Fixed α temperature                  0.05
                       Target network update frequency      1
                       Target Q functions EMA τ             0.005
                       Target encoder EMA τ                 0.005 (standard)
                                                            0.025 (otherwise)


                                                  15
          Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning


                                        Table 7. Hyperparameters for DreamerV3
                                       DreamerV3 Parameter          Value
                                       Input image size             80x80
                                       Env instances                16
                                       Model size                   12M
                                       RSSM deterministic size      2048
                                       RSSM hidden size             256
                                       RSSM classes                 16
                                       Network depth                16
                                       Network units                256
                                       Replay buffer capacity       5e5
                                       Replay ratio                 32
                                       Action repeat                1
                                       Learning rate                4e-5
                                       Batch size                   16
                                       Batch length                 64
                                       Imagination horizon          15
                                       Discount horizon             333
                                       Decoder loss scale           1 (standard)
                                                                    0 (no decoder)




                     Table 8. Hyperparameters for Representation Learning Methods and Components
                   Method                           Hyperparameter                Value
                                                    Learning rate                 1e-3
                   General
                                                    Loss coefficient              1.0
                                                    Min sigma                     1e-4
                   Transition and reward models     Max sigma                     10
                                                    Probabilistic                 no
                                                    Latent space decay weight     1e-6
                   SAC-AE
                                                    Decoder decay weight          1e-7
                   SAC-VAE                          Variational KL weight β       1e-7
                                                    Temperature                   0.1
                   CURL                             Positive samples              temporal/augmented
                                                    Augmentations                 crop
                                                    Augmentations                 crop
                   RAD                                                            channel shuffle
                                                                                  color jitter
                                                    Horizon H                     5
                   SPR
                                                    Augmentations                 crop


A.3. Augmentation Strategies
We evaluated several image augmentations in our preliminary experiments, as described in Appendix A.4.2. These
augmentations are illustrated in Figure 5, and are as follows:

  • No augmentation: The image is fed as is to the agent.

  • Crop: Randomly crops a portion of the image and resizes it back to the original dimensions. This helps learn translation
    invariance by forcing the agent to recognize patterns regardless of their position in the frame.

                                                            16
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning




Figure 5. Example of image augmentations. The top left image shows the original observation, and the subsequent images show the
observation after each augmentation procedure is independently applied.


   • Grayscale: Converts the RGB image to grayscale by averaging across color channels. This reduces the visual
     complexity and helps the agent focus on structural features rather than color information.
   • Channel Shuffle: Randomly permutes the RGB color channels. This encourages the agent to be invariant to color
     transformations while preserving the image structure.
   • Shift: Translates the image by a small random amount in both horizontal and vertical directions. Similar to crop, this
     promotes translation invariance in the learned representations.
   • Inversion: Inverts the pixel values by subtracting them from the maximum possible value (255 for 8-bit images). This
     teaches the agent to recognize patterns independent of absolute intensity values.
   • Color Jitter: Applies random color variations to the image, including brightness, contrast, saturation, and hue. This
     helps the agent to be invariant to color transformations while preserving the image structure.

After extensive experimentation, we found that the combination of grayscale and channel shuffle consistently produced the
best results. This combination effectively reduces visual complexity while maintaining important structural information. We
adopted this augmentation pair as the standard for all our agents that use augmentation techniques.

A.4. Preliminary Experiments and Design Rationale
                                                                                  100
A.4.1. H YPERPARAMETER S ELECTION P ROCESS
                                                               Success Rate (%)




                                                                                   80
For SAC agents, the entropy coefficient α significantly
                                                                                   60
impacts performance (Haarnoja et al., 2018a). While
Haarnoja et al. (2018b) proposed automatic tuning (au-                             40
totune) based on policy entropy, we found this approach                            20
ineffective for SPGym, even with various learning rates                             0
(LRs). Through systematic Hyperband (Li et al., 2018)                                   100k   200k   300k   400k    500k   600k   700k    800k
sweeps over pools of size 1, we identified α = 0.05 as                                                         Steps
optimal (Figure 6). This value provides a good balance be-
                                                                                               Autotune LR 1.29e-4   Autotune LR 4.40e-4
tween exploration and exploitation, allowing the agent to                                      Autotune LR 1.71e-3   Autotune LR 2.20e-3
efficiently learn the puzzle mechanics while maintaining                                       Fixed α=0.05          Fixed α=0.10
enough randomness to discover new solutions.                                                   Fixed α=0.14          Fixed α=0.28

PPO and DreamerV3 agents proved more robust to hy-
perparameter choices, performing well with their default   Figure 6. Performance comparison of different α values for SAC
                                                           agents on pool size 1. Fixed α = 0.05 outperforms automatic tuning
configurations. This robustness is particularly valuable
                                                           approaches across different learning rates.
in our benchmark setting, as it suggests these algorithms
can adapt to new tasks without extensive tuning. Complete hyperparameter settings are provided in Appendix A.2.

                                                              17
                           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

A.4.2. DATA AUGMENTATION A NALYSIS AND C HOICE
Building on insights from Laskin et al. (2020a) that environment-specific invariances influence optimal augmentation
strategies, we systematically evaluated augmentation pipelines for RAD, CURL, and SPR in SPGym. Our analysis focused
on sample efficiency to maintain consistency with our core experimental objectives. We tested the five augmentation
techniques detailed on Appendix A.3 on pools of 5 images, which offered a good balance between task complexity and
convergence speed. For SPR, specifically, we also experimented with shift + color jitter, as suggested by Schwarzer
et al. (2020). Across all algorithms, our experiments consistently converged to a simple two-stage augmentation process:
probabilistic grayscale conversion (with 20% chance) followed by channel shuffling (Figure 7). This pipeline’s effectiveness
likely stems from its ability to simultaneously reduce visual complexity through grayscale conversion while introducing
beneficial stochasticity via channel shuffling, with both transformations preserving critical structural information while
preventing overfitting to specific color patterns. We adopted this augmentation combination for all subsequent experiments.
While our current evaluation focused on sample efficiency, investigating how different augmentation strategies affect
generalization remains an important direction for future work.

A.5. Dataset Analysis and Choice
Our choice of ImageNet-1k as the primary dataset for SPGym was motivated by several key considerations. First,
ImageNet provides a diverse set of real-world images that challenge agents to learn generalizable visual representations.
We hypothesized that real-world images would provide unique insights related to representation learning that should be
applicable to other domains beyond the puzzle proposed in SPGym, as they contain the complex visual patterns and
structures that agents encounter in practical applications. However, as shown in Figure 8 and in comparison to Figure 4, the
performance scaling patterns we observe on ImageNet closely mirror those on DiffusionDB, suggesting that our findings are
not specific to a particular dataset but rather reflect fundamental properties of the algorithms being tested.
The similarity in scaling behavior between ImageNet and DiffusionDB is particularly noteworthy because these datasets
differ substantially in their composition and generation process. While ImageNet consists of real photographs, DiffusionDB
contains synthetic images generated by text-to-image models. The consistent performance patterns across these datasets
suggest that our results capture fundamental algorithmic behaviors rather than dataset-specific artifacts.
Our demonstration with DiffusionDB reveals promising directions for future work with procedurally generated datasets.
As shown in our analysis, agents perform similarly on ImageNet and DiffusionDB, suggesting that visual diversity rather
than semantic content drives difficulty. Procedurally generated images offer several compelling advantages worth further
investigation: they eliminate the need for large image storage by generating unique images on demand for each episode,
enable fine-grained control over the generalization challenge by gradually increasing visual differences between generated
images, and provide virtually unlimited training data diversity. These capabilities could enable more systematic studies of




                                           RAD                                   CURL                                       SPR
                   100
Success Rate (%)




                   80

                   60

                   40

                   20

                     0
                         0.2M 0.4M 0.6M 0.8M 1M 1.2M 1.4M            0.2M 0.4M 0.6M 0.8M 1M 1.2M 1.4M         0.2M 0.4M 0.6M 0.8M 1M 1.2M 1.4M
                                      Steps                                      Steps                                     Steps
                            crop   shift     grayscale   inversion    channel_shuﬄe    color_jitter   grayscale,channel_shuﬄe   shift,color_jitter




Figure 7. Comparative analysis of data augmentation strategies. Results show performance of SAC with RAD, CURL and SPR on
5-image pools. Grayscale conversion and channel shuffling emerge as the most effective combination, significantly outperforming other
augmentation strategies.

                                                                                  18
                         Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning


                                        PPO                                 SAC                                 DreamerV3
                   100         1                     5           1                            10   5   1          5                10
Success Rate (%)




                   80                                    10

                   60

                   40

                   20

                     0
                         2M        4M     6M    8M   10M      0.5M     1M         1.5M        2M           1M   2M       3M   4M
                                        Steps                           Steps                                    Steps
                                                                Pool Size    1    5      10



Figure 8. Performance scaling with DiffusionDB images. Success rates for PPO, SAC, and DreamerV3 agents across different pool
sizes (1, 5, and 10) using DiffusionDB images. The performance patterns closely mirror those seen with ImageNet (Figure 4). Shaded
regions represent 95% confidence intervals across 5 independent seeds.




visual generalization in reinforcement learning.
This cross-dataset consistency strengthens our confidence in the generalizability of our findings. It indicates that the relative
performance of different representation learning methods is driven more by their core assumptions and architectural choices
than by the specific characteristics of the training data. This is particularly important for our goal of understanding how
different approaches handle increasing visual diversity, as it suggests our conclusions may extend to other domains beyond
the specific datasets used in our experiments.

A.6. Hardware Setup and Runtime
Our hardware setup consists of an AMD Ryzen 7 3700X CPU, an NVIDIA RTX 3090 GPU, 64GB of RAM, and 128GB of
swap space. Using this configuration, DreamerV3 experiments take approximately 20 hours per run, primarily because of
the heavy use of swap space for replay buffers, which must store hundreds of thousands of images in memory. SAC takes
between 2 (e.g. standard, RAD) to 11 hours (e.g. SPR, SB) depending on the representation learning components used.
For SAC, the longer runtimes are due to the number of sequential inference steps required to train the agent and auxiliary
networks. PPO experiments are significantly faster, with the longest runs completing in about 1 hour and 30 minutes.

B. Algorithms and Variations
We describe the algorithms and their variations used in this work in detail. Our experiments employ three main algorithms –
PPO, SAC, and DreamerV3 – each with different representation learning approaches. We focus particularly on how these
methods process and learn from visual observations, as this is crucial for performance in our benchmark.

B.1. Pretraining and PPO
Drawing inspiration from previous work on pretraining methods in RL (Higgins et al., 2017; Stooke et al., 2021; Schwarzer
et al., 2021), we implement a pretraining approach for PPO that focuses on learning task-relevant visual representations. The
pretraining process involves training a PPO agent to completion on a single environment instance, then extracting its CNN
weights. These pretrained weights are then used to initialize new PPO agents, while all other network components (policy
and value networks) start from random initialization. We evaluate two scenarios: in-distribution (ID), where new agents are
trained on the same pool of images used during pretraining, and out-of-distribution (OOD), where a different image pool is
sampled. The ID setting represents an upper bound on what pretraining can achieve with perfect visual alignment, while the
OOD setting reflects the more realistic scenario of deploying pretrained encoders on novel visual inputs, similar to how
general-purpose pretrained models would be used in practice.

                                                                            19
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

B.2. Data Augmentation and RAD
Reinforcement Learning from Augmented Data (RAD) (Laskin et al., 2020a) represents a simple yet effective approach to
visual representation learning in RL. The key insight is that applying data augmentation to observations can improve sample
efficiency by exposing the agent to transformed versions of experienced states. This creates an implicit regularization effect
that helps learn more robust representations.
In our implementation, we combine RAD with SAC and apply data augmentation consistently during both policy updates
and value function learning. These augmentations are applied to observations sampled from the replay buffer before being
processed by the encoder network. The augmentation pipeline consists of two key transformations identified through our
preliminary experiments (Appendix A.4.2): grayscale conversion and channel shuffling. Following the SPR approach
(Schwarzer et al., 2020), we apply augmentations independently to each transition after sampling batches from the replay
buffer, meaning that samples from the same episode may be augmented differently. We detail how each augmentation
procedure is implemented in Appendix A.3.

B.3. Contrastive Learning and CURL
Contrastive learning methods learn representations by maximizing similarity between different views of the same observation
while minimizing similarity to other observations. In the context of RL, CURL (Laskin et al., 2020b) applies this principle
by using data augmentation to create positive pairs, enabling agents to learn invariant representations. The method achieves
this by applying random crops to observations and treating differently augmented views of the same observation as positive
pairs.
The contrastive loss for a positive pair of observations (x, x+ ) and a set of negative examples {x−
                                                                                                   i } is formulated as:


                                                             exp(fθ (x)T fθ (x+ )/α)
                          LCU RL = − log                                                         ,                           (3)
                                             exp(fθ (x)T fθ (x+ )/α) + i exp(fθ (x)T fθ (x−
                                                                        P
                                                                                          i )/α)

where α is a temperature parameter and fθ is the encoder function.
In our implementation, we combine CURL with SAC and use the same augmentation strategy identified in Appendix A.3
(grayscale conversion and channel shuffling) rather than the random crops from the original CURL paper. The encoder is
trained jointly with the RL objective, allowing the representations to adapt to both the contrastive learning task and the
control problem. Negative examples are drawn from other observations within the same batch, providing a computationally
efficient way to obtain contrastive pairs without requiring additional memory storage.

B.4. State Metrics and DBC
Deep Bisimulation for Control (DBC) (Zhang et al., 2021) takes a different approach to representation learning by focusing
on behavioral similarity between states rather than visual similarity. The key idea is to learn an encoder that maps states to a
representation space where distances reflect how similarly states behave in terms of rewards and transitions, rather than how
visually similar they appear.
Given pairs of observations (xi , xj ), DBC trains an encoder fθ to minimize:
                                                                                                     2
                            J(ϕ) = ∥ẑi − ẑj ∥1 − |ri − rj | − γW2 (P̂(·|z̄i , ai ), P̂(·|z̄j , aj )) ,                     (4)

where ẑi = fθ (xi ) represents the encoded state, z̄i = sg(fθ (xi )) is the stop-gradient version of the encoding, and P̂ is a
probabilistic transition model that predicts the next state distribution. The W2 term represents the 2-Wasserstein distance
between predicted transition distributions, which for Gaussian distributions has a closed-form solution (Zhang et al., 2021).
In our implementation, we combine DBC with SAC, jointly training the encoder with both the bisimulation objective and
the RL objective. The transition model operates in latent space, predicting Gaussian distributions over next states. This
approach helps the agent learn representations that capture behaviorally meaningful features while ignoring visual distractors
that don’t affect the game dynamics. Unlike methods that rely on data augmentation or reconstruction, DBC’s focus on
behavioral similarity makes it particularly suited for environments where visually different states might require similar
actions.

                                                                20
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

B.5. Reconstruction-Based Methods and SAC-AE/VAE
Reconstruction-based methods learn representations by training an encoder-decoder architecture to compress and reconstruct
observations. We evaluate two variants combined with SAC: SAC-AE using a deterministic autoencoder and SAC-VAE
using a variational autoencoder (Yarats et al., 2021b).
For SAC-AE, given an observation x from the replay buffer, we train an encoder fθ and decoder gϕ to minimize:

                          LRAE = Ex∼D ∥x − gϕ (fθ (x))∥2 + λz ∥fθ (x)∥22 + λϕ ∥ϕ∥22 ,
                                                                                       
                                                                                                                           (5)

where λz and λϕ are regularization coefficients that help prevent representation collapse and overfitting respectively (Ghosh
et al., 2020).
For SAC-VAE, we replace the deterministic encoder with a probabilistic encoder qψ that outputs a distribution over latent
states. The training objective becomes:

                               LV AE = Eqψ (ẑ|x) [log gϕ (x|ẑ)] − βDKL (qψ (ẑ|x)∥N (0, 1)),                             (6)

where β controls the trade-off between reconstruction quality and latent space regularization.
In both variants, we train the encoder jointly with the SAC objective, allowing the representations to adapt to both
reconstruction and control tasks. The encoded states are used as inputs to the policy and value networks. Unlike methods
that rely on data augmentation or behavioral similarity, these approaches learn representations by explicitly modeling the
visual structure of observations through reconstruction.

B.6. World Models and DreamerV3
World models learn to predict future states and outcomes by learning a compact latent representation of the environment.
DreamerV3 (Hafner et al., 2025) represents the state-of-the-art in world model-based reinforcement learning, employing an
online encoder fθ that maps observations xt into latent states ẑt . A recurrent dynamics model hω operates in this latent
space to predict future states conditioned on actions, while a reward predictor estimates immediate rewards.
The model is trained using multiple objectives that create a multi-task learning pressure. The encoder and a corresponding
decoder are trained to reconstruct observations, ensuring the latent space captures relevant visual features. The dynamics
model is trained to predict future latent states that lead to accurate reconstructions of future observations. This temporal
consistency objective forces the representations to be predictive of future states while supporting reconstruction and control.
DreamerV3 introduces several innovations for stable representation learning, including KL balancing to maintain informative
latent states and symmetric cross-entropy loss for better gradients. Unlike methods focused solely on visual similarity,
world models must learn representations that serve multiple purposes – capturing visual features, encoding dynamics, and
providing a suitable space for policy learning. We refer readers to Hafner et al. (2025) for implementation details.

B.7. Temporal Consistency Methods
Several methods leverage temporal consistency in the environment to learn better representations. These approaches are
based on the principle that a good representation should not only capture the current state but also be predictive of future
states and outcomes.

B.7.1. S ELF -P REDICTIVE R EPRESENTATIONS (SPR)
SPR (Schwarzer et al., 2020) represents a non-contrastive approach that learns by predicting future latent states. Given a
sequence of states and actions (xt:t+K , at:t+K ) from the replay buffer, where K is the prediction horizon, SPR employs:

   • An online encoder fθ that maps observations to latent states: ẑt = fθ (xt )
   • A target encoder fθ′ providing stable training targets, updated via exponential moving average
   • An action-conditioned transition model hω that predicts future latent states: ẑt+k+1 = hω (ẑt+k , at+k )
   • Projection networks pξ , pξ′ and prediction head wζ that transform representations for the prediction task

                                                              21
            Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

The model generates predictions ŷt+k = wζ (pξ (ẑt+k )) and compares them to target projections ỹt+k = pξ′ (z̃t+k ) using a
cosine similarity loss:

                                                        K            T            
                                                        X     ỹt+k          ŷt+k
                                            LSPR = −                                                                               (7)
                                                            ∥ỹt+k ∥2      ∥ŷt+k ∥2
                                                        k=1

B.7.2. S IMPLE BASELINE M ETHOD
Tomar et al. (2023) take a minimalist approach to temporal consistency by combining two predictive objectives: reward
prediction and transition prediction. We refer to this approach as the Simple Baseline (SB) method. While originally
intended as a baseline, it demonstrates the effectiveness of basic temporal prediction for representation learning.
The method augments standard RL algorithms with two predictive components in latent space:

   • A transition model hω that predicts the next encoded state
   • A reward predictor hreward that estimates immediate rewards

The transition loss Ldyn measures the mean squared error between predicted and actual next encoded states, while the reward
loss Lreward measures the error in reward predictions. These predictive losses are combined with the standard RL objective:


                                                   Ltotal = LRL + Lreward + Ldyn                                                   (8)

In our implementations, we combine both SPR and SB with SAC. For SPR, we apply the augmentation strategy identified in
Appendix A.3 before encoding observations. Both methods operate entirely in latent space, avoiding the computational cost
of pixel-space reconstruction while leveraging temporal structure to learn meaningful representations.

C. Supplementary Analyses and Results
C.1. Representation Learning Analysis
We further evaluate SPGym’s representation learning assessment capabilities through two analyses: (1) comparing raw pixel
vs. ground-truth state learning, and (2) linear probes of learned representations.

C.1.1. S TATE - BASED VS . I MAGE - BASED O BSERVATIONS
To establish a baseline and understand the impact of the visual representation challenge, we trained PPO, SAC, and
DreamerV3 agents using SPGym’s one-hot encoding variation. These one-hot vectors represent the ground-truth puzzle
state, identical to the targets used for our linear probes (see Appendix C.1.2). We compared their sample efficiency (steps to
80% success, averaged over 5 seeds) against their image-based counterparts. For PPO and SAC agents processing one-hot
vectors, CNN encoders were replaced with 2-layer MLPs. DreamerV3 utilized its default non-image encoder, a 3-layer MLP.
Hyperparameters were kept consistent with image-based experiments, without specific tuning for the one-hot setting.
Table 9. Steps to 80% success on one-hot vs. image-based observations. Lower is better. ‘-’ indicates experiments were not run for that
specific configuration due to computational constraints.
                    Algorithm       Grid Size          One-hot            Image (Pool 1)        Image (Pool 5)
                    PPO                 3x3        661.69k±81.44k        1.75M±444.81k           7.80M±1.08M
                                        4x4        12.29M±467.84k        24.46M±7.58M                 -
                    SAC                 3x3        672.51k±63.10k        334.26k±67.47k        907.21k±116.20k
                                        4x4         5.09M±463.14k         8.14M±3.64M                 -
                    DreamerV3           3x3        834.86k±61.10k        417.09k±55.03k         1.23M±199.49k
                                        4x4         3.68M±436.97k        2.26M±287.23k          5.81M ± 2.17M

The results in Table 9 offer several insights. For PPO (both grid sizes) and SAC (4x4 grid), learning directly from ground-
truth one-hot states is more sample efficient than learning from images. This is expected, as the one-hot encoding removes

                                                                  22
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

the burden of representation learning from pixels. The instances where image-based agents (SAC and DreamerV3 on 3x3
grid, pool 1) converged faster than their one-hot counterparts might be attributed to differences in network architectures
(MLP vs. CNN/Transformer backbones) and the absence of specific tuning for the one-hot setting.
Crucially, the one-hot encoding setting presents a fixed, minimal representation learning challenge. In contrast, SPGym’s
image-based variations allow for a systematic scaling of the visual diversity challenge by increasing the image pool size (e.g.,
Pool 1 vs. Pool 5 vs. Pool 10, etc., see Appendix C.2). Across all agents and grid sizes, increasing visual diversity from pool
size 1 to pool size 5 (and beyond) consistently increases sample complexity. This demonstrates SPGym’s ability to isolate
and stress the visual representation learning component, as the underlying task dynamics remain constant. This controlled
evaluation reveals limitations in how effectively different RL agents learn representations under scalable visual diversity,
insights not apparent from the one-hot setting alone. While perfect disentanglement of representation learning from policy
learning is challenging in end-to-end training, SPGym provides a valuable framework for structured, comparative evaluation
of visual representation learning capabilities in RL.

C.1.2. L INEAR P ROBE A NALYSIS
To directly assess the quality of learned visual representations, we conducted linear probing experiments. For each trained
PPO and SAC agent, we froze its encoder and trained a single-layer MLP classifier on top of the features extracted by it
until convergence. The classifier’s task was to predict the one-hot encoded ground-truth puzzle state corresponding to the
input image. This setup allows us to quantify how much task-relevant spatial information is captured by the agent’s encoder.
High probe accuracy indicates the encoder has learned features that are linearly separable with respect to the underlying
game state.
Our analysis reveals several key insights. First, we find a strong, statistically significant correlation between linear probe
accuracy and agent sample efficiency (Pearson r=-0.81, p=1.1e-13), with higher probe accuracy being highly predictive of
fewer environment steps required to reach 80% success. This suggests that agents whose encoders capture more task-relevant
spatial information tend to learn the task more efficiently.
Second, examining probe accuracies across pool sizes and algorithms further clarifies this relationship. As image pool
size increases, both probe accuracy and task performance systematically degrade, isolating the effect of visual diversity
on representation learning. For example, standard SAC maintains high probe accuracy (100% at pool size 1, 97.63% at
pool size 5), mirroring its strong sample efficiency. In contrast, methods with lower sample efficiency show reduced probe
performance: SAC+VAE achieves only 78.21% probe accuracy at pool size 5, while SAC+RAD reaches 98.66%. Other
representation learning methods that underperform standard SAC, such as SPR and DBC, also exhibit declining probe
accuracy as pool size increases (e.g., SPR drops from 94.31% at pool size 5 to 75.48% at pool size 10).
These trends indicate that different algorithms develop representations with varying alignment to the spatial reasoning
demands of the task. The consistent link between probe accuracy and sample efficiency across diverse methods suggests that
SPGym can help identify which learning procedures lead to representations that better support task performance.
Full linear probe accuracy data for all agents and pool sizes are presented in Table 10 below. Comprehensive performance
metrics, including the sample efficiency data used in the correlation analysis, can be found in Appendix C.2.

C.2. Detailed Performance Analysis
This section provides comprehensive analysis of algorithmic performance in SPGym, examining how different representation
learning approaches handle increasing visual diversity. We present detailed learning curves showing the training dynamics
of each method, along with quantitative performance metrics across varying pool sizes.
The analysis includes detailed algorithmic variant analysis explaining why certain methods succeed or fail, and com-
prehensive performance curves for PPO (Figure 10), SAC (Figure 11), and DreamerV3 (Figure 12). Tables 11 to 13
provide quantitative metrics per pool size (Pool) including sample efficiency (Steps), and episode length (Length), across
algorithms and variants. Tables 11 and 12 also include in-distribution and out-of-distribution success rates (ID Success,
OOD Easy, OOD Hard), which were not computed for DreamerV3 due to complexities in the original codebase. The rare
non-zero success rates in Hard OOD likely stem from chance encounters with nearly-solved initial states rather than genuine
generalization.




                                                              23
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning




Table 10. Linear probe accuracy (%) for each agent and pool size. Accuracy of the linear probe indicates linearly separable features
capturing task-relevant spatial information. There is a statistically significant correlation between probe accuracy and agent sample
efficiency (steps to 80% success).
                         Agent                Pool Size     Steps (M)     Linear Probe Accuracy (%)
                                              1             1.75±0.44              99.81±0.14
                                              5              7.80±1.08             96.42±1.06
                         PPO
                                              10             9.73±0.36             87.84±1.40
                                              20            10.00±0.00             66.97±5.28
                                              1             0.95±0.21              99.81±0.12
                         PPO+PT(ID)           5              5.55±1.22             96.83±0.61
                                              10             9.17±1.10             89.54±0.95
                                              1             1.34±0.42              99.59±0.33
                         PPO+PT(OOD)          5              7.03±1.07             95.68±0.77
                                              10             9.70±0.41             88.90±1.11
                                              1             0.33±0.07              100.00±0.00
                                              5              0.91±0.12             97.63±0.68
                                              10             1.65±0.31             93.34±0.48
                         SAC
                                              20             4.52±1.43             80.74±6.31
                                              30             9.23±0.96             66.69±8.41
                                              50            10.00±0.00             55.52±0.09
                                              1             0.24±0.03              99.99±0.01
                         SAC+RAD              5              0.42±0.06             98.66±0.20
                                              10             0.82±0.18             89.74±0.73
                                              1             0.46±0.10              99.98±0.03
                         SAC+CURL             5              1.56±0.31             97.14±0.17
                                              10             5.24±1.92             89.47±1.23
                                              1             2.09±0.81              99.99±0.01
                         SAC+SPR              5              3.68±1.68             94.31±0.24
                                              10            10.00±0.00             75.48±1.82
                                              1             0.44±0.04              100.00±0.00
                         SAC+DBC              5              0.99±0.25             94.26±1.19
                                              10            10.00±0.00             76.59±5.82
                                              1             0.42±0.09              100.00±0.00
                         SAC+AE               5              1.04±0.24             95.52±4.56
                                              10             2.03±0.38             88.66±1.88
                                              1             1.13±0.14              99.66±0.06
                         SAC+VAE              5              5.30±0.68             78.21±2.35
                                              10            10.00±0.00             64.76±0.11
                                              1             0.98±0.88              99.90±0.03
                         SAC+SB               5              2.08±0.30             96.69±1.08
                                              10            10.00±0.00             81.93±6.06




                                                                 24
           Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

C.2.1. A NALYSIS OF A LGORITHMIC VARIANTS
Our preliminary analysis of algorithmic variants suggests how method assumptions may influence effectiveness in SPGym.
PPO with in-distribution pretraining (PT (ID)) significantly boosts sample efficiency across all pool sizes, though this
advantage diminishes at pool size 10. Out-of-distribution pretraining (PT (OOD)) offers more modest gains that also decrease
with larger pools, suggesting limited transfer from general-purpose pretrained encoders. For SAC, data augmentation
via RAD consistently improves efficiency across all pool sizes, with particularly pronounced benefits for larger pools.
Conversely, many sophisticated auxiliary methods struggle: CURL, SPR, and VAE variants consistently require more
samples than standard SAC, with particularly poor performance on larger pools. DBC and AE generally underperform or
offer marginal improvements. DreamerV3 demonstrates particularly strong performance, consistently outperforming both
PPO and SAC variants across all pool sizes with remarkably stable performance. The variant without decoder gradients
shows reduced performance, highlighting the importance of the reconstruction objective and suggesting that learning a
predictive environment model provides an effective foundation for handling visual diversity. We now provide more detailed
hypotheses for these behaviors.
Pretraining. As shown in Figure 10, pretraining provides clear benefits for PPO, especially with larger pools. While
in-distribution pretraining provides strong gains, almost matching the performance of PPO with one-hot-based observations
(see Appendix C.1.1), this represents an optimistic upper bound since real-world scenarios rarely permit task-specific
pretraining. Interestingly, out-of-distribution pretraining also shows benefits compared to random initialization (90% vs
86% success at pool size 5), suggesting some transfer of useful visual features from the pretrained encoder. This indicates
that even general-purpose pretrained encoders can provide a helpful initialization for RL tasks, though not matching the
performance of task-specific pretraining.

Data augmentation. RAD succeeds by enforcing spatial invariances through grayscale+channel shuffling, preserving
structural relationships critical for puzzle solving while adding beneficial stochasticity. Its weak assumptions make
it robust across diversity levels, maintaining strong and consistent performance across pool sizes through this simple
augmentation-based approach.

Contrastive learning. CURL underperforms as instance discrimination may prioritize whole-image features over tile-level
details needed for puzzle solving. This suggests contrastive learning’s focus on global image similarity may not align well
with the local spatial reasoning required for puzzle solving.

State similarity learning. DBC fails possibly because its core assumption – that states with similar dynamics should have
similar representations – breaks down in two ways: identical puzzle states appear radically distinct between episodes with
different sampled images, while different states can share visual patterns due to being from the same episode or having the
same base image.

Temporal consistency. While the environment’s underlying dynamics are deterministic, temporal consistency methods
such as SPR and SB face three key challenges: (1) The visual manifestation of state transitions varies dramatically between
episodes due to different base images, forcing the encoder to learn position-invariant representations that capture tile
relationships rather than visual content – a difficult disentanglement problem. (2) The assumption of smooth latent space
transitions is violated by the discrete nature of tile movements, where single actions induce significant changes in both
visual appearance and puzzle state. (3) Most crucially, these methods must simultaneously learn two competing objectives:
temporal predictability in latent space (for transition modeling) and visual discriminability (for representation learning). This
creates a conflict where features useful for predicting latent transitions (tile positions) are obscured by visually salient but
dynamically irrelevant image content. SPR’s prediction horizon mechanism exacerbates this by compounding representation
errors through multiple latent transition steps. Similarly, SB’s transition/reward prediction suffers because the latent space
conflates visual features with positional information – while rewards depend solely on tile positions, the visual diversity in
observations provides no direct positional cues. The same absolute position (e.g., top-left corner) shows completely different
visual content each episode, making position-aware latent representations particularly difficult to learn.
Reconstruction-based learning. The success of DreamerV3’s decoder highlights the value of the discrete reconstruction
loss in learning useful representations for SPGym. In contrast, simple autoencoders (AE) offer little benefit for SAC, and
variational autoencoders (VAE) hurt performance possibly because their continuous latent space assumptions conflict with
SPGym’s discrete state transitions.

                                                               25
            Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning

These findings align with observations from Tomar et al. (2023), who noted that many representation learning methods
underperform or fail completely when tested outside their original domain. We note that our evaluation focused on using
each algorithm’s suggested hyperparameters for visual RL with discrete actions, aiming to assess their out-of-the-box
performance. The results may not reflect the best possible performance achievable through extensive hyperparameter tuning.


Table 11. Performance metrics for PPO agents across image pool sizes. ‘Steps’ indicates the number of environment steps (in millions)
required to reach 80% success rate during training. ‘ID Success’ shows the final success rate at the end of 10M training steps when
evaluating on the same pool used during training. ‘OOD Easy’ shows the success rate when evaluated on 100 unseen images from the
‘Easy’ distribution. ‘OOD Hard’ shows the success rate when evaluated on 100 unseen images from the ‘Hard’ distribution. ‘Length’
indicates the average number of steps required to solve an instance of the puzzle at the last 100 episodes.
   Algorithm      Variation      Pool    Steps (M)      ID Success (%)      OOD Easy (%)         OOD Hard (%)            Length
                                  1        1.75±0.44               100±0             0.49±0.13               0.0±0.0     72.9±4.4
                  Standard        5        7.80±1.08               86±16             0.53±0.14               0.3±0.3   212.0±19.0
                                  10       9.73±0.36               47±18             0.34±0.08               0.6±0.4   599.6±25.6
                                  20      10.00±0.00                12±7             0.12±0.03               0.0±0.0   903.4±23.9
   PPO                            1        0.95±0.21               100±0             0.33±0.09               0.1±0.1     76.2±4.8
                  PT (ID)         5        5.55±1.22               100±0             0.53±0.16               0.3±0.4     83.2±7.2
                                  10       9.17±1.10               38±20             0.27±0.07               0.9±0.7   658.4±25.3
                                  1        1.34±0.42               100±0             0.49±0.12               0.2±0.3     72.7±4.0
                  PT (OOD)        5        7.03±1.07               90±16             0.52±0.14               0.3±0.3   156.0±16.0
                                  10       9.70±0.41               46±19             0.34±0.08               0.8±1.2   572.0±26.0




                                                                 26
            Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning



Table 12. Performance metrics for SAC agents across image pool sizes. ‘Steps’ indicates the number of environment steps (in millions)
required to reach 80% success rate during training. ‘ID Success’ shows the final success rate at the end of 10M training steps when
evaluating on the same pool used during training. ‘OOD Easy’ shows the success rate when evaluated on 100 unseen images from the
‘Easy’ distribution. ‘OOD Hard’ shows the success rate when evaluated on 100 unseen images from the ‘Hard’ distribution. ‘Length’
indicates the average number of steps required to solve an instance of the puzzle at the last 100 episodes.
   Algorithm       Variation      Pool    Steps (M)      ID Success (%)         OOD Easy (%)         OOD Hard (%)             Length
                                    1       0.33±0.07                100±0              0.45±0.12                0.0±0.0    86.7±19.5
                                    5       0.91±0.12                100±0              0.58±0.12                0.0±0.0    76.8±16.2
                   Standard        10       1.65±0.31                100±0              0.46±0.12                0.0±0.0    78.7±16.5
                                   20       4.52±1.43                 98±2              0.35±0.11                0.0±0.0    63.2±18.4
                                   30       9.23±0.96                47±38              0.19±0.04                0.0±0.0   525.0±63.1
                                   50      10.00±0.00                  7±5              0.06±0.02                0.0±0.0   917.0±35.5
                                    1       0.24±0.03                100±0              0.62±0.15                0.0±0.0     50.9±6.8
                   RAD              5       0.42±0.06                100±0              0.42±0.13                0.0±0.0    76.9±12.0
                                   10       0.82±0.18                100±0              0.30±0.11                0.0±0.0   144.1±25.4
                                    1       0.46±0.10                100±0              0.76±0.09                0.0±0.0    77.2±13.1
                   CURL             5       1.56±0.31                100±0              0.44±0.10                0.2±0.4    84.9±17.7
                                   10       5.24±1.92                100±0              0.37±0.11                0.0±0.0    88.0±20.3
                                    1       2.09±0.81                100±0              0.65±0.13                0.6±1.2   206.4±23.8
   SAC             SPR             5        3.68±1.68                69±13              0.21±0.09                0.0±0.0   523.9±55.6
                                   10      10.00±0.00                  9±3              0.07±0.04                0.0±0.0   912.1±36.0
                                    1       0.44±0.04                100±0              0.44±0.13                0.0±0.0    65.1±13.8
                   DBC              5       0.99±0.25                100±0              0.34±0.13                0.0±0.0   111.2±22.7
                                   10      10.00±0.00                  2±1              0.13±0.04                0.0±0.0   588.5±63.3
                                    1       0.42±0.09                100±0              0.78±0.11                0.0±0.0    85.4±22.1
                   AE               5       1.04±0.24                100±0              0.64±0.16                0.0±0.0   102.6±22.6
                                   10       2.03±0.38                100±0              0.55±0.12                1.3±2.6    78.0±17.1
                                    1       1.13±0.14                100±0              0.64±0.15                0.0±0.0    75.1±15.6
                   VAE              5       5.30±0.68                100±0              0.30±0.08                0.0±0.0    81.2±18.2
                                   10      10.00±0.00                25±17              0.12±0.03                0.4±0.5   834.3±47.5
                                    1       0.98±0.88                100±0              0.89±0.08                0.0±0.0   130.1±25.0
                   SB               5       2.08±0.30                91±17              0.65±0.12                0.0±0.0   117.8±20.5
                                   10      10.00±0.00                  3±2              0.06±0.02                0.2±0.4   980.3±18.0



Table 13. Performance metrics for DreamerV3 agents across image pool sizes. ‘Steps’ indicates the number of environment steps (in
millions) required to reach 80% success rate during training. ‘ID Success’ shows the final success rate at the end of 10M training steps
when evaluating on the same pool used during training. ‘Length’ indicates the average number of steps required to solve an instance of the
puzzle at the last 100 episodes.
                        Algorithm        Variation       Pool     Steps (M)      ID Success (%)          Length
                                                           1        0.42±0.06                100±0      83.5±11.8
                                                           5        1.23±0.20                100±0       31.0±3.9
                                                           10       1.44±0.58                100±0       32.9±4.0
                                         Standard         20        3.96±0.61                100±0       27.8±3.5
                        DreamerV3                          30       5.84±0.71                 99±1       38.0±6.2
                                                           50       6.62±2.67                87±14     177.8±24.8
                                                          100       8.18±2.33                29±14     676.1±32.8
                                                           1        1.13±0.12                100±0       36.0±2.5
                                         w/o decoder       5        1.79±0.61                100±0       42.1±3.2
                                                           10       2.57±0.91                100±0       46.7±3.9



                                                                   27
                          Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning




                    4M                                                                                   12M
                            DreamerV3         DreamerV3 w/o reconstruction                                     PPO
                   3.5M                                                                                        PPO + pretrained (OOD)
                                                                                                         10M
                                                                                                               PPO + pretrained (ID)
Samples to solve




                                                                                      Samples to solve
                    3M
                                                                                                         8M
                   2.5M

                    2M                                                                                   6M

                   1.5M
                                                                                                         4M
                    1M
                                                                                                         2M
                   0.5M

                      0                                                                                    0
                              1                   5                10                                             1                5                10
                                        Image pool size                                                                     Image pool size
                   12M
                                    SAC         SAC + RAD    SAC + AE   SAC + CURL         SAC + DBC            SAC + VAE    SAC + SPR   SAC + SB
                   10M
Samples to solve




                   8M

                   6M

                   4M

                   2M

                     0
                                          1                                           5                                                  10
                                                                             Image pool size

Figure 9. Sample efficiency of different methods across pool sizes (lower is better). SPGym differentiates agents based on their
representation learning capabilities. Top left: DreamerV3 variants demonstrate the value of reconstruction learning. Top right: PPO results
show benefits of pretraining. Bottom: Comprehensive comparison of SAC variants reveals trade-offs between different representation
learning approaches.




                                                                                     28
                          Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning




                                   Pool Size 1                                Pool Size 5                                   Pool Size 10
                   100
Success Rate (%)




                   80

                   60

                   40

                   20

                     0
                             1M      2M          3M        4M          2M     4M          6M      8M                 2M     4M       6M     8M
                                     Steps                                        Steps                                         Steps
                                                           PPO    PPO + pretrained (OOD)        PPO + pretrained (ID)




Figure 10. Learning curves for PPO variants. Success rate during training for baseline PPO and versions with pretrained encoders
across different pool sizes. Shaded regions represent 95% confidence intervals across 5 independent runs.

                                   Pool Size 1                                Pool Size 5                                   Pool Size 10
                   100
Success Rate (%)




                   80

                   60

                   40

                   20

                     0
                            2M     4M        6M       8M               2M     4M          6M      8M                 2M     4M       6M     8M
                                     Steps                                        Steps                                         Steps
                                    SAC    SAC + RAD       SAC + AE    SAC + CURL    SAC + DBC         SAC + VAE    SAC + SPR    SAC + SB




Figure 11. Learning curves for SAC variants. Success rate during training for baseline SAC and versions with different representation
learning components across different pool sizes. Shaded regions represent 95% confidence intervals across 5 independent runs.

                                   Pool Size 1                                Pool Size 5                                   Pool Size 10
                   100
Success Rate (%)




                   80

                   60

                   40

                   20

                     0
                         0.2M 0.4M 0.6M 0.8M 1M 1.2M 1.4M             0.5M   1M          1.5M    2M      2.5M      0.5M 1M 1.5M 2M 2.5M 3M 3.5M
                                     Steps                                        Steps                                         Steps
                                                                 DreamerV3   DreamerV3 w/o reconstruction




Figure 12. Learning curves for DreamerV3 variants. Success rate during training for DreamerV3 with and without decoder across
different pool sizes. Shaded regions represent 95% confidence intervals across 5 independent runs.




                                                                                    29
