# Mario Plays on a Manifold: Generating Functional Content in Latent Space through Differential Geometry

arXiv: https://arxiv.org/abs/2206.00106 · HTML: https://mlsanity.com/paper/2206.00106/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- Builds on 29 of its 39 references that are in the map.
- First posted on arXiv 31 May 2022.

## Builds on (most cited first, 29 of 29)

- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [A Style-Based Generator Architecture for Generative Adversarial Networks](https://mlsanity.com/paper/1812.04948/) (2018)
- [Auto-Encoding Variational Bayes](https://mlsanity.com/paper/1312.6114/) (2013)
- [Latent Space Oddity: on the Curvature of Deep Generative Models](https://mlsanity.com/paper/1710.11379/) (2017)
- [Procedural Content Generation via Machine Learning (PCGML)](https://mlsanity.com/paper/1702.00539/) (2017)
- [Evolving Mario Levels in the Latent Space of a Deep Convolutional Generative Adversarial Network](https://mlsanity.com/paper/1805.00728/) (2018)
- [Mat'ern Gaussian Processes on Graphs](https://mlsanity.com/paper/2010.15538/) (2020)
- [Metrics for Deep Generative Models](https://mlsanity.com/paper/1711.01204/) (2017)
- [The VGLC: The Video Game Level Corpus](https://mlsanity.com/paper/1606.07487/) (2016)
- [Super Mario as a String: Platformer Level Generation Via LSTMs](https://mlsanity.com/paper/1603.00930/) (2016)
- [Bootstrapping Conditional GANs for Video Game Level Generation](https://mlsanity.com/paper/1910.01603/) (2019)
- [The Geometry of Deep Generative Image Models and its Applications](https://mlsanity.com/paper/2101.06006/) (2021)
- [Illuminating Diverse Neural Cellular Automata for Level Generation](https://mlsanity.com/paper/2109.05489/) (2021)
- [Metrics for Probabilistic Geometries](https://mlsanity.com/paper/1411.7432/) (2014)
- [Generating and Blending Game Levels via Quality-Diversity in the Latent Space of a Variational Autoencoder](https://mlsanity.com/paper/2102.12463/) (2021)
- [Fast and Robust Shortest Paths on Manifolds Learned from Data](https://mlsanity.com/paper/1901.07229/) (2019)
- [Generative Models for Automatic Chemical Design](https://mlsanity.com/paper/1907.01632/) (2019)
- [Learning Riemannian Manifolds for Geodesic Motion Skills](https://mlsanity.com/paper/2106.04315/) (2021)
- [Pulling back information geometry](https://mlsanity.com/paper/2106.05367/) (2021)
- [Interactive Evolution and Exploration Within Latent Level-Design Space of Generative Adversarial Networks](https://mlsanity.com/paper/2004.00151/) (2020)
- [TOAD-GAN: Coherent Style Level Generation from a Single Example](https://mlsanity.com/paper/2008.01531/) (2020)
- [CPPN2GAN: Combining Compositional Pattern Producing Networks and GANs for Large-scale Pattern Generation](https://mlsanity.com/paper/2004.01703/) (2020)
- [Video Game Level Repair via Mixed Integer Linear Programming](https://mlsanity.com/paper/2010.06627/) (2020)
- [Conditional Level Generation and Game Blending](https://mlsanity.com/paper/2010.07735/) (2020)
- [DOOM Level Generation using Generative Adversarial Networks](https://mlsanity.com/paper/1804.09154/) (2018)
- [Sequential Segment-based Level Generation and Blending using Variational Autoencoders](https://mlsanity.com/paper/2007.08746/) (2020)
- [Dungeon and Platformer Level Blending and Generation using Conditional VAEs](https://mlsanity.com/paper/2106.12692/) (2021)
- [Game Level Clustering and Generation using Gaussian Mixture VAEs](https://mlsanity.com/paper/2009.09811/) (2020)

## Built on by (most cited first, 5 of 5)

- [MarioGPT: Open-Ended Text2Level Generation through Large Language Models](https://mlsanity.com/paper/2302.05981/) (2023)
- [Identifying latent distances with Finslerian geometry](https://mlsanity.com/paper/2212.10010/) (2022)
- [Tools for Landscape Analysis of Optimisation Problems in Procedural Content Generation for Games](https://mlsanity.com/paper/2302.08479/) (2023)
- [Analysis of Robustness of a Large Game Corpus](https://mlsanity.com/paper/2504.03940/) (2025)
- [PepCompass: Navigating peptide embedding spaces using Riemannian Geometry](https://mlsanity.com/paper/2510.01988/) (2025)

## Abstract (arXiv)

Deep generative models can automatically create content of diverse types. However, there are no guarantees that such content will satisfy the criteria necessary to present it to end-users and be functional, e.g. the generated levels could be unsolvable or incoherent. In this paper we study this problem from a geometric perspective, and provide a method for reliable interpolation and random walks in the latent spaces of Categorical VAEs based on Riemannian geometry. We test our method with "Super Mario Bros" and "The Legend of Zelda" levels, and against simpler baselines inspired by current practice. Results show that the geometry we propose is better able to interpolate and sample, reliably staying closer to parts of the latent space that decode to playable content.
