Linear levels through n-grams

Steve Dahlskog, Julian Togelius, Mark J. Nelson

    Research output: Chapter in Book/Report/Conference proceedingConference contribution


    We show that novel, linear game levels can be created using ngrams 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. Copyright is held by the owner/author(s). Publication rights licensed to ACM.

    Original languageEnglish (US)
    Title of host publicationMINDTREK 2014 - Proceedings of the 18th International Academic MindTrek Conference
    Subtitle of host publication"Media Business, Management, Content and Services"
    EditorsHelja Franssila, Janne Paavilainen, Artur Lugmayr
    PublisherAssociation for Computing Machinery, Inc
    Number of pages7
    ISBN (Electronic)9781450330060
    StatePublished - Nov 4 2014
    Event18th International Academic MindTrek Conference, MINDTREK 2014 - Tampere, Finland
    Duration: Nov 4 2014Nov 6 2014

    Publication series

    NameMINDTREK 2014 - Proceedings of the 18th International Academic MindTrek Conference:


    Other18th International Academic MindTrek Conference, MINDTREK 2014


    • N-grams
    • Procedural content generation
    • Videogames

    ASJC Scopus subject areas

    • Computer Science Applications
    • Human-Computer Interaction
    • Software

    Cite this