Antonio Mora, Antonio Fernández-Ares, Juan-J Merelo-Guervós, Pablo García-Sánchez
This work describes an evolutionary algorithm (EA) for evolving the constants, weights and probabilities of a rule-based decision engine of a bot designed to play the Planet Wars game. The evaluation of the individuals is based on the result of some non-deterministic combats, whose outcome depends on random draws as well as the enemy action, and is thus noisy. This noisy fitness is addressed in the EA and then, its effects are deeply analysed in the experimental section. The conclusions shows that reducing randomness via repeated combats and re-evaluations reduces the effect of the noisy fitness, making then the EA an effective approach for solving the problem.
6. Problem Description
Actual List of
Bot
State actions
Restrictions
RTS->Real time strategy with pseudo-turns
1 turn = 1 second
Forbidden use of memory between turns.
Actual state: planets and fleets.
List of Actions: un simple file text witch the movement of
fleets from a planets belongs to player and another planet.
7. Baseline: GoogleBot
It was include in the Initial Kit of the contest
How it works?
Choose the BASE planet (the one with most of its starship)
Choose the TARGET planet (calculating the ratio between the grow
rate and the number of ships)
It wastes the rest of time until the attack has finished
8. First Bot: AresBot
For each turn:
Choose the BASE planet (the one with most starships). The
rest of planet are called COLONIES.
Choose the TARGET (who are not already being attacked):
EXPANSION: if TARGET is neutral.
CONQUEST: if TARGET belongs to enemy.
Extra actions for each COLONY:
TITHE?
SUPPORT ATTACK?
10. Parameters of AresBot
titheperc: percentage of fleets (of the stored) that
COLONIE sent to the BASE.
titheprob: probability of the TITHE for each COLONIE.
ωNS−DIS: weight of the number of starship hosted at the
planet and the distance form the BASE to the TARGET
(it’s used to the score function of target planet).
ωGR: weight of the planet growth rate (it’s used to the score
function of target planet).
11. Parameters of AresBot II
poolperc: proportion of extra starships that the bot sends
from the base planet to the target planet.
supportperc: percentage of extra starships that the bot
sends from each COLONIE to TARGET.
supportprob: probability of sending extra fleets from one
COLONIE to TARGET (if COLONIE is closer to the TARGET than
BASE are).
12. Operation “GeneBot”
Using intergalactic techniques (GA) improves AresBot
to create the powerful Genebot.
Gen: array of parameters (standardized values)
2-Tournament
BLX-alpha crossover
Re-evaluation
13. Fitness
For each “bot” fight against the GoogleBot in 5
characteristic maps.
One bot is better than other if:
Wins in more maps.
Needs less turns, in case of tie.
14. Noise Fitness Study
Unpromising Bot
Fitness assigned on first execution: 2057
3005
2505
2005
fitness
1505
1005
505
5
0 10 20 30 40 50 60 70 80 90 100
Evaluation #
Wins in 5 maps Loses on any of the 5 maps
15. Noise Fitness Study II
Promising Bot
Fitness assigned on firts execution: 578
3005
2505
2005
fitness
1505
1005
505
5
0 10 20 30 40 50 60 70 80 90 100
Evaluation #
Wins in 5 maps Loses on any of the 5 maps
17. Experiments II
Each single “evaluation” takes 40 seconds.
40 seconds * 200 * 100 ≈ 9.25 days of execution
• SOLUTION → Parallel algorithm
• N evaluation at same time. (N = 4 in experiments)
• Make 15 executions, getting 15 “best bots”.
22. Result IV
Fitness Evolution
700
Average
650 Best execution
The best of all
executions
Aggregated number of turns
600
550
500
450
400
350
G0 G5 G10 G15 G20 G25 G30 G35 G40 G45 G50 G55 G60 G65 G70 G75 G80 G85 G90 G95 G100
23. Conclusions and future work
The First Genebot finished in the 1454th position in the contest (36%), but
it had executed just once (with less individuals and generations).
Genebot wins 99% of battle versus AresBot
Our fitness is a good measure of the bot.
To DO:
Distributed algorithm.
Multi-objective.
Co-evolution.
Recognition of environment and specialist bots
Macro and micro evolution…