Procedural Dungeon Generation: A Survey

Procedural content generation (PCG) is a method of content creation entirely or partially done by comput­ ers. PCG is popularly employed in game development to produce game content, such as maps and levels. Represen­ tative examples of games using PCG are Rogue (1998), which introduced the rogue­like genre, and No Man’s Sky (2016), which generated whole worlds with fauna and flora. PCG may generate final contents, ready to be added to a game, or intermediate contents, which might be polished by human designers or work as an input level sketch to be interpreted by a level translator. In this paper, we survey the current state of procedural dungeon generation (PDG) research, a PCG subarea, applied in the context of games. For each work we selected in this survey, we examined and compared how they created game features, what type of level structure and representation they propose, which content generation strategy they applied, and, finally, we classify them according to the taxonomy of procedural content generation proposed by Togelius et al. (2016). The most relevant findings of our survey are: (1) PDG for 3D levels has been little explored; (2) few works supported levels with barriers, a game mechanic which temporarily blocks the player progression, and; (3) mixed­initiative approaches, i.e., software that helps human designers by making suggestions to the levels being created, are little explored.


Introduction
defined Procedural Content Generation (PCG) as computer software capable of creating "game con tent on its own, or together with one or many human players or designers." Over the years, PCG has become a valuable asset for the game development process because it may bring several benefits, such as reducing the high cost of produc tion of game features by reducing the need of human design ers to generate content; helping human designers to increase their creativity and productivity; controlling the game diffi culty or help game balancing, or both, and; increasing the replay value of a game by providing unexpected content, for instance.
Dungeon level generation in games is a great example of how PCG can be very useful, particularly when it sup ports the creation of different dungeons every time the game is replayed. In this paper's context, we are following the definition offered by van der Linden et al. (2014), who de fined dungeons as labyrinthine environments that offer struc tured gameplay progressions through interrelated rewards challenges, and puzzles.
In 2014 van der Linden et al. published a survey on Pro cedural Dungeon Generation (PDG). They compared differ ent approaches to content generation and tried to understand how the control works in the surveyed methods. However, they did not attempt to classify the methods under a unified taxonomy. This shortcoming motivated us to produce a re view exclusively focused on PDG and target at classifying the research under the PCG taxonomy defined by Togelius et al. (2016). We believe this categorization might be useful since it helps us understand the approaches' behavior better and identify shortcomings, strengths, and tendencies (or lack thereof) in the recent research body aimed at PDG.
In this paper, we extend our last survey on PDG -Viana and dos Santos (2019) -to improve the classification of some works and provide an updated review of state of the art by in cluding recent papers in our review. We selected papers from Scopus, ACM Digital Library, and IEEE Xplore. We consid ered works related to the generation of dungeons, mazelike, cavern, and other types of levels similar to the dungeons as defined by van der Linden et al. (2014). Our review analyzed the selected papers under the following categories: (1) the game genre, such as RPG, roguelike, actionadventure, 2D platform, etc.; (2) the game space, i.e., if the generated space is the level layout or just a level sketch; (3) the game dimen sionality (two or threedimensional); (4) the level represen tation, i.e., which structures are used to represent the level; (5) the solution strategies adopted by the PDGs; (6) how well they fit the PCG taxonomy (Togelius et al., 2016), and; (7) the level contents, i.e., if the level is composed by rewards, challenges, etc.
The main contributions of this paper are the findings that resulted from our classification, of which we highlight the following: (1) few works presented solutions for PDG of 3D levels; (2) the generation of levels with barriers (a game me chanic which blocks, temporarily, the player progression), although interesting, has not been much explored, and; (3) surprisingly, few approaches relied on mixedinitiative ap proaches when a human design steers the computer content generation. Other contributions are a revised version of To gelius's PCG taxonomy by reorganizing some of the original categories and improving its descriptions, and the suggestion (a) TDML dungeon. Source: Lavender and Thompson (2017).
(c) SS dungeon. Source: Baghdadi et al. (2015). of potential PDG related research problems to investigate. This paper is structured as follows. Section 2 presents the definitions of dungeon levels in games and defines some game elements, features, and mechanics that we were inter ested in while evaluating the papers. We also briefly intro duce the revised taxonomy of procedural content generation, and, finally, we overview some of the generation strategies we identified during the survey. In Section 3, we overview the current state of PDG under the parameters introduced in Section 2 by presenting the quantitative results of our sur vey. In Section 4, we discuss, based on the survey results, limitations, tendencies, and new possibilities of research to pursuit. Finally, in Section 5, we conclude the paper by pro viding some suggestions for open challenges in the field.

Background
Surveys are important mechanisms to understand an area bet ter and help to map problems, failures, and successes, aiming at the progress of knowledge (Mulrow, 1994; Moher et al., 2009. They are relevant for researchers because they might help them to: (1) understand existing techniques within a common context or framework (e.g., taxonomy); (2) iden tify how to improve existing methods; (3) identify niches of littleexplored methods; and, (4) discover new methods, per haps combining elements or strategies that have been used successfully to date. Therefore, this section presents the definitions of some game features and mechanics that we were interested in and the definition of dungeon levels. We also present the revised PCG taxonomy introduced by Togelius et al. (2016) and an overview of the solution strategies found in our survey.

Game Features
According to van der Linden et al. (2014), dungeons are lab yrinthine environments mostly composed of rewards, chal lenges, and puzzles, distributed over the level to offer highly structured gameplay progressions. Several games of differ ent genres use dungeons in some parts -e.g., Pokémon (Nin tendo, 1996) -or the entire game -e.g., The Binding of Isaac (McMillen and Himsl, 2011).
Game genres are classifications of games based mainly on the gameplay and how players interact with the game, i.e., the game space and the game dimension. The game space is the environment where the gameplay happens through the user interaction, e.g., the game levels of a levelbased game. The game dimension refers to the dimensionality of the game space, which usually are two (2D), twoandhalf (2.5D), or threedimensional (3D). The game space of dun geons usually tries to simulate realworld labyrinthlike en vironments, such as caves, intricate buildings, medieval dun geons, among others. The game's genre, space, and dimen sion are essential features that directly affect the game level representation and the automatic generation method a PCG based game may choose to follow.
In this survey, we have identified works that generate the layout of the level space, the sketch of the level space -i.e., metadata that represents the layout of the level space that can be translated into an actual level space -or both, at different stages of the generative process. A layout of the level space is usually represented by grids or shapes, whereas a sketch of the level space is often represented by grids, graph nodes, or grammar strings.
Next, we introduce some gameplay elements usually present in dungeon levels.
• Room is a structural part of a level that may be con nected to other rooms by doors or corridors. Figure 1a presents an example of a level structured into several rooms. • Item/Skill is a collectible element or learned ability that grants to the player some gameplay benefit, such as a health kit that regenerates some of the player's health or when a player earns some limited capacity to fly over obstacles. • Barrier is a game feature that temporarily blocks the player from reaching certain regions on a level. Over coming a barrier usually requires the player to collect one or multiple items or to learn some special skills that unlock or remove the blockage. • Reward is something the player is encouraged to locate and acquire through some effort. Items, skills, money, tools, for instance, are typical examples of rewards. Re wards may or may not be mandatory goals (originally defined by van der Linden et al. (2014)). • Challenge is an obstacle that hinders the player's pro gression. In the dungeon context, challenges are usually treated as battle challenges or traps (originally defined by van der Linden et al. (2014)). • Puzzle is an intellectual obstacle that requires the player some reasoning to solve it. Puzzles usually involve reor ganizing items in a specific sequence to unblock a bar rier or figuring out how to use game elements in an un conventional way, such as moving pieces of furniture to reach a tunnel initially out of reach. Sometimes, a puz zle is hidden in the game level, and the player has to find it first before attempting to solve it (originally defined by van der Linden et al. (2014)).

PCG Taxonomy
In this section, we present the PCG taxonomy defined by To gelius et al. (2016). We renamed each title of the classifica tions in an attempt to improve their understanding. The tax onomy defines seven axes to classify procedural generation approaches: • Content Requirement defines if the generated content is necessary for the gameplay or if it is optional. For instance, a key may be necessary to open the door to the boss' room. In contrast, the level may have a blocked room that the player can ignore and yet finish the level. • Outcome Randomness defines the way that choices are made during the generation process. An approach is de terministic when it generates the same content with the same set of parameters. Alternatively, it is stochastic when it generates different contents, even with the same set of parameters. Although this classification seems silly at first -since one of the PCG goals is to provide variety -, deterministic approaches may be useful, as discussed later in this paper. • Generation Time defines when the content is gener ated. An approach is offline when it generates the con tent before the gameplay (i.e., when the player is play ing the game), or it is online when it generates the con tent during the gameplay. For instance, the levels on Moonlighter (Digital Sun, 2018) are generated before the gameplay. On the other hand, the levels of any End less Runner are generated during the gameplay. • Generation Control defines how to parameterize the approaches and dimensions of control. The control of an approach may be made by random seeds that allows only one dimension of control. Alternatively, the control may be made by a set of parameters that allows more dimensions of control. For instance, a set of parameters may be composed of width, height, and difficulty. • Generality defines the audience that the content is be ing generated for. An approach is generic when the con tent is generated for several players. Alternatively, it is adaptive when the content is generated for a specific player. For instance, Left4Dead 2 (Valve Corporation, 2009) send zombie hordes of different sizes according to the player's gameplay rhythm. • Generation Method defines how the generation can be performed. An approach is constructive when it generates content in only one pass without validation of the generated content. Alternatively, an approach is generateandtest when it alternates the generation and the consistency or evaluation test or both of the content. Constructive approaches are usually faster than generateandtest techniques. However, they are more susceptible to content inconsistency. Within the generateandtest, a nested classification called search based PCG defines the PCG approaches in which the test function grades the generated content. For instance, in Evolutionary Algorithms (EA), the grading function is the fitness function. Another nested class of generate andtest is the solverbased PCG (Summerville et al., 2018). For instance, we classify as solverbased PCG the approaches built with Answer Set Programming (ASP). Summerville et al. (2018) described a new PCG paradigm based on Machine Learning (ML) where the content is generated directly from ML models. How ever, Reinforcement Learning (RL) cannot be classified as MLbased. The contents generated by this approach are not created by a model but by agents instead. Charity et al. (2020) classify these approaches as RLbased. • Content Authorship defines the degree of human in terference in the generative process. An approach is au tomatic generation when only the computer generates the content. Alternatively, it is mixedinitiative when it allows the designer (or the gamer) to have finer con trol over content (not only by parameters) that is being generated. Usually, mixedinitiative programs are dedi cated to increasing the productivity of game designers.

Solution Strategies
In this section, we present an overview of the solution strate gies from the papers selected for this survey. We begin with the Cellular Automata (CA). CAs were created as a model of biological selfreproduction (Wolfram, 1983). A CAbased algorithm follows a set of rules to define cellstate transitions based on the cells' neighbors in a grid (Adams and Louis, 2017). In PCG, CAs have been adapted to generate game lev els (Johnson et al., 2010); in particular, they work quite well to create cavernlike levels. Generative Grammars (GG) are systems of grammatical rules that generate words (Chomsky, 2006). Based on GGs, other kinds of grammars have been developed, e.g., Graph and Shape Grammars. Graph Grammars define rules for node and edge transformations in order to generate new graphs (Rozenberg, 1997). The graphs generated by these systems can be used to generate several types of game content, e.g., the works of Lavender and Thompson (2017) and van der Linden et al. (2013). On the other hand, Shape Grammars de fine rules that transform geometric two or threedimensional shapes (Halatsch et al., 2008). This kind of GG is suitable for the generation of level layouts. Voronoi Diagram (or Voronoi Tessellation) is a method of dividing space into regions based on a set of points (Voronoi, 1908). This method is applicable in several fields. In PCG, however, it is mostly used for the generation of terrains (Olsen, 2004). Delaunay Triangulation is a technique that triangulates the space based on a set of points (Delaunay et al., 1934). This technique was also used to generate ter rains (De Kok et al., 2007).
Since PCG can be interpreted as Constraint Satisfaction Problems (CSPs), we can use search algorithms to generate content -these are the searchbased PCG approaches. Sim ulated Annealing is a metaheuristic based on annealing in metallurgy. This technique involves heating and controlled cooling of a material (Van Laarhoven and Aarts, 1987). Evo lutionary Computation is a family of algorithms based on theories of evolution. They are widely used for PCG pur poses. The most common is the Genetic Algorithms (GA), a metaheuristic that is based on the neoDarwinian theory of evolution (Gendreau et al., 2010). GAs evolves lists that are usually represented as strings. Similar to the latter approach, there is Genetic Programming (GP) that evolves individuals represented as syntax trees (Gendreau et al., 2010). There is also an approach that evolves two populations of feasible and infeasible individuals, FI2Pop GA (Kimbrough et al., 2005).
Still in evolutionary computation, a new subclass has emerged, the Quality Diversity (QD) algorithms. This new paradigm prioritizes the search for a set of diverse indi viduals first and then maximizes their quality (Pugh et al., 2016). QD approaches are especially interesting for PCG due to the content variety provided by them. No wonder that some researchers started to explore QD algorithms on their PCG solutions, as reviewed by Gravina et al. (2019). Some QD algorithms are: Deluged Novelty Search Local Compe tition (DNLSC); MAPElites, and; Constrained MAPElites (a combination of MAPElites and FI2Pop GA).
PCG approaches also have been developed using solver based solutions. Answer Set Programming (ASP) is a kind of declarative logic programming created to solve search prob lems (Smith et al., 2018). Since, as we said, PCG problems can be mapped as search problems, ASP may be a useful tool for generating content. Some content constraints -e.g., level layout constraints -can also be interpreted as integer linear constraints. Therefore, the generation of these kinds of con tents can be solved by Satisfiability Modulo Theories (SMT) solvers. Whitehead (2020) describes this approach better and its use of STM for PCG purposes.
Regarding the PCG ML paradigm, several approaches models can be used directly to generate game content (Sum merville et al., 2018). However, in this survey, we are in terested only in Generative Adversarial Networks (GAN). GANs are generative models that are trained to produce con tent based on the learned content (Gutierrez and Schrum, 2020). As for RLbased algorithms, we found a work that used Reinforcement Learning (RL) to create agents that are used to generate content (Sutton and Barto, 2018).
It is worth mentioning that some works based on construc tive approaches have exclusive steps that depend only on the content type. These exclusive algorithms are usually based on the random or constrained random placement of game spaces. For instance, the Drunkard's Walk (or Random Walk Simulation) in PCG may work as a digger to create levels.
Finally, all of the described strategies can be combined to take benefit of their advantages. Hybrid approaches act in a way to generate different contents or the same content in dif ferent steps of the generative process. For instance, a hybrid approach can generate level sketches using Graph Grammars and generate level rooms using CA rules using previously generated sketches (Gellel and Sweetser, 2020).

Survey
We carried out this survey based on the guidelines of the Pre ferred Reporting Items for Systematic Reviews and Meta Analyses (PRISMA) model ). Such methodology is widely applied in sev eral research fields for gathering comprehensive literature re views (Harper et al., 2021; Moray et al., 2021; Assadi et al., 2020; Masotta et al., 2020. The PRISMA states the follow ing steps to perform a systematic literature review: (1) lit erature search; (2) selection of eligible papers; and (3) data extraction and summarizing.
We collected data from Scopus 1 , ACM Digital Library 2 , and IEEE Xplore 3 . Table 1 presents search terms divided into three groups we defined to compose the search string: PCG, level, and game. We build the search string by connecting each word from each term group with the boolean operator OR. Then, we combined the exclusive term of PCG and Level group with the operator AND and, then, the shared terms with OR. Fi nally, we combined the resulting string with the Game group with AND. Below, we present the final search string.
(((PCG OR "Procedural Generation" OR "Proce dural Content Generation" OR "Procedural Gener ated Content" OR "Level Generation" OR "Procedu ral Level Generation" OR "Automatic Generation") AND (Dungeon OR Labyrinth OR Maze OR Cave OR Cavern OR Roguelike)) OR ("Procedural Dun geon Generation" OR "Procedural Playable Cave" OR "Procedural Playable Cavern")) AND Game To validate the search string, we verified whether the top 3 most relevant papers of the PDG scenario were returned as a valid result. These target papers are: Togelius et al. (2011) because this paper introduced the PCG taxonomy, and it is widely cited by the PCG papers; van der Linden et al. (2014) because it was the first survey on PDG; and, Johnson et al. (2010) because it is one of the most cited papers on the PDG scenario. Despite this, we are aware that the use of a search string has its own limitations. It is not possible to ensure that all the possible papers related to the subject we are interested in will be captured with a search string.
We selected conference and journal papers published in the last ten years (2010 to October 2020) in which their title and abstract specifically mention the generation of dungeon, cave, or mazelike levels. We also selected works that gener ated levels similar to the dungeons as defined by van der Lin den et al. (2014) and used the GVGAI framework 4 to gen erate dungeon systems of Zeldalike games. Although one may argue that mazes are a type of labyrinths, we discarded any work that strictly generated mazes because they have a slightly different type of level structure. Mazes are puzzles that mainly create a labyrinthine path connection between a starting point and an end point, while dungeons are more complex environments that present rooms, doors, floors, en emies, among others (van der Linden et al., 2014). From now on, we call all of them just dungeon levels.
The search and the selection process resulted in a total 41 papers, 3 of which described and compared more than one dungeon generation approach. Therefore, this pool yielded a total of 52 different approaches for dungeon generation. The data we collected from these 41 papers were: the game genre; the game space, type of level that is generated (i.e., either the entire level layout or just a sketch); the level dimensionality; the level representation; the type of solution strategy to gener ate dungeons; the categories of the PCG taxonomy; and, the game features. The description for each of these data items was provided in Section 2. To classify the approaches' game genre, dimensionality, representation, and game features of the levels generated by the works as follows: (1) based on what the authors themselves wrote (selfclassification); (2) based on the methodology used by the works; and, (3) based on the images provided in the works. The Tables 2, 3 and 4 summarizes the collected data. In the following subsections, we present these data in detail.

Solution Strategy Classification
Game genre From the 41 papers, 18 of them described so lutions target at specific game genre, whereas the rest were game genreagnostic. Only six of them specified the game the solutions were developed for (van der Linden et al., 2013; Baghdadi et al., 2015; Lavender and Thompson, 2017; Kar avolos et al., 2016; Gutierrez and Schrum, 2020; Charity et al., 2020, and only the works from Pereira et al. (2018), Sheffield and Shah (2018), Goandy et al. (2020) and Gutier rez and Schrum (2020) developed game prototypes to collect player's feedback about the level quality. Level space A total of 25 papers generated directly the level layout. Valtchanov and Brown (2012), van der Lin den et al. (2013) (2017) and Baghdadi et al. (2015), respectively. Just Antoniuk et al. (2018) proposed the use of Shape Grammars, which is capable of generating 3D dungeon levels. SantamariaIbirika et al. (2014) and Baron (2017) described solutions that worked both 2D and 3D lev els. SantamariaIbirika's work is based on Voronoi Diagram and Delaunay Triangulation, enabling a less artificial level generation. Figure 2b presents an example of a level gener ated with their approach. The Baron's work, however, does not generate true 3D levels. Instead, it generates a 2D text based sketch which undergoes an extrusion process to be come a 3D level (see Figure 3). Finally, the works from Valtchanov and Brown (2012), van der Linden et al. (2013), Karavolos et al. (2016), Pereira et al. (2018), and Sheffield and Shah (2018) generated level sketches and translated them into levels. van der Linden et al. (2013) and Karavolos et al. (2016) translated the sketches into 3D levels. Note, how ever, that these two works, in fact, did not generate true 3D structures. Rather, they laid out 2D generic structures (called sketches) and then connected 3D chunks (rooms) previously created by a human designer based on these sketches. Both works generated levels for Dwarf Quest (Wild Card Games, 2013). Whitehead (2020) represented their levels directly as shapes. Pereira et al. (2018) and Valtchanov and Brown (2012) de scribed their levels as trees. Some works presented combi nations of different representations. Ashlock and McGuin ness (2014), Lavender and Thompson (2017), Karavolos et al. (2016), Alvarez et al. (2018), and Gellel and Sweetser (2020) use grids and graphs to represent the level. How ever, Ashlock et al. (2011a) generate the level as a grid and then extract the room adjacency graph to populate the level. The other authors generated missions as sketches to the lev els. Dormans and Bakkes (2011) and Nepožitek and Gemrot (2018) represented level sketches as graphs and then gener ate the level shapes based on them. Smith and Bryson (2014) represented their levels as Answer Sets, working as sketches, and grids (the result of the solved Answer Sets). Gutierrez and Schrum (2020) generated both levels and their rooms, the level sketches are represented by graphs and converted into grids, and the rooms are directly represented as grids. Algorithm strategy A group of 16 papers described evolutionarybased approaches, as follows: 5 papers relied on GA (Ashlock et al., 2011a,b; (Karavolos et al., 2016).
Another group of 15 presented distinct solutions, as fol lows. Johnson et al. (2010) suggested CAbased algorithms capable of generating infinite cavelike dungeon levels in realtime. van der Linden et al. (2013) created a Graph Gram mar approach (Gameplay Grammar) that generates a mis sions' graph, which aims to build the level. Forsyth (2016) developed an algorithm that generates level sketches by sim ply placing rooms randomly. Hell et al. (2017) proposed an algorithm that generates level sketches from the expansion of a graph, representing the level sketch. Hilliard et al. (2017) introduced two algorithms: Span* that generates a set of ran dom points which becomes rooms and connect them with Prim's algorithm (Prim, 1957); and Growth that generates a level by a set of points which becomes rooms, and new random rooms are connected with them. Baron (2017) Baron, Sampaio et al. (2017) presented a solution to level generation derived from Random Placement of rooms and corridors. Smith et al. (2018) implemented an ASP program capable of generating sketches as graphs for dungeon levels. Nepožitek and Gem rot (2018) applied Simulated Annealing search to find the best fit of room shapes for dungeon levels from graphs as sketches. Sheffield and Shah (2018) created RL agents to per form digging and distribute game features in a grid. Like the latter, Goandy et al. (2020) used a digger to generate dungeon levels, but they used the Drunkard's Walk algorithm instead. Antoniuk et al. (2018) introduced a Lsystem (Shape Gram mar) solution for the creation of 3D dungeon levels. Green et al. (2019) combined three algorithms for level creation (creators) and three for object placement (furnishers). Each set of algorithms is constraintbased, CAbased, and agent based. Finally, Whitehead (2020) created SMT formulas and applied SMT solvers to distribute rooms of different sizes.
The last group of 11 papers employed hybrid approaches to generate dungeon levels. Togelius et al. (2012) presented a combination of ASP programs that generate the dungeon levels, with an EA that evolves values that define the level (e.g., level height and width). While the ASP is responsi ble for ensuring level viability (wellformedness, playabil ity, and winnability), the EA evolves level values to optimize the challenge and skill differentiation. Dormans and Bakkes (2011) and Lavender and Thompson (2017) Kreitzer et al. (2019) used GA to evolve CA rules which generate the dungeon levels. More specifi cally, CA rules generate the mazelike dungeon levels, while the GA evolved the CA rules to satisfy some level's con straints. Gutierrez and Schrum (2020) generated missions us ing Graph Grammars and use them as sketches to generate the dungeon levels. Moreover, they also applied GANs to generate the layout of each room of the levels. Finally, Gellel and Sweetser (2020) also generated missions by using Graph Grammars. To generate the levels, however, they introduced a new CAinspired solution and applied a heuristic to maxi mize the quality of the levels.
The division of responsibility in generative processes is a common feature in constructive approaches. However, due to the high number of contents or the level representation, one searchbased algorithm relies on this feature to facilitate its development and improve its results. Liapis (2017) intro duced two similar searchbased algorithms: the first one gen erates the dungeon sketch, and the second generates the rest of the dungeon (the dungeon rooms).

Taxonomy Classification
In this section, we analyze the papers in terms of Togelius' PCG taxonomy. We decided not to consider the Content Re quirement category in this survey because this is a difficult feature to identify just by reading the paper and not actually playing the game. Outcome Randomness Only three papers were clearly deterministic (Sampaio et al., 2017; Smith et al., 2018; Goandy et al., 2020. The remaining papers had stochastic approaches. This result is somehow expected since it is more interesting to generate different contents -dungeon levels in this case -to increase the replayability of the game. However, deterministic approaches may present useful applications in the game context. For instance, mixedinitiatives software could implement undo functionality without saving all the    previous suggestions. These suggestions could be recreated by using the same set of parameters. Generation Time All papers presented offline generation. This result was also found by van der Linden et al. (2014). The only work that might be considered online was Johnson et al. (2010). They applied CA to generate cavernous dun geons in realtime. However, there is no information about the level being generated during gameplay in their paper. Clearly, we need to begin to explore processing efficient on line solutions since it has the advantage of saving memory as the content is generated while the player is progressing. Generation Control Only two papers presented solutions with random seeds as the only dimension of the approach's generation control (Smith et al., 2018; Goandy et al., 2020. The solution of Sampaio et al. (2017) has only two parame ters: the random seed, and the level difficulty value. The so lutions of the remaining papers were controlled by a set of pa rameters with more than two parameters. The overwhelming choice for sets of parameters makes sense since they enable the human designer to have finer control over the results. Generality All but two presented solutions for generic level generation. Only the papers from Alvarez et al. (2018) and Alvarez et al. (2019) were adaptive in the sense that a human designer is responsible for selecting levels to be "evolved" by the automatic process, edit and evolve to main tain the designer's level aesthetic. Both works are from the same research group. To maintain the human designer aes thetics, their software -the Evolutionary Dungeon Designer (EDD), see Figure 5 -present the option of "freeze" cells of the grid, so they do not be able to evolve. Ultimately, the human designer decides when the generation process stops. Nonetheless, the existence of only two papers on the adaptive approach does not mean that the generic approach generates perfect solutions. There are still some game features that in fluence the level structure and, therefore, might be generated in conjunction with the dungeon level. Generation Method We have identified 29 generateand test solutions. Ensuring dungeon levels' consistency is a chal lenging task for PCG since it is necessary to perform consis tency tests to ensure the generated level is playable. That is why this approach is often much more computationally ex pensive than constructive approaches. Within these 29 pa pers, 17 papers are solely searchbased generative processes -e.g., Pereira et al. (2018).

Content Authorship
The automatic generation dominates over mixedinitiative. Only four papers presented solutions for mixedinitiative PCG software (Baldwin et al., 2017a,b; Alvarez et al., 2018. These four papers are all from the same research group. All of them present the same tool, the EDD. Their tool enables the human designer to (1) edit a level that was automatically generated, (2) observe this level evolve into a set of possible levels, (3) choose the best one, and, if necessary, (4) repeat the evolutionary cycle until he or she is satisfied. Figure 5 presents the EDD tool developed by their research group.

Game Features Classification
In this section, we list the quantitative results that account for the presence of the game elements described earlier in Section 2.1.
Recall that a dungeon is ideally composed of rewards, challenges, and puzzles. However, the results show us that most works, 31 out of 41, do not present solutions that si multaneously generate levels with all these game features 5 .
When we examined which works were capable of creating dungeons with puzzles, rewards, and challenges, we identi fied these possibilities: • Solutions that only generate puzzles: a total of 9 pa pers presented solutions for generating puzzles ( (2018) and Sheffield and Shah (2018) presented levels with all three elements, if we consider barriers as puz zles. Although Charity et al. (2020) also generated lev els with rewards, challenges, and barrier puzzles, they actually generated rooms, not entire levels as such. It is worth mentioning that only a few of these works pro vided finer control over the number of rewards or chal lenges.
Another relevant aspect we were interested in was to un   derstand how solutions control the level of difficult of their created levels. We found out that 10 works presented solu tions that consider the level difficulty as input information while generating a level (Dormans and Bakkes, 2011; van der Linden et al., 2013; Baghdadi et al., 2015; Forsyth, 2016; Hell et al., 2017; Baldwin et al., 2017b,a; Sampaio et al., 2017; Alvarez et al., 2018. All these works support control over the level's difficulty by setting a difficulty value. Providing control over the level of difficulty of dungeons automatically generated by an algorithm may be considered a valuable asset for game designers. They would naturally appreciate having some influence over the outcome of these algorithms since the level difficulty is a feature that often di rectly impacts the player's overall experience while playing a game. The next aspect we wanted to consider is the insertion of barriers in a level as a gameplay mechanics. We learned that just 9 papers presented a level generator that supports barrier mechanics. There were two types of barriers: (1) a barrier that needs only one key to be unlocked, and; (2) several bar riers that are opened by a single key. The first kind of barrier was presented as a door (a barrier) that needs only one key to be unlocked in Dormans and Bakkes (2011) These works present solutions that generate dungeon levels with barriers that are opened with corresponding keys, as de picted in Figure 6 by the color association between doors and keys (Pereira et al., 2018).
All other papers did not focus on the barrier mechanics per si. Instead, they treated it together with other kinds of con tent, such as missions. Thus, some interesting characteristics of this mechanic could not be properly explored. In contrast, Smith et al. (2018) generated both the first and the second kinds of barriers (Figure 8a). For the second one, the player needs to take a bow (a weapon that works as a key) to defeat enemies (they work as barriers). Since Charity et al. (2020) generated only rooms and not entire levels, we could not clas sify the generated doors and keys of their work as barriers.
Barriers are clearly a promising research topic because they play an important role in engaging the player: overcom ing barriers requires skill (to acquire the keys) and planning (to figure out the sequence of keys that open up the barriers).
One more aspect we were concerned with was the 2D dun geon structures. Here is what we discovered: • A total of 27 works presented solutions for the genera tion of topdown cavernlike dungeons. This result means that there is still much to explore in level generation research of both TDML and SS dungeons.
The next aspect we analyze is how the papers addressed the presentation of level spaces. Some approaches need to distinguish the spaces of the levels they are generating so that they can determine which game element will appear in these spaces. A total of 13 papers fall in this category. Most of them use this feature to control what kind of content (e.g., en emies, rewards, among others) will appear in the respective area/room. However, the works presented different ways to do this. Let us provide more details on that.
• Smith et al. (2018) introduced a solution that only differ entiates the nodes in the level sketch, e.g., the entrance node, the boss' node, enemy node, key node, among oth ers (Figure 7). • Smith and Bryson (2014) presented rooms and corridors with different shapes and connection directions (Fig  ure 8a). Rooms may or may not contain rewards; how ever, this distinction is not presented visually in their work. • Baghdadi et al. (2015) distinguish the chambers of their levels by defining: the entrance, the exit, where the bomb is, and where the princess is ( Figure 8b). • SantamariaIbirika et al. (2014), after creating the cham bers, distinguish the rooms to perform later the game elements' placement, e.g., rewards and enemies (Fig  ure 8c). • Ashlock (2015) and Kreitzer et al. (2019) (Figure 8d) generate levels with different types of terrains, e.g., a level with ground, water, and lava.   (2015).     (Fig  ure 8f). The rooms in their work can become an am bush area (only enemies in a deadend), a guard cham ber (only enemies), a treasure chamber (only treasure), or a heavily guarded treasure chamber (a room full of enemies and treasure). • Valtchanov and Brown (2012) is designed to identify the entrance and event rooms, in single rooms or in regions (Figure 8g). • Ashlock and McGuinness (2014) assign areas to the level's components such as the entrance, armory, and location of enemies, e.g., goblins and magical beings (Figure 8h). • Gellel and Sweetser (2020) distinguish their levels by what they call subsections. Since they generate levels with barriers, the keys must be placed to be collected by the player and reach all the level's rooms. Therefore, the definition of subsections is a feature that assists their approach to ensure the reachability of keys. • Finally, Liapis (2017) creates eight different types of rooms (which he called segments): wall segment (blocked for the player); empty segment (just an empty room, with no monsters or treasures); simple segment (a room with few monsters and treasures); exit segment (a room with the level's exit); sparse challenge segment (contains more monsters than rewards); sparse reward segment (contains more rewards than monsters); high challenge segment (ops, only monsters here!); and high reward segment (bingo! just rewards). Liapis also dis tinguishes rooms based on the type of connection they support (see Figure 8j).

Discussions
The data collected in this survey showed us that the search based approaches are popular in PDG research (Figure 9). In particular, evolutionary algorithms are the most popular approaches in dungeon generators, corresponding to 16 out of 17 occurrences of the searchbased approaches. This result is somewhat expected since searchbased approaches usually try to ensure the feasibility of levels and optimize the quality of them by, for instance, ensuring degrees of level linearity (Pereira et al., 2018). Within EA, Quality Diversity approaches are slowly be ginning to be explored in this area. This class of algorithms focuses on diversity, increasing the variety of the generated levels (Gravina et al., 2019). Constrained MAPElites is par ticularly interesting because they combine the QD approach of MAPElites with the evolutionary structure of FI2Pop, an other strategy to increase diversity. Although MLbased ap proaches are also promising since there are very successful uses of learning models in other areas, we found out just a sin gle paper that implements such a solution for PCG (Gutierrez and Schrum, 2020). Since one of the PCG goals is to increase replayability, most works should explore these techniques to ensure a good variety of dungeons.
Just a handful of solutions presented solverbased meth ods in some stages of their generative process. This result might be explained by the fact that these solutions are often developed with logicbased programming languages, which are not as popular as, say, imperative or objectoriented lan guages. Nevertheless, exclusive constructive approaches are still being explored. Clearly, this has to continue since these approaches are faster than the others since they do not per form tests to evaluate the content they generate. As Whitehead (2020) described, the dungeon generative process is composed of: (1) mission generation; (2) layout generation, and; (3) interior decoration and layout of rooms. The missions work as sketches to generate the level layout and, sometimes, to determine the content that will be present in the interior of rooms. However, as we observed in our sur vey, these steps may appear combined in some approaches. For instance, Charity et al. (2020) generated the room layout and placed challenges and rewards.
An aspect interesting explored by the solution introduced by Liapis (2017) was the division of responsibility in its gen erative process. He combined two searchbased approaches to perform the generation in different stages of the generative process in his solution. He could easily add another stage that could perform the generation of another kind of content. For instance, he could add the generation of barriers. However, since Liapis' approach represents its levels as grids, it could be hard to ensure his levels' feasibility. We believe that a so lution similar to proposed by Gellel and Sweetser (2020)called subsections -could help with this problem.
In terms of the game genres, most works disassociate the level generation from the game genre ( Figure 10). We ob served that the works that defined the game genre a priori narrowed down the contents and constraints involved in the level generation process. For instance, Platform Roguelike games, e.g., Dead Cells (Motion Twin, 2018), are structurally different from TopDown Roguelike games, e.g., Moon ligher (Digital Sun, 2018). The former needs ladders, which are intrinsically related to the level structure, to allow the player to access other areas, while the latter does not require such a feature. Moreover, these games also present different strategies for the placement of challenges, rewards, and puz zles in games. Therefore, different strategies could prioritize the placement of these features.
On the other hand, general approaches are interesting since they can deal with the content generation of multiple game genres. However, there are also drawbacks in using general approaches such as performance loss, and too general con   straints may be hard to develop in a single approach. For instance, Pereira et al. (2018) evolved levels represented as trees to ensure the barrier mechanics' feasibility. Ideally, the levels should be represented as graphs to allow the pres ence of cycles, but this can lead to problems of level feasi bility. This problem remains unsolved because Smith et al. (2018) generated acyclic dungeon levels although they ap plied graph representation.
With respect to the level representation of dungeons, the most common is the grid (Figure 11). Most of the works di rectly generated the layout of 2D levels ( Figure 12). Other papers first generate sketches before creating the level lay out. All works produced some kind of planar sketches, i.e., 2D sketches. Here we observe that the dungeon sketch gener ation may be extended by producing 3D structures to create dungeons of similar levels as "The Legend of Zelda" dun geons (Nintendo, 1986) or Pokémon dungeons (Nintendo, 1996) -at least the games from GBA. These dungeons con tain multiple floors, which increases the labyrinthine degree. The works proposed by SantamariaIbirika et al. (2014) and Antoniuk et al. (2018) are the only two that yield truly 3D dungeons. Both works represented their dungeons as shapes.
Only SantamariaIbirika et al. (2014) generated levels with enemies and treasures. However, both works do not support other game features, such as puzzles or barriers. Furthermore, dimensionality is not always a matter of visual representa tion only. There are mechanics that are intrinsically related to how the player interacts with the level that was not ex plored by these works. For instance, vertical paths, 3D verti cal exploration (jumping between floors or climbing walls), 3D puzzles, barriers, among others.
As for the dungeon features, as defined by van der Linden et al. (2014), only six works generated rewards, challenges, and puzzles (Dormans and Bakkes, 2011; van der Linden et al., 2013; Lavender and Thompson, 2017; Karavolos et al., 2016; Smith et al., 2018; Sheffield and Shah, 2018. The most uncommon feature of all works was the puzzles. Some au thors probably decided to focus on other dungeon features, but the puzzle generation is also a challenge in PCG, as sur veyed by De Kegel and Haahr (2019). For instance, De Kegel and Haahr (2019) present the generation of Sokoban puzzles as a tough challenge. Furthermore, Sokobanlike puzzles also appear in dungeons of games, e.g., The Legend of Zelda dun geons (Nintendo, 1986) or Pokémon dungeons (Nintendo, 1996). Therefore, generate dungeons is not trivial, especially when it involves puzzles.
In relation to the outcome randomness in PDG, only Sam paio et al. (2017), Smith et al. (2018) and Goandy et al. (2020) proposed deterministic solutions for PDG. Even though vari ety is a goal in PCG, deterministic may become very useful for mixedinitiative software. For instance, a deterministic generator could allow the software to have a undo function ality that saves RAM memory since it is not necessary for saving all the previous suggestions.
Online PDG remains a mostly unexplored problem, as ear lier observed by van der Linden et al. (2014). According to them, it is the nature of the dungeons' environment since they usually have a fixed final goal to reach, e.g., a boss or the dungeon exit. Yet, this does not mean that we should not be exploring new forms of dungeons in games, such as an "End less Dungeon Crawling". In short: exploring online solutions in dungeon generation may payoff somehow.
Concerning the Content Authorship, only Baldwin et al. presented the progress of their solution (EDD) for mixed initiative approach. Considering the definition of dungeons we presented earlier, we suggest adding puzzles and barrier mechanics features or providing support for SS dungeons as an extension for this work. Alvarez et al. (2018) and Alvarez et al. (2019) also were the only authors that presented so lutions for adaptive dungeon generation. Their work used area/room distinction and geometric patterns to help with the adaptive generation. Besides, they provide a feature to "freeze" cells in a grid (a dungeon' room), these cells cannot evolve, and the system uses this information to learn the de ✓ Figure 13. Number of works that generated levels with barriers. The '*' oc currences mean that the paper was not clear in the respective classification. signer aesthetics. To extend this functionality, they could al low the designer to select cells from the suggestions of rooms which s/he wants to appear in other new. Another appealing feature they can add to their software is using a MLbased approach to learn the final version of the levels and improve the suggestions. The latter approach would be more interest ing if the model comprehends the differences in the levels' difficulty.
The control over the levels' difficulty is an essential fea ture of a dungeon generator, even though we notice that few works supported this feature. To employ generators in real games, game developers and designers must produce subse quent levels with increasing difficulty. The same can be con sidered with rewards; they must be placed in strategic loca tions to encourage players to explore the levels. However, too many rewards make the game seem too easy or even make the player devalue the rewards. As we observed, area/room dis tinction is a promising way to control game features like dif ficulty and rewards. For instance, this concept was greatly ap plied by Liapis (2017). He generated dungeons' rooms with different connections and content accordingly with the types of rooms (Figure 8j), which presented different degrees of rewards and enemies. Besides, this feature in generators also may support the production of levels with different terrains. Surprisingly, just 9 papers (from a total of 41 articles re viewed, see Figure  (1) a single barrier that requires a single key to be unblocked, and; (2) several barriers that require a single key to be unblocked. Here we can observe two natural extensions of this mechanics: (1) a single barrier that requires several keys to be unblocked, and; (2) several barriers that require several keys to be unblocked. This ex tension is particularly interesting for generative grammars. It is especially challenging if we consider that there might be barriers in the path towards a key to other barriers. Sur prisingly, not a single work generated levels with these me chanics in a 3D level structure. Most of these works focused exclusively on TDML dungeon generation (Figure 14), and, again, new solutions that support barriers for TDCL or SS dungeon levels might be promising. Finally, other kinds of game features that are intrinsically related to the players' in teraction with levels and affect gameplay progression should also be explored. For instance, portals (Green et al., 2019), spatial puzzles (De Kegel and Haahr, 2019), and climbing (e.g., God of War (Sony, 2005)).

Conclusion
In this paper, we surveyed research papers on procedural dun geon generation. Our review indicates that there is a clear preference for evolutionary algorithms for generating dun geon levels. This behavior probably happens due to the high number of constraints that are involved in this process. We identified that the quality diversity approaches just started to be explored for dungeon generation. In terms of dungeon con tent, few papers presented solutions for dungeons as defined by van der Linden et al. (2014). However, the main problem is that the puzzle generation itself is a very complicated chal lenge (De Kegel and Haahr, 2019).
Here is a brief list of our main findings, which may indi cate potential research topics to pursuit in PDG: (1) the pro cedural generation of 3D dungeons needs more investigation because it has the potential to support new gameplay expe riences; (2) a small number of works introduced solutions for levels with the barrier mechanics, and; (3) a handful of papers presented mixedinitiative solutions. In terms of re search topics, we underline the lack of more PDG solutions that support barriers and their complexities, mainly when ap plied to TDML and SS dungeons. It may be inviting to ex plore the barrier mechanics applied in 3D structures. Finally, we need to explore further adaptive and mixedinitiatives approaches -not necessarily both together -because they present the potential to generate complex and challenging levels and increase the game designers' creativity and pro ductivity involved in the creation process.
Since the survey made by van der Linden et al. (2014) much has progressed in PDG research, and several works crafted excellent solutions. Nonetheless, as we have ob served throughout this paper, the procedural generation of dungeons still remains a complex problem. In Section 4, we discuss some potential open problems and research sugges tions that might help in expanding the field.
It is worth mentioning that some works were somehow dif ficult to classify or grasp due to the lack of information. To overcome these difficulties in the future, we encourage the authors to: (1) define the game genre or the specific game for which the level will be generated; (2) define the level struc ture (TDML, TDCL, SS, or any other); (3) highlight the gen erative process pipeline; (4) classify the solution based on the Togelius's PCG taxonomy (Togelius et al., 2016), and; (5) de fine the generation problem mathematically, when possible. These suggestions will hopefully improve the overall under standing of the field and help us keep track of open problems, and map important avenues of research. Table 2. Solution strategy data collected from the found papers. We could classify some solutions because some of them did not fit in an umbrella classification; therefore, we called them 'exclusive' solutions. The '*' occurrences mean that the work only performed a translation from a generated sketch to a level layout. Table 3. PCG taxonomy data collected from the found papers. Classifications: ON (online); OFF (offline); P (parameters); RS (random seeds); G (generic); A (adaptive); S (stochastic); D (deterministic); C (constructive); GT (generateandtest); AT (automatic), and; MI (mixedinitiative).  Table 4. Contentrelated data collected from the found papers. Level Structures: TDML (Topdown mansionlike); TDCL (Topdown cavern like); and SS (Sidescrolling dungeon). The '*' occurrences mean that the paper was not clear in the respective classification.