Procedural content generation (PCG) is the programmatic generation of game content using a random or pseudo-random process that results in an unpredictable range of possible gameplay spaces. This methodology brings many advantages to game developers, such as reduced memory consumption. This work presents a procedural balanced map generator for a real-time strategy game: Planet Wars. This generator uses an evolutionary strategy for generating and evolving maps and a tournament system for evaluating the quality of these maps in terms of their balance. We have run several experiments obtaining a set of playable and balanced maps.
A Procedural Balanced Map Generator with Self-Adaptive Complexity for the Real-Time Strategy Game Planet Wars
1. A Procedural Balanced Map Generator with Self-Adaptive
Complexity for the Real-Time Strategy Game Planet Wars
Ra´ul Lara-Cabrera,
Carlos Cotta,
Antonio J. Fern´andez-Leiva
Dept. Lenguajes y Ciencias de la
Computaci´on, University of M´alaga,
SPAIN
http://anyself.wordpress.com
http://dnemesis.lcc.uma.es
2. Introduction
Procedural Content Generation
Creating game content automatically, through algorithmic means.
Maps, levels, dialogues, characters, rule-sets, weapons...
Benefits
Reduced memory consumption
Saving in the expense of manually creating game content
Endless or infinite games
2 / 16
3. PCG in the game industry
Borderlands (Gearbox, 2009)
Uses a PCG system to create
weapons, enemies and items
with different properties.
Minecraft (Mojang, 2011)
Sandbox-building game with an
infinite map which is expanded
dynamically.
3 / 16
4. Planet Wars
Real-time strategy (RTS) game based on Galcon and used in the
Google AI Challenge 2010
Its objective is to take over all the planets on the map or eliminate
all of your opponents ships
4 / 16
5. Aims and Scope
1st Goal – Content Generation
Use an evolutionary algorithm to design maps for Planet Wars leading
to balanced games.
Balance is used here as a proxy for attractiveness. Balanced games:
are more interesting for all kind of players
increase the motivation of players
increase the duration of the game
2nd Goal – Self-Adaptation
Explore self-adaptation at different levels in this context.
5 / 16
6. Maps
Maps are plain text files
Each line represents a
planet
Planet’s attributes:
X and Y position
Size (growth rate)
Initial number of ships
Owner
6 / 16
7. Individuals
...
Planet
x (real)
y (real)
size (integer)
number of ships (integer)
x,y mutation steps (real)
size, ships mutation steps (real)
Array of planets (variable length)
7 / 16
10. Objective function
fitness =
1
Nm
Nm
i=1
Ki · ti
¯Pi + ¯Si + 1
2
Nm = number of matches
Ki = percentage of occupied planets
ti = number of turns
¯Pi =
ti
j=1 P
(1)
ij − P
(2)
ij
ti
, (difference between number of planets)
¯Si =
ti
j=1 S
(1)
ij − S
(2)
ij
ti
, (difference between number of ships)
8 / 16
13. Experiments
Two experiments (10 executions each):
ES with self-adapting strategy for mutation steps and genome length
ES with self-adapting strategy for mutation steps and fixed genome
length (23 planets)
100 generations each execution
Maximum game length: 400 turns
Evaluation: three bots and three matches on each map
Google AI Challenge 2010 participants
Ranked in the top 100 out of 4600
Having their source code available
11 / 16
17. Conclusions
We have introduced a simple procedural map generator for a RTS
game that is capable of generating balanced maps for two player
games
The algorithm with self-adapted number of planets has a better
performance than the algorithm with this value fixed
High balanced maps tend to have around 17 planets
Future work:
Interactivity
Pro-activity
Deal with other maps’ features, such as dynamism and aesthetics
15 / 16
18. Thanks for your attention!
AnySelf Project
Please find us in Facebook
http://facebook.com/AnySelfProject
and in Twitter
@anyselfproject
16 / 16