You are on page 1of 3

Augmentation of AI in Games: Dynamic Adaptation to

Game Changes during Gameplay through Neural Networks


John Karlo B. Maninang Steven Joshua A. Soriano
College of Computer and Information Sciences College of Computer and Information Sciences
Polytechnic University of the Philippines Polytechnic University of the Philippines
Sta. Mesa, Manila, Philippines Sta. Mesa, Manila, Philippines
+639368881966 +639984773775
karlomaninang@gmail.com svensori@gmail.com

ABSTRACT player to keep interested on it. [6] Game should give the needs of
Usually with first person shooting games, we select the difficulty the player. Most of the time, the game's difficulty is the reason why
of the opponents before the game starts. Moreover, when the players lose their interests in playing such game. As stated in Bellen
players play a difficulty that is ridiculously hard or way too easy, and San Juan’s research [2015], most of the players just
they would probably quit the game because it is moderately memorizing the pattern to beat the game by analyzing their
frustrating or boring. The purpose of this research is to create a bot previous records for self-satisfaction while others after finishing a
which is implemented with a neural network to create a dynamical game they will just leave it or uninstall it because they knew how
difficulty adjusting AI depending on the player’s performance to to repeat the ways on how to end that game. Because of this, game
maintain the balance between the challenge and the player’s developers are making ways to solve this problem by augmenting
performance. The output would be a game implemented with the AI in game to adapt itself in player’s capabilities and to make a
Dynamic Difficulty Adjustment (DDA) and Neural Networks more balanced difficulty.
(NN), and their comparison of the players’ performance in each Neural Network is one of the algorithms that offers a possibility
algorithm. that an AI can have the ability to change its behaviour in the game
in real time. There was a book that tackled about using the Neural
General Terms Network to train the AI in adapting to the game world. In a book
Algorithms, Experimentation [5], it is written there that Neural Network can be used to
manipulate and enhance the knowledge of an AI. They use Neural
Network as a brain for the AI, so that it can move accordingly to
Keywords the situation. If in Sutoyo and San Juan’s study they used DDA to
Artificial Intelligence, Artificial Neural Network, Bot, Dynamic adjust the difficulty of the AI in a TD game, in this research it will
Difficulty Adjustment, Finite State Machine. used Neural Networks to solve the problem in manual adjusting.
This study will test the capability of the ANN in analysing the
1. INTRODUCTION player’s performance and adjusting to it. To make the system more
Nowadays, most of the computer games today have what we call accurately in getting the performance of the player, this
AI (Artificial Intelligence) or sometimes we call them as bots. experimentation will also get the player’s accuracy and the time
Programmers and game developers created the AI to make them consume/spent by player in killing the enemy besides from the
more challenging and intelligent in some ways. Artificial player’s life.
Intelligence can be the bots in Counter Strike, the mobs in the game This study will be tested in a FPS game. FPS game or First-Person
God of war, the ghosts roaming in the Pac-Man game. Almost all Shooting game like Counter Strike, Overwatch, Battlefield and Call
of the games which is made since this time incorporate artificial of Duty is one of the famous types of game in the gaming world.
intelligence. The objective of this study is to implement Neural Networks to
achieve a dynamically adjusting difficulty of the game AI and
2. BACKGROUND OF THE STUDY compare it with DDA to know which algorithm will perform better
Bots in a computer game plays in the part of the game as if it is in terms of dynamism of the AI’s difficulty.
controlled by a human. They sometimes can be a part of the team
and have the same objectives as human. Game bots imitate the 3. CONCEPTUAL FRAMEWORK
human player, and it gives the illusion that is being controlled by a
real person. Today, bots in the famous MOBA (Multiplayer Online
Battle Arena) game DOTA 2 are programmed to attack opposing
players, run away if heavily attacked and when low in hit points,
build in-game items depending on their abilities and type. Thus,
this behavior makes them look intelligent.
The main goal of a game is to give entertainment and satisfaction
to its player. Developing realistic games helps the improvement of
players immersion which increases their satisfaction [Bowman and
McMahan 2007]. Although it is not the only way to make games
Figure 1. Conceptual Framework
more exciting and attractive. The player’s psychological factor is
also an influence in attraction to video games which requires the
This conceptual framework describes on how the system will work. even though DDA was admirable in terms of number of systems
Firstly, having all the necessary inputs needed. The instance will that are qualified in Excellent rating, the other system of DDA were
undergo through calculations of the variables to gather necessary crashed by the player. This graph concluded that, most of the
data to get the players performance to achieve an adaptive AI. After system in Neural Network works smoothly in terms of adaptation
getting all the necessary variables and multipliers, the system will compared to the DDA.
calculate all the formulas for each variables needed to make the
game difficulty dynamic. Finally, the output is the newly adjusted
difficulty of the AI.

4. FINDINGS AND RESULTS

Figure 4. System’s Performance Each Level


This graph shows the comparison of DDA and Neural Networks
performance, the graph shows that the game difficulty changes
dynamically along the course of the game. It says that both
algorithms achieved the dynamicity but from the results of the data
in chapter 4, DDA has slightly better performance compared to
Figure 2. Overall Performance per Player neural network. In conclusion, both algorithms achieved their goal
To determine the difference between the performance of the players which is to be dynamically difficult, but DDA is still better in terms
in DDA vs NN, a statistical method was used, namely the t-test of of systems performance compared to Neural Networks.
independent samples. The table and graphs below show the
comparison between the performance of the player in DDA and 4.1 What is the player’s performance when using
their performance in Neural Network overall. Dynamic Difficulty Adjustment in terms of:
Figure 2 shows the graph of overall performance of all the player a) lives left b) accuracy c) time spent
per level all throughout the game. As the game advancing, the
performance of the players becoming lower and lower because of Even though the performance in the DDA is higher, the Standard
the changing in the performance of the AI. Obviously, the level 1 Deviation per level is higher, this means that the values are
got the highest performance on both DDA, and Neural Network and scattered. Having a scattered value, especially in performance
level 10 got the worst performance. In this graph, the respondent’s signifies those values are varying and unsteady. The standard
performance in DDA from level 1 up to level 7 is higher than deviation happened due to the increasing stats of the enemy starting
Neural Network. In level 8, Neural Network tied to DDA. Level 9 from level 5 resulting them for having much more immunity which
and 10 was leaded by Neural Network. hobbled down the players to progress in the game thus, making the
average performance in the following levels lower. Lastly, the
number of players who finished the game is lesser compared to the
players who didn’t manage to complete the entire game.
In terms of the performance of the system using DDA, more than
half of the system participated in this research were enabled in
Excellent rating but the other system got a poor rating. This
concluded that DDA is just ranging from excellent to poor.

4.2. What is the player’s performance when using


Neural Networks in terms of:
a) lives left b) accuracy c) time spent
The mean of the player’s performance in NN is a little bit lower
compared to the DDA because of the much more diverse difficulty
Figure 3. Systems Performance: DDA vs. NN
every round. The scatterings of the value happened because of the
This is the system’s performance comparison per player. Based on implementation of NN because time to time, difficulty varies to
the graph, only 9 systems entered the Excellent rating in NN adjust to the player’s performance. In conclusion, we achieve much
compared to 12 systems that entered Excellent rating in DDA. But better dynamicity in NN compared to DDA but slightly lower score
there are 8 NN systems that qualified in Satisfactory rating in players’ performance. This is due to the real time adjustment of
comparing it to the only 3 systems from DDA. It means to say that the AI difficulty compared to the DDA which adjust every round
7 systems in DDA was outplayed by the player and in NN there are or level.
only 3 systems that was poor in rating. This graph showing that
In terms of the performance of the system using NN, this research different types of games including 2D and 2.5D games,
shown that most of the system participated in this research are VR games, Tower Defense, Touch games, ESports and
ranging from excellent to satisfactory which is a better performance many more.
that DDA.
5. Trying other programming languages such as Java,
4.3 Is there any significant difference between the Javascript or Python in developing the AI might affect
the flow of the Neural Network.
performance of the player in AI using Neural
Network and the performance of the player in AI
7. ACKNOWLEDGEMENTS
using Dynamic Difficulty Adjustment? We want to give our gratitude to the people who helped us to make
Based on the result of T test in performance all the player all this research possible. First, our family, the reason why we need to
throughout the game, the findings suggest that there is no achieve this goal. Second, our special someones that motivated us
significant difference between the performance of the player in AI to continue. Our beloved thesis adviser Prof. Michael dela Fuente,
using Neural Network and the performance of the player in AI who immediately responded to our calls, and gave his time and
using Dynamic Difficulty Adjustment. But on comparison of the effort for consultations and advice that we used to achieve our
player’s performance per category shows that there is small objectives. The respondents who helped us in gathering our data.
difference between them. And for the panels who crushed us to make our thesis better.

5. CONCLUSIONS 8. REFERENCES
This research concluded that there is no huge difference between [1] R. Foley and K. Kuhn, A Comparison of Genetic
AI using Neural Network and AI using DDA in terms of player’s Algorithms using Super Mario Bros., 2015
performance and system’s performance, but the proponents believe [2] T. E. Portegys, Training artificial neural networks to
that there are still some aspects that Neural Network is more learn a nondeterministic game
reliable than DDA like:
[3] A. Pfeifer, Creating Adaptive Game AI in a Real Time
1. Dynamically adapting to the player in real time. Continuous Environment using Neural Networks, 2009
2. Less player finished the game in DDA because the [4] P. Patel, Improving Computer Game Bots' behavior using
adjusted difficulty was harder than the difficulty in Q-Learning, 2009
Neural Network. [5] D.d M. Bourg and G. Seeman, AI for Game Developers,
3. Regarding the time consumed by the player in playing 2004
the levels, DDA performances are better than NN [6] G. N. Yannakakis, AI in Computer Games: Generating
because NN is changing dynamically real time while Interesting Interactive Opponents using Evolutionary
DDA is just changing per level. Computation, 2005
4. Based on the output of the system’s performance, the [7] A. Walther, AI for real-time strategy games, 2006
system of Neural Network appeared to be more [8] M. D. Gallagher, Essential Facts about the Computer
successful in adapting the difficulty based on the and Video Game Industry, 2015
performance of the player than the system of DDA..
[9] (2016) Statistics and facts about the Video Game
Industry. Available: www.Statista.com
6. RECOMMENDATIONS [10] http://searchcio.techtarget.com, DEFINITION AI
This study is successful in making Neural Network more dynamic
(Artificial Intelligence)
to make the game easier for novice players and hard for expert
players. However, there are still many ways to make this system [11] (2016) Definition of Game. Available:
more accurate and reliable in adapting to the player. www.dictionary.com
1. Considering other inputs in Neural Network can make [12] Game Engine. Available: www.unity3d.com
the system more flexible like the movement of the player, [13] K. N. Francisco, J. L. Ruste, R. A. Sagum, Y. S. Song,
the routine of the player, the strategy of the player, the and D. S. G. Sy, Incongruity Theory Applied in Dynamic
damage of the weapon and other in-game variables which Adaptive Game Artificial Intelligence, October 2013
can be a factor on the difficulty of the game. [14] Oskar Blakstad, https://explorable.com/experimental-
2. Having different spawn points for the bot and increase research, 2008
the bot number depending on players performance. [15] C. Moriarty and A. J. Gonzalez, Learning Human
3. Readjustment of several initial variables to make the Behavior from Observation for Gaming Applications,
game much easier for novice players. 2009
[16] P. Spronck and J. van den Herik, Game Artificial
4. The proponents also recommending implementing the
Intelligence that Adapts to the Human Player, 2004
idea of NN in adjusting the difficulty of the game on

You might also like