Lode Encoder: AI-Constrained Co-Creativity
Total Page:16
File Type:pdf, Size:1020Kb
Lode Encoder: AI-constrained co-creativity Debosmita Bhaumik Ahmed Khalifa Julian Togelius Game Innovation Lab Game Innovation Lab Game Innovation Lab New York University New York University New York University Brooklyn, USA Brooklyn, USA Brooklyn, USA [email protected] [email protected] [email protected] Abstract—We present Lode Encoder, a gamified mixed- But what would happen if we allowed the AI to assist initiative level creation system for the classic platform-puzzle (or “assist”) the human creator by setting constraints, or game Lode Runner. The system is built around several autoen- making suggestions that are orthogonal to the direction of the coders which are trained on sets of Lode Runner levels. When fed with the user’s design, each autoencoder produces a version user? This paper explores this question by describing Lode 1 of that design which is closer in style to the levels that it was Encoder , a system designed to help but also constrain the trained on. The Lode Encoder interface allows the user to build designer. The target domain for the system is levels for the and edit levels through “painting” from the suggestions provided classic platformer Lode Runner, a game which emphasizes by the autoencoders. Crucially, in order to encourage designers real-time puzzle-like gameplay on medium-sized 2D levels. to explore new possibilities, the system does not include more traditional editing tools. We report on the system design and Lode Encoder allows you to create/edit these levels, but not training procedure, as well as on the evolution of the system freely; you must compose your levels based on parts of itself and user tests. suggestions generated by neural networks. More specifically, Index Terms—Machine Learning, Variational Autoencoders, these neural networks are autoencoders (thus the name of the Co-Creation, Mixed Initiative, Level Design system) trained on a corpus of existing Lode Runner levels. I. INTRODUCTION The autoencoders take the level, the user is currently editing, and try to make it more like various levels they have been It has been said that constraints are good for creativity [1]. trained on. As the user composes their level, they can ask Some of the greatest art in the world came about through ad- for more suggestions from the networks, but only a limited hering to constraints, either self-imposed or imposed by others. number of times, to discourage asking for suggestions until Beginners and professional artists alike often find themselves they just know what they want. becoming more productive (e.g. escaping writers’ block) or gaining new perspectives and methods through carrying out This paper first describes the game itself, and related at- formal exercises. One reason that constraints can facilitate the tempts to learn level generators for it and similar games. It then creative process may be that they can steer creators away from describes the autoencoders, the dataset they were trained on, familiar solutions and workflows. and data augmentation procedures. We also comment on the AI-assisted tools for co-creativity typically seek to assist somewhat complicated genesis of the system. After describing a human designer through providing suggestions and feed- the Lode Encoder system, we report on the results of an open- back [2]–[5]. The basic ideas is to use various AI methods ended user study based on recruiting users on Twitter. to outsource part of our cognitive labor, such as playtesting a level, fixing color balance, or suggesting where to place a II. LODE RUNNER character. An implicit assumption is that the tool is attempting Lode Runner is a 2D platformer-puzzle game that was to support the human creator in making the artifact the human first published by Broderbund in 1983 on multiple systems wants to create. Michelangelo famously said “The sculpture (Apple II, Atari 8-bit, Commodore 64, VIC-20, and IBM PC). is already complete within the marble block, before I start my The goal of the game is to collect all the gold nuggets in work” and that he just had to “chisel away the superfluous the level while avoiding the enemies that try to catch the material”. The guiding philosophy behind many of these AI- player character. The player can traverse levels by walking assisted co-creation tools seem to be to help discover the on platforms, climbing up ladders, moving using ropes, and sculpture that is already in the artist’s mind, and suggest falling from edges and ropes but, unlike most other platform helpful parts to chisel away. Some of these tools explicitly try games, cannot jump. Additionally, the player can dig hole to model the style of the user or the end result they wanted either to their left or right to make path or to trap enemies. to create. These holes are temporary, over time tiles will regenerate 978-1-6654-3886-5/21/$31.00 ©2021 IEEE 1http://www.akhalifa.com/lodeencoder/ for new ones. For example, Sentient Sketchbook [5] is a mixed-initiative tool that supports creating 2D strategy maps for StarCraft. The tool provides the user with multiple suggestions that can improve different factors in the current level such as balance, safe area, etc. Alvarez et al. [15] followed the same philosophy and provided a similar tool to generate dungeons for an dungeon crawler game. • a friend: modify the content directly without asking for the user permission. For example: Tanagra [3] is 2D mixed-initative tool that creates 2D platformer levels. The Fig. 1: A classic Lode Runner level from Commadore 64 user can add some constraints in these levels by fixing release certain areas and the system generate the whole level while respecting the user constraints. Similarly, Guzdial et al. [4] developed a game design tool where the user to fill the holes. Figure 1 show an example level from the can build Super Mario Bros levels with the help of a Commodore 64 release. trained AI agent. The user and the AI agent take turns in Due to Lode Runner’s success [6], the game was creating the level and the agent adapts to the user style ported/remaked to a lot of consoles including newer ones by updating its models using active learning methods. such as Nintendo Switch2. Although of that wide spread, the • a creative force: the agent creates the whole content and game didn’t get much attention in the AI in Games research the user can only direct the agent using some auxiliary community compared to other platformer games such as Super inputs. For example, Picbreeder [16] and Artbreeder [17] Mario Bros [7]. Perhaps because of the puzzle-heavy nature of evolve pictures with the help of the user by allowing the Lode Runner, and there not being a game-playing competition user to be the critic. The system allow the user to select or benchmark for the game, it has been seen as less attractive levels that they like then the system take these levels and to work on. blend them together to allow for new images inspired The few papers that target Lode Runner focus on machine by the user selection. Similary, Schrum et al. [18] uses learning-based level generation for the game. Snodgrass and similar evolution technique to generate levels for Super Ontanon´ [8] applied Markov model to generate levels for Lode Mario Bros (Nintendo, 1985) and The Legend of Zelda Runner, Super Mario Bros and Kid Icarus. Thakkar et al. [9] (Nintendo, 1986). The main difference is that they evolve used vanilla autoencoder to learn latent space of Lode Runner the latent variables of a trained Generative Adversarial levels and then used latent space evolution [10] to generate Network (GAN). Schubert et al. [19] provided a UI that new Lode Runner levels. Snodgrass and Sarkar [11] trained a allow the user to generate Super Mario Bros (Nintendo, Conditional Variational Autoencoder on levels of 7 different 1985) levels using their TOAD-GAN. TOAD-GAN is a games (including Lode Runner) and used it with example- new proposed GAN that can generate new levels from a driven binary space partitioning algorithm to generate/blend single data point. The tool provided with the system gives new levels across these games. Steckel et al. [12] combined the the user minimal control such as which trained GAN to efficiency of GANs with MAP-Elites to generate new levels use, the similarity to the training data set, etc. for Lode Runner. Lode Encoder, the subject of this paper, doesn’t fit easily in III. MIXED-INITIATIVE GAME DESIGN TOOLS any of these categories. It blurs the line between the agent in Lode Encoder is an AI-constrained mixed-initiative level a supporting role as the user still have full creative control on design tool [2], [13] that helps user to build Lode Runner what to place and where to place, and the agent as a creative levels. The important feature of this tool is the user is force as the agent constraints all these values and the user just constrained by the AI. The system does not give direct control control the generated suggestion using an auxiliary input (the to the user for building levels, instead it provides suggestions current level). generated by the trained Autoencoders to help the user. IV. AUTOENCODER AND TRAINING Sarkar and Cooper [14] investigated the different ways to use Machine Learning to enable the users to generate, modify, Autoencoders [20], [21] are unsupervised neural networks and/or blend levels from a single or multiple games. Based on that learn to compress data in lower dimension. Autoencoders their work and a number of other AI-assisted mixed-initiative are made of two parts, an encoder which compresses the input tools in the literature.