← All projects

RL Level Generator

Reinforcement-learning generator that produces 100% solvable 2D platformer levels.

Why it mattersDemonstrates RL-driven content generation with guaranteed validity constraints - a pattern that transfers to any domain where generated outputs must meet hard rules.

PythonPyTorchGymnasium

What it does

A reinforcement-learning generator that designs 2D platformer levels - each one guaranteed to be fully solvable. Every level the system outputs has a playable path through it.

Where it applies

  • Game design tooling where content pipelines need validity guarantees, not just visual variety.
  • More broadly, any generation task where the output has to satisfy hard constraints (valid schedules, feasible plans, routable networks).
  • A concrete demonstration of RL-driven generation with built-in correctness, not post-hoc filtering.

How it works (high level)

Level construction is framed as a sequential decision problem. A PPO policy places level elements step by step; the reward function encodes solvability as a hard signal. The trained agent is inexpensive at inference and its outputs are, by construction, playable.

Stack

Python · PyTorch · Gymnasium · PPO. GitHub