Linear levels through n-grams

Download: PDF.

“Linear levels through n-grams” by Steve Dahlskog, Julian Togelius, and Mark J. Nelson. In Proceedings of the 18th International Academic MindTrek Conference, 2014.

Abstract

We show that novel, linear game levels can be created using n-grams that have been trained on a corpus of existing levels. The method is fast and simple, and produces levels that are recognisably in the same style as those in the corpus that it has been trained on. We use Super Mario Bros. as an example domain, and use a selection of the levels from the original game as a training corpus. We treat Mario levels as a left-to-right sequence of vertical level slices, allowing us to perform level generation in a setting with some formal similarities to n-gram-based text generation and music generation. In empirical results, we investigate the effects of corpus size and n (sequence length). While the applicability of the method might seem limited to the relatively narrow domain of 2D games, we argue that many games in effect have linear levels and n-grams could be used to good effect, given that a suitable alphabet can be found.

BibTeX entry:

@inproceedings{NgramLevels:MT14,
   author = {Steve Dahlskog and Julian Togelius and Mark J. Nelson},
   title = {Linear levels through n-grams},
   booktitle = {Proceedings of the 18th International Academic MindTrek
	Conference},
   year = {2014}
}

Back to publications.