ASP with Applications to Mazes and Levels

  • Nelson M
  • Smith A
N/ACitations
Citations of this article
24Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Answer set programming (ASP) is an approach to logic programming, where constraints and logical relations are declared in a Prolog-like language. ASP solvers can be used to find world configurations that satisfy constraints expressed in this language. Interestingly, many forms of content generation can be formulated as constraint-solving problems, and thus expressed in ASP. For example, maps can be represented as the position of all objects in the map, and the space of permissible maps limited by constraints expressed in the language. This chapter discusses how to use ASP for generating different types of mazes, using generation of dungeons as a running example. 8.1 What to generate and how to generate it A common theme underlying procedural content generation is that we need to be able to specify both what we want our generated content to be like, and how to generate it. Sometimes these two parts are tightly intertwined. In the constructive methods of Chapter 3 and the fractal and noise methods of Chapter 4, we can produce different kinds of output by tweaking the algorithms until we're satisfied with their output. But if we know what properties we'd like generated content to have, it can be more convenient to directly specify what we want, and then have a general algorithm find content meeting our criteria. The search-based framework introduced in Chapter 2 is one common way of making a content-generation algorithm general, so we can tell it what kind of content we want, and have it search for content meeting our request. An evaluation function specifies the properties we'd like the content to have, by numerically rating the quality of generated content according to whatever criteria we choose. A search algorithm then searches a space of content encodings to find highly rated content. Evaluation functions summarize content quality into a single numerical rating. Then the search process, such as an evolutionary algorithm, finds content that rates 143

Cite

CITATION STYLE

APA

Nelson, M. J., & Smith, A. M. (2016). ASP with Applications to Mazes and Levels (pp. 143–157). https://doi.org/10.1007/978-3-319-42716-4_8

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free