skip to main content
10.1145/3582437.3587211acmotherconferencesArticle/Chapter ViewAbstractPublication PagesfdgConference Proceedingsconference-collections
research-article

Level Generation Through Large Language Models

Published: 12 April 2023 Publication History
  • Get Citation Alerts
  • Abstract

    Large Language Models (LLMs) are powerful tools, capable of leveraging their training on natural language to write stories, generate code, and answer questions. But can they generate functional video game levels? Game levels, with their complex functional constraints and spatial relationships in more than one dimension, are very different from the kinds of data an LLM typically sees during training. Datasets of game levels are also hard to come by, potentially taxing the abilities of these data-hungry models. We investigate the use of LLMs to generate levels for the game Sokoban, finding that LLMs are indeed capable of doing so, and that their performance scales dramatically with dataset size. We also perform preliminary experiments on controlling LLM level generators and discuss promising areas for future work.

    References

    [1]
    Andrea Agostinelli, Timo I Denk, Zalán Borsos, Jesse Engel, Mauro Verzetti, Antoine Caillon, Qingqing Huang, Aren Jansen, Adam Roberts, Marco Tagliasacchi, 2023. MusicLM: Generating Music From Text. arXiv preprint arXiv:2301.11325 (2023).
    [2]
    Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language Models are Few-Shot Learners. https://doi.org/10.48550/ARXIV.2005.14165
    [3]
    Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Misha Laskin, Pieter Abbeel, Aravind Srinivas, and Igor Mordatch. 2021. Decision transformer: Reinforcement learning via sequence modeling. Advances in neural information processing systems 34 (2021), 15084–15097.
    [4]
    Steve Dahlskog, Julian Togelius, and Mark J Nelson. 2014. Linear levels through n-grams. In Proceedings of the 18th International Academic MindTrek Conference: Media Business, Management, Content & Services. 200–206.
    [5]
    Sam Earle, Maria Edwards, Ahmed Khalifa, Philip Bontrager, and Julian Togelius. 2021. Learning controllable content generators. In 2021 IEEE Conference on Games (CoG). IEEE, 1–9.
    [6]
    Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Noam Shazeer, Ian Simon, Curtis Hawthorne, Andrew M Dai, Matthew D Hoffman, Monica Dinculescu, and Douglas Eck. 2018. Music transformer. arXiv preprint arXiv:1809.04281 (2018).
    [7]
    Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. 2020. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361 (2020).
    [8]
    Bilal Kartal, Nick Sohre, and Stephen J Guy. 2016. Data driven Sokoban puzzle generation with Monte Carlo tree search. In Twelfth Artificial Intelligence and Interactive Digital Entertainment Conference.
    [9]
    Isaac Karth and Adam M Smith. 2019. Addressing the fundamental tension of PCGML with discriminative learning. In Proceedings of the 14th International Conference on the Foundations of Digital Games. 1–9.
    [10]
    Ahmed Khalifa, Philip Bontrager, Sam Earle, and Julian Togelius. 2020. Pcgrl: Procedural content generation via reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, Vol. 16. 95–101.
    [11]
    Jiwei Li, Will Monroe, and Dan Jurafsky. 2017. Learning to decode for future success. arXiv preprint arXiv:1701.06549 (2017).
    [12]
    Jialin Liu, Sam Snodgrass, Ahmed Khalifa, Sebastian Risi, Georgios N Yannakakis, and Julian Togelius. 2021. Deep learning for procedural content generation. Neural Computing and Applications 33, 1 (2021), 19–37.
    [13]
    Shuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin Clement, Dawn Drain, Daxin Jiang, Duyu Tang, 2021. Codexglue: A machine learning benchmark dataset for code understanding and generation. arXiv preprint arXiv:2102.04664 (2021).
    [14]
    Justin Mott, Saujas Nandi, and Luke Zeller. 2019. Controllable and coherent level generation: A two-pronged approach. In Experimental AI in games workshop.
    [15]
    Yoshio Murase, Hitoshi Matsubara, and Yuzuru Hiraga. 1996. Automatic making of sokoban problems. In PRICAI’96: Topics in Artificial Intelligence: 4th Pacific Rim International Conference on Artificial Intelligence Cairns, Australia, August 26–30, 1996 Proceedings 4. Springer, 592–600.
    [16]
    Kyungjin Park, Bradford W Mott, Wookhee Min, Kristy Elizabeth Boyer, Eric N Wiebe, and James C Lester. 2019. Generating educational game levels with multistep deep convolutional generative adversarial networks. In 2019 IEEE Conference on Games (CoG). IEEE, 1–8.
    [17]
    Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, 2019. Language models are unsupervised multitask learners. OpenAI blog 1, 8 (2019), 9.
    [18]
    Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. 2022. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125 (2022).
    [19]
    Scott Reed, Konrad Zolna, Emilio Parisotto, Sergio Gomez Colmenarejo, Alexander Novikov, Gabriel Barth-Maron, Mai Gimenez, Yury Sulsky, Jackie Kay, Jost Tobias Springenberg, 2022. A generalist agent. arXiv preprint arXiv:2205.06175 (2022).
    [20]
    Anurag Sarkar and Seth Cooper. 2018. Blending Levels from Different Games using LSTMs. In AIIDE Workshops.
    [21]
    Anurag Sarkar and Seth Cooper. 2021. Dungeon and platformer level blending and generation using conditional vaes. In 2021 IEEE Conference on Games (CoG). IEEE, 1–8.
    [22]
    Anurag Sarkar, Zhihan Yang, and Seth Cooper. 2020. Conditional level generation and game blending. arXiv preprint arXiv:2010.07735 (2020).
    [23]
    Jacob Schrum, Jake Gutierrez, Vanessa Volz, Jialin Liu, Simon Lucas, and Sebastian Risi. 2020. Interactive evolution and exploration within latent level-design space of generative adversarial networks. In Proceedings of the 2020 Genetic and Evolutionary Computation Conference. 148–156.
    [24]
    Sam Snodgrass and Anurag Sarkar. 2020. Multi-domain level generation and blending with sketches via example-driven bsp and variational autoencoders. In Proceedings of the 15th international conference on the foundations of digital games. 1–11.
    [25]
    Shyam Sudhakaran, Miguel González-Duque, Claire Glanois, Matthias Freiberger, Elias Najarro, and Sebastian Risi. 2023. MarioGPT: Open-Ended Text2Level Generation through Large Language Models. arXiv preprint arXiv:2302.05981 (2023).
    [26]
    Muhammad Suleman, Farrukh Hasan Syed, Tahir Q Syed, Saqib Arfeen, Sadaf I Behlim, and Behroz Mirza. 2017. Generation of sokoban stages using recurrent neural networks. International Journal of Advanced Computer Science and Applications 8, 3 (2017).
    [27]
    Adam Summerville, Matthew Guzdial, Michael Mateas, and Mark O Riedl. 2016. Learning player tailored content from observation: Platformer level generation from video traces using lstms. In Twelfth artificial intelligence and interactive digital entertainment conference.
    [28]
    Adam Summerville and Michael Mateas. 2016. Super Mario as a String: Platformer Level Generation Via LSTMs. https://doi.org/10.48550/ARXIV.1603.00930
    [29]
    Adam Summerville, Sam Snodgrass, Matthew Guzdial, Christoffer Holmgård, Amy K Hoover, Aaron Isaksen, Andy Nealen, and Julian Togelius. 2018. Procedural content generation via machine learning (PCGML). IEEE Transactions on Games 10, 3 (2018), 257–270.
    [30]
    Joshua Taylor and Ian Parberry. 2011. Procedural generation of sokoban levels. In Proceedings of the International North American Conference on Intelligent Games and Simulation. 5–12.
    [31]
    Ruben Rodriguez Torrado, Ahmed Khalifa, Michael Cerny Green, Niels Justesen, Sebastian Risi, and Julian Togelius. 2020. Bootstrapping conditional gans for video game level generation. In 2020 IEEE Conference on Games (CoG). IEEE, 41–48.
    [32]
    Théophane Weber, Sébastien Racanière, David P. Reichert, Lars Buesing, Arthur Guez, Danilo Jimenez Rezende, Adria Puigdomènech Badia, Oriol Vinyals, Nicolas Heess, Yujia Li, Razvan Pascanu, Peter Battaglia, Demis Hassabis, David Silver, and Daan Wierstra. 2017. Imagination-Augmented Agents for Deep Reinforcement Learning. https://doi.org/10.48550/ARXIV.1707.06203
    [33]
    Yahia Zakaria, Magda Fayek, and Mayada Hadhoud. 2022. Procedural Level Generation for Sokoban via Deep Learning: An Experimental Study. IEEE Transactions on Games (2022), 1–1. https://doi.org/10.1109/TG.2022.3175795
    [34]
    Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021. Calibrate before use: Improving few-shot performance of language models. In International Conference on Machine Learning. PMLR, 12697–12706.

    Cited By

    View all
    • (2024)Language-Driven Play: Large Language Models as Game-Playing Agents in Slay the SpireProceedings of the 19th International Conference on the Foundations of Digital Games10.1145/3649921.3650013(1-10)Online publication date: 21-May-2024
    • (2024)The Ink Splotch Effect: A Case Study on ChatGPT as a Co-Creative Game DesignerProceedings of the 19th International Conference on the Foundations of Digital Games10.1145/3649921.3650010(1-15)Online publication date: 21-May-2024
    • (2024)DreamCraft: Text-Guided Generation of Functional 3D Environments in MinecraftProceedings of the 19th International Conference on the Foundations of Digital Games10.1145/3649921.3649943(1-15)Online publication date: 21-May-2024
    • Show More Cited By

    Index Terms

    1. Level Generation Through Large Language Models

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Other conferences
      FDG '23: Proceedings of the 18th International Conference on the Foundations of Digital Games
      April 2023
      621 pages
      ISBN:9781450398558
      DOI:10.1145/3582437
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 12 April 2023

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. language models
      2. procedural content generation
      3. sokoban
      4. transformers

      Qualifiers

      • Research-article
      • Research
      • Refereed limited

      Conference

      FDG 2023
      FDG 2023: Foundations of Digital Games 2023
      April 12 - 14, 2023
      Lisbon, Portugal

      Acceptance Rates

      Overall Acceptance Rate 152 of 415 submissions, 37%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)491
      • Downloads (Last 6 weeks)57

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)Language-Driven Play: Large Language Models as Game-Playing Agents in Slay the SpireProceedings of the 19th International Conference on the Foundations of Digital Games10.1145/3649921.3650013(1-10)Online publication date: 21-May-2024
      • (2024)The Ink Splotch Effect: A Case Study on ChatGPT as a Co-Creative Game DesignerProceedings of the 19th International Conference on the Foundations of Digital Games10.1145/3649921.3650010(1-15)Online publication date: 21-May-2024
      • (2024)DreamCraft: Text-Guided Generation of Functional 3D Environments in MinecraftProceedings of the 19th International Conference on the Foundations of Digital Games10.1145/3649921.3649943(1-15)Online publication date: 21-May-2024
      • (2024)Not All the Same: Understanding and Informing Similarity Estimation in Tile-Based Video GamesProceedings of the CHI Conference on Human Factors in Computing Systems10.1145/3613904.3642077(1-23)Online publication date: 11-May-2024
      • (2024)Leveraging the Potential of Large Language Models in Education Through Playful and Game-Based LearningEducational Psychology Review10.1007/s10648-024-09868-z36:1Online publication date: 27-Feb-2024
      • (2024)Player-Oriented Procedural Generation: Producing Desired Game Content by Natural LanguageHCI in Games10.1007/978-3-031-60692-2_18(260-274)Online publication date: 29-Jun-2024
      • (2023)MarioGPTProceedings of the 37th International Conference on Neural Information Processing Systems10.5555/3666122.3668483(54213-54227)Online publication date: 10-Dec-2023
      • (2023)Prompt-Guided Level GenerationProceedings of the Companion Conference on Genetic and Evolutionary Computation10.1145/3583133.3590656(179-182)Online publication date: 15-Jul-2023
      • (2023)Lottery and Sprint: Generate a Board Game with Design Sprint Method on AutoGPTCompanion Proceedings of the Annual Symposium on Computer-Human Interaction in Play10.1145/3573382.3623706(259-265)Online publication date: 6-Oct-2023
      • (2023)ChatGPT4PCG Competition: Character-like Level Generation for Science Birds2023 IEEE Conference on Games (CoG)10.1109/CoG57401.2023.10333206(1-8)Online publication date: 21-Aug-2023
      • Show More Cited By

      View Options

      Get Access

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format.

      HTML Format

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media