SlideShare a Scribd company logo
An overview on the
termination conditions in the
evolution of game bots
A. Fernández-Ares, P. García-Sánchez, A.M. Mora,
P.A. Castillo, J.J. Merelo, M.G. Arenas
Universidad de Granada (Spain)
A summary of previous works
Pablo García-Sánchez, Antonio Fernández-Ares, Antonio Miguel Mora,
Pedro A. Castillo Valdivieso, Jesús González, Juan Julián Merelo Guervós:
Tree Depth Influence in Genetic Programming for Generation of
Competitive Agents for RTS Games. EvoApplications 2014: 411-421
Antonio Fernández-Ares, Pablo García-Sánchez, Antonio Miguel Mora,
Pedro A. Castillo, Juan Julián Merelo Guervós: Designing competitive
bots for a real time strategy game using genetic programming.
CoSECivi 2014: 159-172
Antonio Fernández-Ares, Pablo García-Sánchez, Antonio M. Mora, Pedro
A. Castillo Valdivieso, Juan Julián Merelo Guervós, Maria I. García Arenas,
Gustavo Romero: It's Time to Stop: A Comparison of Termination
Conditions in the Evolution of Game Bots. EvoApplications 2015: 355-
368
Index
1. Introduction
a. RTS
b. Planet Wars
c. Genetic
Programming
2. GPBot
a. Conditions
b. Actions
3. SCORE - Fitness
4. Methodology
a. Termination Criteria
5. Experimental Setup
6. Results
a. Score
b. Generations
c. Tests
d. Benchmark
e. Comparative
7. Conclusions
8. Future Work
Introduction: RTS
Real-Time Strategy games (RTS-games)
● Resources
● Units
● Buildings
Victory: Get all resources, kill all enemy units or
destroy enemy buildings
Introduction: Planet Wars
Buildings:
Planets
Units:
Space ships
Resources:
Ships generated in
every planet
Introduction: Genetic Programming
Evolutionary Algorithm that evolves binary
decision tree
➔ Internal nodes: Conditions
➔ Leafs: Actions
Individual -> behavioural model (solution)
Evaluation -> Playing a game against a rival and getting
a score
Adapted operators
GPBot: Conditions
A logical expression composed by, at least, one
extracted standard game state variable and a
value between 0 and 1
● myShipsEnemyRatio
● myShipsLandedFlyingRatio
● myPlanetsEnemyRatio
● myPlanetsTotalRatio
● actualMyShipsRatio
● actualLandedFlyingRatio
GPBot: Actions
The possible actions just involve the movement
of an amount of ships from a source to a
destination planet
● Attack Nearest (Neutral|Enemy|NotMy)Planet
● Attack Weakest (Neutral|Enemy|NotMy) Planet
● Attack Wealthiest (Neutral|Enemy|NotMy)
Planet
● Attack Beneficial (Neutral|Enemy|NotMy)
Planet
● Attack Quickest (Neutral|Enemy|NotMy) Planet}
● Attack (Neutral|Enemy|NotMy) Base
● Attack Random Planet
● Reinforce Nearest Planet
● Reinforce Base
● Reinforce Wealthiest Planet
Score (Fitness)
SCORE
BASED IN
TURNS IN
VICTORIES
SCORE
BASED IN
TURNS IN
DEFEATS
SCORE
BASED IN
VICTORIES
> >
Methodology: Termination Criteria
[NG] Number of Generations
➔ 30, 50, 100, 200 Generations
[AO] Age of Outliers
➔ 1, 1.5, 2, 2.5 times the IQR
[RT] Replacement Rate
➔ n/2, n/4, n/8, n/16 with n = N/2
[FT] Fitness Threshold
➔ 22, 24, 26, 28
[FI] Fitness Improvement
➔ 3, 7, 10, 15
Experimental Setup
Parameter Name Value
Population Size (N) 32
Number of battles for scoring (NB) 30
Re-evaluation of individuals Yes
Crossover type Sub-tree crossover
Crossover rate 0.5
Mutation 1-node mutation
Mutation rate 0.25
Selection 2-tournament
Replacement Generational
Maximum Tree Depth 7
Runs 36
SCORE of the best individuals (of all runs) grouped by criterion
GENERATION attained (of all runs) grouped by criterion
Kruskal-Wallis Test of samples of each criterion by SCORE an
GENERATIONS.
Black means no statistically significant difference has been found.
Percentage of victories (of the 36 best individuals) in benchmark against five
different competitive bots available in the literature in 100 maps
Linear regression of the SCORE (fitness) with the results of the benchmark
(Percentage of victories)
Average score of the best individual
and average reached generations per
termination criteria
Average results of every criterion
(relative with respect to NG_30)
Conclusions I
[AO] Not good. As more restrictive
values don’t imply a significant score
improvement.
[FT] Best score. But the optimum fitness
might not be know. Needs the highest
amount of generations. It might not finish.
[FI] Useful to ‘detect’ local optima.
[RT] Provides the best results
considering all metrics.
Conclusions II
Fitness Threshold would be the most desirable
option
➔ It attains the best score.
➔ It is quite difficult to find an optimal fitness value to
use (normally it is unknown).
➔ Requires more computational budget, and it is
possible that it never ends (the criterion is not met).
Replacement Rate as stopping criterion, since it is a
compromise solution which relies in the population
improvement without an implicit use of the fitness.
Future work
● New problems (and algorithms) are being
addressed.
○ P. García-Sánchez, Alberto Tonda, Giovanni
Squillero and JJ. Merelo: Towards Automatic
StarCraft Strategy Generation Using Genetic
Programming. Accepted at CIG 2015.
● Mechanisms to improve the EA.
● Use larger and complex decision trees.
Questions
Thank you!
Antonio Fernández-Ares
antares@ugr.es - @antaress
Antonio M. Mora
amorag@ugr.es - @amoragar
Pablo García-Sánchez
pablogarcia@ugr.es - @fergunet

More Related Content

PDF
Stochastic gradient descent and its tuning
PDF
Using Gradient Descent for Optimization and Learning
PPT
Java control flow statements
PDF
Evo 2015 - it's time to stop
PDF
Towards Automatic StarCraft Strategy Generation Using Genetic Programming
PDF
This was a triumph: Evolving intelligent bots for videogames. And for Science.
ODP
Ants iwann jcc
PDF
Using Self-Adaptive Evolutionary Algorithms to Evolve Dynamism-Oriented Maps ...
Stochastic gradient descent and its tuning
Using Gradient Descent for Optimization and Learning
Java control flow statements
Evo 2015 - it's time to stop
Towards Automatic StarCraft Strategy Generation Using Genetic Programming
This was a triumph: Evolving intelligent bots for videogames. And for Science.
Ants iwann jcc
Using Self-Adaptive Evolutionary Algorithms to Evolve Dynamism-Oriented Maps ...

Similar to CoSECiVi'15 - An overview on the termination conditions in the evolution of game bots (20)

PDF
Evolving Build Orders in Starcraft
PPTX
Genetic Algorithms for Evolving Computer Chess Programs
PDF
Optimizing Strategy Parameters in a Game Bot
PDF
Dissertation defense
PPT
Algoritmos Genéticos aplicados em Machine Learning
PPS
Designing and Evolving an Unreal Tournament 2004 Expert Bot
PDF
A Procedural Balanced Map Generator with Self-Adaptive Complexity for the Rea...
PDF
Diagnosing cancer with Computational Intelligence
PDF
Designing and Evolving an Unreal Tournament 2004 Expert Bot
PPS
FSM-Based Agents for Playing Super Mario Game
PPT
Genetic-Algorithms for engineering appl.ppt
PDF
Testing hybrid computational intelligence algorithms for general game playing...
PDF
Study on Genetic Algorithm Approaches to Improve an Autonomous Agent for a Fi...
PPTX
Case Based Planner Platform For Rts Games
PPTX
Case Based Planner For Rts Games
PPTX
Game Balancing with Ecosystem Mechanism
PPTX
Introduction to Genetic Algorithms with Python - Hello World!
DOC
R9263109_M801_Webposter
PPT
Topic_6
PDF
CIG 2018 StarCraft AI Competition
Evolving Build Orders in Starcraft
Genetic Algorithms for Evolving Computer Chess Programs
Optimizing Strategy Parameters in a Game Bot
Dissertation defense
Algoritmos Genéticos aplicados em Machine Learning
Designing and Evolving an Unreal Tournament 2004 Expert Bot
A Procedural Balanced Map Generator with Self-Adaptive Complexity for the Rea...
Diagnosing cancer with Computational Intelligence
Designing and Evolving an Unreal Tournament 2004 Expert Bot
FSM-Based Agents for Playing Super Mario Game
Genetic-Algorithms for engineering appl.ppt
Testing hybrid computational intelligence algorithms for general game playing...
Study on Genetic Algorithm Approaches to Improve an Autonomous Agent for a Fi...
Case Based Planner Platform For Rts Games
Case Based Planner For Rts Games
Game Balancing with Ecosystem Mechanism
Introduction to Genetic Algorithms with Python - Hello World!
R9263109_M801_Webposter
Topic_6
CIG 2018 StarCraft AI Competition
Ad

More from Sociedad Española para las Ciencias del Videojuego (20)

PDF
CoSECiVi 2020 - GRETIVE Un Bot Evolutivo para HearthStone basado en Perfiles
PDF
CoSECiVi 2020 - Parametric Action Pre-Selection for MCTS in Real-Time Strateg...
PDF
CoSECiVi 2020 - Las consecuencias del glitch en el entorno virtual interactivo
PDF
CoSECiVi 2020 - Games studies in architectural education: An experimental gra...
PDF
CoSECiVi 2020 - Multiresolution Foliage Rendering
PDF
CoSECiVi 2020 - Development of a User-Friendly Application for Creating Tacti...
PDF
CoSECiVi 2020 - Entornos parcialmente no euclidianos en realidad virtual
PDF
CoSECiVi 2020 - An Exploration on Automating Player Personality Identificatio...
PDF
CoSECiVi 2020 - Data mining of deck archetypes in Hearthstone
PDF
CoSECiVi 2020 - Descubrimiento de modelos de comportamiento de perfiles de ju...
PDF
CoSECiVi 2020 - Virtual Reality and Chess. A Video Game for Cognitive Trainin...
PDF
CoSECiVi'16 - Hacia la generación automática de mecánicas de juego: un edito...
PDF
CoSECiVi'16 - Computación Efímera: identificando retos para la investigación e...
PDF
CoSECiVi'16 - Walking in VR. Measuring Presence and Simulator Sickness in Fir...
PDF
CoSECiVi'16 - Extensión de los grafos de dependencia para incrementar la reju...
PDF
CoSECiVi'16 - Sólo puede quedar uno: Evolución de Bots para RTS basada en sup...
PDF
CoSECiVi'16 - Living-UGR: Una aventura gráfica geolocalizada para difundir el...
PDF
CoSECiVi'16 - Desarrollo de una plataforma basada en Unity3D para la aplicaci...
PDF
CoSECiVi'16 - Educapiz: Una herramienta para educación infantil basada en ser...
PDF
CoSECiVi'15 - Predicting the winner in two player StarCraft games
CoSECiVi 2020 - GRETIVE Un Bot Evolutivo para HearthStone basado en Perfiles
CoSECiVi 2020 - Parametric Action Pre-Selection for MCTS in Real-Time Strateg...
CoSECiVi 2020 - Las consecuencias del glitch en el entorno virtual interactivo
CoSECiVi 2020 - Games studies in architectural education: An experimental gra...
CoSECiVi 2020 - Multiresolution Foliage Rendering
CoSECiVi 2020 - Development of a User-Friendly Application for Creating Tacti...
CoSECiVi 2020 - Entornos parcialmente no euclidianos en realidad virtual
CoSECiVi 2020 - An Exploration on Automating Player Personality Identificatio...
CoSECiVi 2020 - Data mining of deck archetypes in Hearthstone
CoSECiVi 2020 - Descubrimiento de modelos de comportamiento de perfiles de ju...
CoSECiVi 2020 - Virtual Reality and Chess. A Video Game for Cognitive Trainin...
CoSECiVi'16 - Hacia la generación automática de mecánicas de juego: un edito...
CoSECiVi'16 - Computación Efímera: identificando retos para la investigación e...
CoSECiVi'16 - Walking in VR. Measuring Presence and Simulator Sickness in Fir...
CoSECiVi'16 - Extensión de los grafos de dependencia para incrementar la reju...
CoSECiVi'16 - Sólo puede quedar uno: Evolución de Bots para RTS basada en sup...
CoSECiVi'16 - Living-UGR: Una aventura gráfica geolocalizada para difundir el...
CoSECiVi'16 - Desarrollo de una plataforma basada en Unity3D para la aplicaci...
CoSECiVi'16 - Educapiz: Una herramienta para educación infantil basada en ser...
CoSECiVi'15 - Predicting the winner in two player StarCraft games
Ad

Recently uploaded (20)

PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PDF
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
PDF
HPLC-PPT.docx high performance liquid chromatography
PPTX
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
PPTX
Microbiology with diagram medical studies .pptx
PDF
Sciences of Europe No 170 (2025)
PDF
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
PDF
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
PDF
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
PPTX
Classification Systems_TAXONOMY_SCIENCE8.pptx
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PPTX
famous lake in india and its disturibution and importance
PPTX
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
PPTX
Introduction to Cardiovascular system_structure and functions-1
PDF
The scientific heritage No 166 (166) (2025)
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PPTX
BIOMOLECULES PPT........................
PPTX
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
PPT
protein biochemistry.ppt for university classes
TOTAL hIP ARTHROPLASTY Presentation.pptx
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
HPLC-PPT.docx high performance liquid chromatography
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
Microbiology with diagram medical studies .pptx
Sciences of Europe No 170 (2025)
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
Classification Systems_TAXONOMY_SCIENCE8.pptx
Comparative Structure of Integument in Vertebrates.pptx
famous lake in india and its disturibution and importance
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
Introduction to Cardiovascular system_structure and functions-1
The scientific heritage No 166 (166) (2025)
The KM-GBF monitoring framework – status & key messages.pptx
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
BIOMOLECULES PPT........................
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
protein biochemistry.ppt for university classes

CoSECiVi'15 - An overview on the termination conditions in the evolution of game bots

  • 1. An overview on the termination conditions in the evolution of game bots A. Fernández-Ares, P. García-Sánchez, A.M. Mora, P.A. Castillo, J.J. Merelo, M.G. Arenas Universidad de Granada (Spain)
  • 2. A summary of previous works Pablo García-Sánchez, Antonio Fernández-Ares, Antonio Miguel Mora, Pedro A. Castillo Valdivieso, Jesús González, Juan Julián Merelo Guervós: Tree Depth Influence in Genetic Programming for Generation of Competitive Agents for RTS Games. EvoApplications 2014: 411-421 Antonio Fernández-Ares, Pablo García-Sánchez, Antonio Miguel Mora, Pedro A. Castillo, Juan Julián Merelo Guervós: Designing competitive bots for a real time strategy game using genetic programming. CoSECivi 2014: 159-172 Antonio Fernández-Ares, Pablo García-Sánchez, Antonio M. Mora, Pedro A. Castillo Valdivieso, Juan Julián Merelo Guervós, Maria I. García Arenas, Gustavo Romero: It's Time to Stop: A Comparison of Termination Conditions in the Evolution of Game Bots. EvoApplications 2015: 355- 368
  • 3. Index 1. Introduction a. RTS b. Planet Wars c. Genetic Programming 2. GPBot a. Conditions b. Actions 3. SCORE - Fitness 4. Methodology a. Termination Criteria 5. Experimental Setup 6. Results a. Score b. Generations c. Tests d. Benchmark e. Comparative 7. Conclusions 8. Future Work
  • 4. Introduction: RTS Real-Time Strategy games (RTS-games) ● Resources ● Units ● Buildings Victory: Get all resources, kill all enemy units or destroy enemy buildings
  • 5. Introduction: Planet Wars Buildings: Planets Units: Space ships Resources: Ships generated in every planet
  • 6. Introduction: Genetic Programming Evolutionary Algorithm that evolves binary decision tree ➔ Internal nodes: Conditions ➔ Leafs: Actions Individual -> behavioural model (solution) Evaluation -> Playing a game against a rival and getting a score Adapted operators
  • 7. GPBot: Conditions A logical expression composed by, at least, one extracted standard game state variable and a value between 0 and 1 ● myShipsEnemyRatio ● myShipsLandedFlyingRatio ● myPlanetsEnemyRatio ● myPlanetsTotalRatio ● actualMyShipsRatio ● actualLandedFlyingRatio
  • 8. GPBot: Actions The possible actions just involve the movement of an amount of ships from a source to a destination planet ● Attack Nearest (Neutral|Enemy|NotMy)Planet ● Attack Weakest (Neutral|Enemy|NotMy) Planet ● Attack Wealthiest (Neutral|Enemy|NotMy) Planet ● Attack Beneficial (Neutral|Enemy|NotMy) Planet ● Attack Quickest (Neutral|Enemy|NotMy) Planet} ● Attack (Neutral|Enemy|NotMy) Base ● Attack Random Planet ● Reinforce Nearest Planet ● Reinforce Base ● Reinforce Wealthiest Planet
  • 9. Score (Fitness) SCORE BASED IN TURNS IN VICTORIES SCORE BASED IN TURNS IN DEFEATS SCORE BASED IN VICTORIES > >
  • 10. Methodology: Termination Criteria [NG] Number of Generations ➔ 30, 50, 100, 200 Generations [AO] Age of Outliers ➔ 1, 1.5, 2, 2.5 times the IQR [RT] Replacement Rate ➔ n/2, n/4, n/8, n/16 with n = N/2 [FT] Fitness Threshold ➔ 22, 24, 26, 28 [FI] Fitness Improvement ➔ 3, 7, 10, 15
  • 11. Experimental Setup Parameter Name Value Population Size (N) 32 Number of battles for scoring (NB) 30 Re-evaluation of individuals Yes Crossover type Sub-tree crossover Crossover rate 0.5 Mutation 1-node mutation Mutation rate 0.25 Selection 2-tournament Replacement Generational Maximum Tree Depth 7 Runs 36
  • 12. SCORE of the best individuals (of all runs) grouped by criterion
  • 13. GENERATION attained (of all runs) grouped by criterion
  • 14. Kruskal-Wallis Test of samples of each criterion by SCORE an GENERATIONS. Black means no statistically significant difference has been found.
  • 15. Percentage of victories (of the 36 best individuals) in benchmark against five different competitive bots available in the literature in 100 maps
  • 16. Linear regression of the SCORE (fitness) with the results of the benchmark (Percentage of victories)
  • 17. Average score of the best individual and average reached generations per termination criteria Average results of every criterion (relative with respect to NG_30)
  • 18. Conclusions I [AO] Not good. As more restrictive values don’t imply a significant score improvement. [FT] Best score. But the optimum fitness might not be know. Needs the highest amount of generations. It might not finish. [FI] Useful to ‘detect’ local optima. [RT] Provides the best results considering all metrics.
  • 19. Conclusions II Fitness Threshold would be the most desirable option ➔ It attains the best score. ➔ It is quite difficult to find an optimal fitness value to use (normally it is unknown). ➔ Requires more computational budget, and it is possible that it never ends (the criterion is not met). Replacement Rate as stopping criterion, since it is a compromise solution which relies in the population improvement without an implicit use of the fitness.
  • 20. Future work ● New problems (and algorithms) are being addressed. ○ P. García-Sánchez, Alberto Tonda, Giovanni Squillero and JJ. Merelo: Towards Automatic StarCraft Strategy Generation Using Genetic Programming. Accepted at CIG 2015. ● Mechanisms to improve the EA. ● Use larger and complex decision trees.
  • 21. Questions Thank you! Antonio Fernández-Ares antares@ugr.es - @antaress Antonio M. Mora amorag@ugr.es - @amoragar Pablo García-Sánchez pablogarcia@ugr.es - @fergunet