A Procedural Balanced Map Generator with Self-Adaptive Complexity for the Real-Time Strategy Game...
-
Upload
keldonspain -
Category
Technology
-
view
218 -
download
0
description
Transcript of A Procedural Balanced Map Generator with Self-Adaptive Complexity for the Real-Time Strategy Game...
A Procedural Balanced Map Generator with Self-AdaptiveComplexity for the Real-Time Strategy Game Planet Wars
Raul Lara-Cabrera,Carlos Cotta,
Antonio J. Fernandez-Leiva
Dept. Lenguajes y Ciencias de laComputacion, University of Malaga,
SPAIN
http://anyself.wordpress.comhttp://dnemesis.lcc.uma.es
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
PCG in the game industry
Borderlands (Gearbox, 2009)
Uses a PCG system to createweapons, enemies and itemswith different properties.
Minecraft (Mojang, 2011)
Sandbox-building game with aninfinite map which is expandeddynamically.
3 / 16
Planet Wars
� Real-time strategy (RTS) game based on Galcon and used in theGoogle AI Challenge 2010
� Its objective is to take over all the planets on the map or eliminateall of your opponents ships
4 / 16
Aims and Scope
1st Goal – Content GenerationUse an evolutionary algorithm to design maps for Planet Wars leadingto 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
Maps
� Maps are plain text files
� Each line represents aplanet
� Planet’s attributes:� X and Y position� Size (growth rate)� Initial number of ships� Owner
6 / 16
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
Objective function
fitness =
(1
Nm
Nm∑i=1
Ki · tiPi + Si + 1
)2
Nm = number of matches
Ki = percentage of occupied planets
ti = number of turns
Pi =
∑tij=1
∣∣∣P(1)ij − P
(2)ij
∣∣∣ti
, (difference between number of planets)
Si =
∑tij=1
∣∣∣S (1)ij − S
(2)ij
∣∣∣ti
, (difference between number of ships)
8 / 16
Objective function
fitness =
(1
Nm
Nm∑i=1
Ki · tiPi + Si + 1
)2
Nm = number of matches
Ki = percentage of occupied planets
ti = number of turns
Pi =
∑tij=1
∣∣∣P(1)ij − P
(2)ij
∣∣∣ti
, (difference between number of planets)
Si =
∑tij=1
∣∣∣S (1)ij − S
(2)ij
∣∣∣ti
, (difference between number of ships)
8 / 16
Objective function
fitness =
(1
Nm
Nm∑i=1
Ki · tiPi + Si + 1
)2
Nm = number of matches
Ki = percentage of occupied planets
ti = number of turns
Pi =
∑tij=1
∣∣∣P(1)ij − P
(2)ij
∣∣∣ti
, (difference between number of planets)
Si =
∑tij=1
∣∣∣S (1)ij − S
(2)ij
∣∣∣ti
, (difference between number of ships)
8 / 16
Breeding mechanism
Mutation
� Gaussian perturbation (real)
σ′i = σi · eτ′·N(0,1)+τ ·Ni (0,1)
x ′i = xi + σi · Ni (0, 1)
� Geometrically distributed perturbation (integers)
ς′i = max(1, ςi · eτ ·N(0,1)+τ ′·N(0,1))
ψi = 1 − (ς′i /m)
1 +
√1 +
(ς′im
)2−1
z ′i = zi +
⌊ln(1 − U(0, 1))
ln(1 − ψi )
⌋−⌊ln(1 − U(0, 1))
ln(1 − ψi )
⌋
9 / 16
Breeding mechanism
Recombination
� “cut and splice”
Other parameters
� (µ+ λ) generational scheme with µ = 10 and λ = 100
� Binary tournament selection
10 / 16
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
Results: fitness
0
50000
100000
150000
0 2500 5000 7500 10000evaluations
fitne
ss
12 / 16
Results: individual size
16
18
20
22
24
26
0 2500 5000 7500 10000evaluations
best
indi
vidu
al s
ize
13 / 16
Results: maps
14 / 16
Conclusions
� We have introduced a simple procedural map generator for a RTSgame that is capable of generating balanced maps for two playergames
� The algorithm with self-adapted number of planets has a betterperformance 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
Thanks for your attention!
AnySelf Project
Please find us in Facebook
http://facebook.com/AnySelfProject
and in Twitter
@anyselfproject
16 / 16