EVO*-2011
Evolving Interesting Maps
for a First Person ShooterLuigi Cardamone, Georgios Yannakakis,Julian Togelius and Pier Luca Lanzi
Luigi Cardamone et al. – EVO* 2011
Motivations
Game content?
In many games, the availability of a big quantity of content is crucial
Unfortunately, the creation of the game content is a very time-consuming activity
Several game designers are required
Some content need to be tested
2
Luigi Cardamone et al. – EVO* 2011
SBPCG
Search-based Procedural Content Generation (SBPCG):
PCG (algorithms procedures for generating content)+
Search algorithms (e.g. genetic algorithms)
SBPCG can be a valid tool:
To support the game designers
To extends the game with unlimited content
Challenges:
How to represent the content?
Which is the best representation to be evolved with genetic algorithms?
How to evaluate the game content?
3
Luigi Cardamone et al. – EVO* 2011
This work
Focus on a First Person Shooter
We Apply SBPCG to evolve maps that can be interesting for the players
We focus on maps:
For Multi-player deathmatch
Single floor
We introduce 4 genotype representations for the maps
We propose a fitness to measure the interestingness of a given map
4
Luigi Cardamone et al. – EVO* 2011
Cube-2 6
Sophisticated First Person Shooter Game:
Deathmatch
Team Deathmatch
Capture The Flag
Fast Engine allowing for in-game geometry editing
Open-source
Luigi Cardamone et al. – EVO* 2011
Problem Setting
Map elements:
Structural elements:
• Rooms
• Corridors
• Elevators/stairs
Game Elements:
• Weapons
• Bonus
• Spawn-points
Graphical Elements:
• Non-interactive objects
• Lights
• Textures
7
Part of the representation
Algorithmically generated
Luigi Cardamone et al. – EVO* 2011
Representations
Phenotype:
Single floor map (2D)
A big matrix of blocks that canform corridors and rooms
4 Genotype Representations:
All-White
All-Black
Grid
Random Digger
Mapping procedures are necessary to convert the genotype to the phenotype:
Check unreachable parts
Place uniformly weapons, bonus, and spawn points
8
Luigi Cardamone et al. – EVO* 2011
All-White
The initial space is free
The genome encodes a series of obstacles that are added to the map
Each obstacle is a wall represented as:
x,y (start position)
Length (positive for horizontal, negative for vertical)
9
<(10,10,200),(90,90,-100),…>
Luigi Cardamone et al. – EVO* 2011
All-Black
The initial space is all black (full of obstacles)
The genome encodes a series of free spaces that are added to the map
Each free space can be:
A square arena (x,y,size)
A rectangular corridor (x,y,length)
Luigi Cardamone et al. – EVO* 2011
Grid
The initial space has a grid of walls that creates NxN squares
The genome specifies for each wall of the grid if it should be ON or OFF
110111110111
111011101111111111
111111
Luigi Cardamone et al. – EVO* 2011
Random Digger
The initial space is all black (full of obstacles)
An agent starts moving randomly and “dig” every place visited
The genome encodes the policy which controls this agent
Luigi Cardamone et al. – EVO* 2011
Removing Unreachable parts
All the first 3 representations may lead to maps with unreachable parts:
Remove the parts that are not reachable:
1. Compute the connected spaces
2. Find the biggest space
3. Remove the zones that are not reachable from the main one
13
1
23
Luigi Cardamone et al. – EVO* 2011
Fitness
Based on the Fighting Time
Also the size of the map is taken into account
Fitness = FightTime + Size
To evaluate the FightTime:
Simulated match of 10 minutes
4 bots (need navigation points)
14
spawn start-fight killed spawn start-fight killed
Fighting Time Fighting Time
Results
Luigi Cardamone et al. – EVO* 2011
16
Best Maps evolved with representation All-White
Best Maps evolved with representation All-Black
Luigi Cardamone et al. – EVO* 2011
17
Best Maps evolved with representation Grid
Best Maps evolved with representation RandomDigger
Luigi Cardamone et al. – EVO* 2011
Comparison
10 runs for each representation
Grid and All-White are the representations which achieve the highest fitness
18
> >
Luigi Cardamone et al. – EVO* 2011
Maps Loaded in Cube 2 19
Luigi Cardamone et al. – EVO* 2011
Game-play example 20
Luigi Cardamone et al. – EVO* 2011
Conclusions
All the representations are able to evolve playable maps
Preliminary user testing suggests that the fitness push towards interesting maps
All-White is the representation that is able to evolve the best maps
Future works:
Use additional fitness functions
Extends the analysis using more human players
21
Thank you! Questions?