Occupancy-Regulated Extension Using Chunks to Build Levels Peter - - PowerPoint PPT Presentation

occupancy regulated extension
SMART_READER_LITE
LIVE PREVIEW

Occupancy-Regulated Extension Using Chunks to Build Levels Peter - - PowerPoint PPT Presentation

Occupancy-Regulated Extension Using Chunks to Build Levels Peter Mawhorter Michael Mateas Department of Computer Science University of California Santa Cruz August 25, 2010 expressiveintelligencestudio UC Santa Cruz Motivation Existing


slide-1
SLIDE 1

Occupancy-Regulated Extension

Using Chunks to Build Levels

Peter Mawhorter Michael Mateas

Department of Computer Science University of California Santa Cruz

August 25, 2010

expressiveintelligencestudio UC Santa Cruz

slide-2
SLIDE 2

Motivation

◮ Existing generators impose constraints in pursuit of a goal.

expressiveintelligencestudio UC Santa Cruz

slide-3
SLIDE 3

Motivation

◮ But human designers often create surprising levels.

expressiveintelligencestudio UC Santa Cruz

slide-4
SLIDE 4

Motivation

◮ The goal: create levels that can routinely surprise their

creator.

expressiveintelligencestudio UC Santa Cruz

slide-5
SLIDE 5

Insight

◮ Randomly placed components would be

surprising, but not interesting.

◮ Placing groups of components reduces entropy,

and can exploit human authoring.

◮ Occupancy can be used to constrain assembly of

chunks.

◮ Thus Occupancy-Regulated Extension.

expressiveintelligencestudio UC Santa Cruz

slide-6
SLIDE 6

The ORE Algorithm

  • 1. Select a context.
  • 2. Pick a chunk to insert:

(i) Filter available chunks. (ii) Select among compatible chunks.

  • 3. Integrate the selected chunk into the level.

expressiveintelligencestudio UC Santa Cruz

slide-7
SLIDE 7

Occupancy in ORE

◮ Occupancy is expressed as concrete anchor

points.

◮ Each chunk defines its own anchor points. ◮ These anchors determine how pieces can fit

together.

expressiveintelligencestudio UC Santa Cruz

slide-8
SLIDE 8

Context Selection

◮ Picks a random anchor at which to add a chunk. ◮ Keeps track of used and unused anchors. ◮ Handles edge cases: might reset the list of used

anchors, or even improvise a new anchor.

expressiveintelligencestudio UC Santa Cruz

slide-9
SLIDE 9

Example

◮ The initial context:

expressiveintelligencestudio UC Santa Cruz

slide-10
SLIDE 10

Chunk Filtering

◮ Uses a notion of spatial compatibility to exclude

things that don’t fit.

◮ Determines type compatibility for overlapping

components.

◮ Filters out chunks that would extend outside of

the bounding box of the level.

◮ Considers each chunk in the library at each of

its anchors, so the algorithm isn’t directional.

expressiveintelligencestudio UC Santa Cruz

slide-11
SLIDE 11

Example

◮ An example library:

expressiveintelligencestudio UC Santa Cruz

slide-12
SLIDE 12

Example

◮ The matching anchors:

expressiveintelligencestudio UC Santa Cruz

slide-13
SLIDE 13

Example

◮ The first match:

expressiveintelligencestudio UC Santa Cruz

slide-14
SLIDE 14

Example

◮ The second match:

expressiveintelligencestudio UC Santa Cruz

slide-15
SLIDE 15

Example

◮ The third match:

expressiveintelligencestudio UC Santa Cruz

slide-16
SLIDE 16

Example

◮ One of the non-matches:

expressiveintelligencestudio UC Santa Cruz

slide-17
SLIDE 17

Example

◮ Another non-match:

expressiveintelligencestudio UC Santa Cruz

slide-18
SLIDE 18

Chunk Selection

◮ Considers only the first several (currently 17) filtered

chunks.

◮ Computes chunk metrics:

◮ f : Chunk default frequency, as defined in the library. ◮ b: Chunk boredom value: number of times the chunk has been

used so far.

◮ p: Chunk precision bias: 0.2 if the chunk is labeled as

“precise”; 1 otherwise.

◮ Calculates a weight for each chunk being considered:

◮ w = f ∗ 0.7b ∗ p expressiveintelligencestudio UC Santa Cruz

slide-19
SLIDE 19

Chunk Selection

◮ Uses weighted random selection with the computed

weights to choose a chunk to insert.

◮ Default chunk frequencies prevent complex chunks from

dominating the output.

◮ The boredom value helps ensure variety in chunk selection. ◮ The precision value is an example of a level design choice

encoded in the chunk selection policy.

expressiveintelligencestudio UC Santa Cruz

slide-20
SLIDE 20

Example

◮ The weight for the first match might be:

w = 0.75 ∗ 0.70 ∗ 1 = 0.75

expressiveintelligencestudio UC Santa Cruz

slide-21
SLIDE 21

Example

◮ The weight for the second match might be:

w = 1 ∗ 0.70 ∗ 1 = 1

expressiveintelligencestudio UC Santa Cruz

slide-22
SLIDE 22

Example

◮ The weight for the third match might be:

w = 0.5 ∗ 0.70 ∗ 0.2 = 0.1

expressiveintelligencestudio UC Santa Cruz

slide-23
SLIDE 23

Chunk Integration

◮ Removes any overlapping components from the

incoming chunk.

◮ Adds remaining components to the level under

construction.

◮ This step could be used to enforce some global

constraints.

expressiveintelligencestudio UC Santa Cruz

slide-24
SLIDE 24

Example

◮ The result of integration, assuming the second match is

selected:

expressiveintelligencestudio UC Santa Cruz

slide-25
SLIDE 25

Post-Processing

◮ Specifies and expands terrain sprites. ◮ Implements global constraints on the distribution

  • f enemies and powerups by removing some.

◮ Tries to patch up sprite inconsistencies.

expressiveintelligencestudio UC Santa Cruz

slide-26
SLIDE 26

Example

◮ The level after post-processing:

expressiveintelligencestudio UC Santa Cruz

slide-27
SLIDE 27

The Chunk Library

◮ A total of 42 chunks. ◮ Ranges from 3x2 to 10x10 tiles in size. ◮ Hand-crafted chunks, some with authored

complexity.

expressiveintelligencestudio UC Santa Cruz

slide-28
SLIDE 28

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-29
SLIDE 29

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-30
SLIDE 30

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-31
SLIDE 31

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-32
SLIDE 32

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-33
SLIDE 33

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-34
SLIDE 34

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-35
SLIDE 35

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-36
SLIDE 36

Example Chunks

expressiveintelligencestudio UC Santa Cruz

slide-37
SLIDE 37

Summary

◮ Using human-authored chunks, ORE assembles

a level by adding chunks one-at-a-time.

◮ The main constraint imposed is that added

chunks are anchored via potential positions.

◮ The algorithm is highly customizable, and

higher-level constraints can be imposed on it.

expressiveintelligencestudio UC Santa Cruz

slide-38
SLIDE 38

Results

expressiveintelligencestudio UC Santa Cruz

slide-39
SLIDE 39

Failures

expressiveintelligencestudio UC Santa Cruz

slide-40
SLIDE 40

Failures

expressiveintelligencestudio UC Santa Cruz

slide-41
SLIDE 41

Future Work

◮ On-line generation for dynamic difficulty

adjustment.

◮ An interface for mixed-initiative design. ◮ Automatic chunk library extraction. ◮ Application to other domains.

expressiveintelligencestudio UC Santa Cruz