gym-sokoban  by mpSchrader

Gym environment for Sokoban puzzles, suitable for RL research

created 7 years ago
377 stars

Top 76.5% on sourcepulse

GitHubView on GitHub
Project Summary

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

Highlighted Details

  • Implements 9 actions (Move/Push in 4 directions, No-Op).
  • Offers multiple rendering modes: rgb_array, human, tiny_rgb_array, tiny_human.
  • Includes various room configurations (e.g., Sokoban-v0 to Sokoban-huge-v0) with different sizes and box counts.
  • Supports variations like Fixed Targets, Multiple Player, Push&Pull, and Boxoban (DeepMind puzzles).

Maintenance & Community

  • Project initiated by Max-Philipp B. Schrader.
  • Open for contributions via issues or pull requests.

Licensing & Compatibility

  • License not explicitly stated in the README.

Limitations & Caveats

  • Larger room configurations may take significant time to generate, especially on laptops.
  • The README does not specify the exact license, which could impact commercial use.
Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
19 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.