Gym environment for Sokoban puzzles, suitable for RL research
Top 76.5% on sourcepulse
This repository provides a Sokoban environment for OpenAI Gym, designed for reinforcement learning research. It addresses the challenge of irreversible mistakes in Sokoban puzzles by implementing a novel, solvable level generation algorithm based on reverse play and a heuristic scoring system.
How It Works
The environment generates random, solvable Sokoban levels using a three-phase process: topology generation via random walks, element placement (player, boxes, targets), and a crucial reverse-play phase using Depth First Search to ensure solvability and assign a difficulty score. This approach allows for training RL agents on diverse, non-overfitting scenarios.
Quick Start & Requirements
pip install gym-sokoban
Highlighted Details
rgb_array
, human
, tiny_rgb_array
, tiny_human
.Sokoban-v0
to Sokoban-huge-v0
) with different sizes and box counts.Fixed Targets
, Multiple Player
, Push&Pull
, and Boxoban
(DeepMind puzzles).Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 year ago
1 day