[Paper Review] Experience-Driven PCG via Reinforcement Learning: A Super Mario Bros Study
This paper proposes EDRL, a novel framework that combines experience-driven procedural content generation (EDPCG) and reinforcement learning (PCGRL) to generate endless, playable, and fun Super Mario Bros levels in real time. By using latent vectors from a pre-trained GAN to generate level segments, an RL agent selects and concatenates segments while optimizing for fun and diversity via KL-divergence-based reward functions, with automated repair and AI-based playability testing ensuring quality and correctness.
We introduce a procedural content generation (PCG) framework at the intersections of experience-driven PCG and PCG via reinforcement learning, named ED(PCG)RL, EDRL in short. EDRL is able to teach RL designers to generate endless playable levels in an online manner while respecting particular experiences for the player as designed in the form of reward functions. The framework is tested initially in the Super Mario Bros game. In particular, the RL designers of Super Mario Bros generate and concatenate level segments while considering the diversity among the segments. The correctness of the generation is ensured by a neural net-assisted evolutionary level repairer and the playability of the whole level is determined through AI-based testing. Our agents in this EDRL implementation learn to maximise a quantification of Koster's principle of fun by moderating the degree of diversity across level segments. Moreover, we test their ability to design fun levels that are diverse over time and playable. Our proposed framework is capable of generating endless, playable Super Mario Bros levels with varying degrees of fun, deviation from earlier segments, and playability. EDRL can be generalised to any game that is built as a segment-based sequential process and features a built-in compressed representation of its game content.
Motivation & Objective
- To develop a framework for online, experience-driven procedural content generation (PCG) in games using reinforcement learning.
- To address the challenge of generating endless, playable, and diverse levels in real time, particularly in complex platformers like Super Mario Bros.
- To integrate player experience metrics—specifically fun and historical deviation—into the RL reward function for personalized level design.
- To ensure playability and correctness of generated levels through neural net-assisted evolutionary repair and AI-based testing.
- To demonstrate the viability and scalability of the EDRL framework beyond the GVGAI benchmark games, particularly in games with large action spaces and segment-based level design.
Proposed method
- The EDRL framework uses a pre-trained GAN to generate level segments, represented as latent vectors for efficient online processing.
- An RL agent selects and concatenates these latent vectors to build longer levels in real time, guided by a reward function that balances fun and diversity.
- The reward function quantifies Koster’s principle of fun by moderating the Kullback-Leibler (KL) divergence between consecutive level segments to maintain moderate variation.
- A CNet-assisted evolutionary algorithm repairs structural defects (e.g., broken pipes) in generated levels to ensure correctness.
- Playability is verified using an A* agent that tests whether the full level can be completed.
- The system operates online, enabling dynamic, real-time level generation that adapts to player experience metrics.
Experimental results
Research questions
- RQ1Can reinforcement learning be effectively used to generate endless, playable, and fun levels in a complex platformer like Super Mario Bros, beyond the GVGAI framework?
- RQ2How can player experience metrics such as fun and historical deviation be formalized and integrated into an RL-based level generation system?
- RQ3To what extent can latent vector-based generation from a pre-trained GAN enable fast, scalable, and diverse level composition in real time?
- RQ4How can automated repair and AI-based playability testing ensure correctness and playability of generated levels without human intervention?
- RQ5Can the EDRL framework be generalized to other games that are built as sequential, segment-based processes with compressed content representations?
Key findings
- The EDRL framework successfully generates endless, playable Super Mario Bros levels in real time, with the RL agent learning to balance fun and diversity through KL-divergence-based reward shaping.
- The RL agents achieve a moderate level of KL divergence across segments, indicating effective moderation of diversity to maintain player engagement without excessive unpredictability.
- The neural net-assisted evolutionary repairer effectively fixes structural defects in generated levels, improving correctness and reducing failure rates.
- AI-based testing via an A* agent confirms that all generated levels are fully playable, ensuring that the final output is functional and complete.
- The framework demonstrates scalability beyond GVGAI games, showing promise for application in more complex, large-action-space games with segment-based design.
- The approach enables personalized level generation by adapting to the behavior of test agents, suggesting potential for dynamic adaptation to player skill and preferences.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.