This work presents a research of the improvement of the Team AI in Unreal Tournament Bots by means of a Genetic Algorithm, which evolves the set of parameters that determines the behaviour of a bot inside a team.
Presented at IEEE Computer Intelligence and Games (CIG 2010). IT University of Copenhagen, Denmark.
--------------------------------------------------
Este trabajo presenta la investigación llevada a cabo para mejorar la IA de los Bots en Unreal Tournament cuando éstos están dentro de un equipo.
Para ello se ha utilizado un Algoritmo Genético que evoluciona el conjunto de parámetros de los que depende el comportamiento de un Bot dentro de un equipo.
Presentada en el IEEE CIG 2010 (ITU, Copenhague, Dinamarca).
3. CIG2010
It is a First Person Shooter (FPS):
Very famous since 1998, because it
had an excellent enemies’ AI, so it
was (and is) a very good game for multiplayer battlematches
between users and the so-called Bots (authonomous players).
4. CIG2010
It offers the Unreal Editor
(included with the game):
It is easy to
create Mods:
5. CIG2010
There is an own language
(UnrealScript).
The editor is also an IDE,
since it is possible to access
the whole tree of classes,
and write and compile new
code inside it.
But it has some flaws such as a limited size for arrays, its is
slower than other languages, or the dificulty to debug the code.
7. CIG2010
A Bot decides what to do (changing between the states and
substates) in the FSM depending on some parameters or
thresholds.
For instance:
(in Roaming state)
IF distance_to_enemy() < MIN_DIST_SHOOT THEN
go_to_state(Attacking)
In addition, there are some values used to calculate others,
such as penalties, multiplication factors, etc.
8. CIG2010
Identify the ‘main’ Put them into
set of parameters an array
Evolve it with an Evolutionary Algorithm
(Genetic Algorithm)
10. CIG2010
Genetic Algorithm FITNESS EVALUATION
based bot (GA-Bot)
population Std
AI Std Std
AI AI
GA
EVOLUTIONARY
PROCESS
11. CIG2010
Identify the ‘main’
Put them into
set of parameters
an array
(for a Team)
Evolve it with an Evolutionary Algorithm
(Genetic Algorithm)
12. CIG2010
Genetic Algorithm
FITNESS EVALUATION
based team of bots
(GT-Bot) Std
Std
AI
AI
Std
AI
population
vs
GA
EVOLUTIONARY
PROCESS OR
13. CIG2010
cr-Team
All the bots in the team have the
same chromosome.
cr-Bot
Every bot in the team has a different
chromosome.
A shape of co-evolution.
14. CIG2010
The set of thresholds and parameters to consider in a Team
evolution is:
15. CIG2010
The real-coded GA we have used in this work considers:
Chromosome Lentgh 40
Population size 30
Number of Generations 30
Simple Gene Mutation
Mutation probability 0.01
Two point crossover
Crossover probability 0.6
Time per chromosome 90 seconds
16. CIG2010
And the Fitness Function:
Each team is evaluated after 90 seconds
The fitness is a sumatory considering the bots’ results:
- number of frags
- times defeated
- number of items collected
- weapons collected
- power of weapons
20. CIG2010
1 cr-Bot based Team (2 Bots) vs 1 cr-Team based Team (2 bots)
vs 2 standard 2-bots teams
vs
21. CIG2010
We have improved the AI of Unreal Bots using a Genetic
Algorithm, so they can behave better in a team.
We have implemented 2 approaches:
• one based in having a different set of parameters per bot (co-
evolution) – cr-Bot
• another based in sharing all the bots in the team the same set of
parameters – cr-Team
The results show that both approaches performs better than
the standard bots and the cr-Team is the best of them.
FUTURE WORK:
- perform more experiments
- improve the FSM of the AI for teams (sets of rules)
A game where you just can see the hand of your character. The objective is easy… kill the enemies before they kill you! Even in the Battlematch game where you fight against other players (human or bots)
In addition to the excellent AI. We started our researchings in 2000 and in that time it was the best environment (and the best game). We know there are some other possibilities, such as Pogamut…
IDE = Integrated Development Environment Unrealscript is a mixture between C and Java (quite similar to Java), but considering the so-called States (marked in the code as labels) Just can write in a file
Roaming -> the state where the bot moves around searching for items, enemies, etc States -> Roaming or Wandering This example were built by us (analysing the code or Unreal 1).
Some of them hard-coded.
It is very easy…
i initialization f(x) evaluation Re replacing Mu mutation ? end condition Cr cross Se selection X* best solution
It is very easy…
There are two different approaches: One considering the same chromosome for all the bots Other considering a different chromosome for every bot
There are two different approaches: One considering the same chromosome for all the bots Other considering a different chromosome for every bot
The most important ones. In addition there are some other parameters just useful for individuals.
It is a generational algorithm. Mutation add or substract a number in [0,1] Crossover choose two points and interchange the values between them
The teams of bots fight during 20 hours. Each bot with a different chromosome. The experiment has been performed 3 times in each map (and calculate an average). The cr-Bot team is better than the standard teams.
The teams of bots fight during 20 hours. All the bots with the same chromosome. The experiment has been performed 3 times in each map (and calculate an average). The cr-Team team is better than the standard teams.
The teams of bots fight during 20 hours. All the bots with the same chromosome. The experiment has been performed 3 times the map (and calculate an average). The cr-Team is better than the standard teams.
The teams of bots fight during 20 hours. All the bots with the same chromosome. The experiment has been performed 3 times the map (and calculate an average). The cr-Team is better than the cr-Bot.