Artificial Intelligence in Games

Original article was published on Artificial Intelligence on Medium

Artificial Intelligence in Games

Photo by Rock’n Roll Monkey on Unsplash

In my previous blog I explained what Artificial Intelligence is, in this blog I will mainly talk about how Artificial Intelligence helps both in developing a game and also in the user experience of the gamer. Personally I always enjoyed gaming and from a gamer’s perspective I believe that in single player games like The Witcher or Skyrim, non-player characters(NPC) help in forming the story and to give a formidable enemy to fight against. In competitive online games like rocket league, where a bot (a character controlled by an Artificial Intelligence) is given to replace a person that left the game or that has lost connection, bots are normally not considered great when compared to the other players.

In my previous blog I explained what Artificial Intelligence is, in this blog I will mainly talk about how Artificial Intelligence helps both in developing a game and also in the user experience of the gamer. Personally I always enjoyed gaming and from a gamer’s perspective I believe that in single player games like The Witcher or Skyrim, non-player characters(NPC) help in forming the story and to give a formidable enemy to fight against. In competitive online games like rocket league, where a bot (a character controlled by an Artificial Intelligence) is given to replace a person that left the game or that has lost connection, bots are normally not considered great when compared to the other players.

Bots and NPCs

Artificial Intelligence in games doesn’t have to learn anything in particular to be a good opponent or a non-player character. For example in Wolfenstein 3D (1992) we can see NPCs which evaluate the situation and react according to their programming code. The developers considered all of the possible situations an enemy soldier could experience and then programmed each experience in a different way. This method is called Finite State Machine (FSM) and this has been used as a way to make the NPCs look more intelligent. In strategy games a different type of method is used to give a more competitive idea for the game. This method is called the Monte Carlo Search Tree (MCST) algorithm was created to prevent the repeatability aspect of FSM. This method evaluates the options that the player has per round, and then evaluates what options it has according to every option the player has (Maass, 2019). It is very similar to the gameplay in chess where you need to evaluate future plays before you actually make a move. In fact, this was the Artificial Intelligence Algorithm that was used to beat the chess champion in 1997. Artificial Intelligence has always been used to create a better reality and a better user-experience. The only games that use NPCs that use an Artificial Intelligence which learns, are normally found in digital pet games like Petz. Here we can see that the player can train the pets just like in real life, every player has a different way of training their pets so the digitized pets also become personalized, resulting in a stronger bond between the pet and the player. This is also the reason why not a lot of developers use similar AI which can learn in their games, because it might affect the user-experience. With every player the AI might react in a different way which results in a different user-experience for every player and this is very unpredictable for a game developer to balance the game (Chong, et al., 2017).

Using Artificial Intelligence to beat games

Photo by Randy Fath on Unsplash

When creating artificial neural networks to beat games you are not creating them for a better user experience. These types of Artificial Intelligence are created to continue making the software more intelligent, and to create stronger AI. With these types of AI, we are practically saying that yes, an AI is better than a human in this particular game. This can be seen in the example that I’ve given when Russian grand master chess champion Garry Kasparov was bested by Artificial Intelligence back in 1997. Similar AI have been developed to beat different games. For example recently an Artificial Intelligence has successfully beaten a professional Dota 2 team (Statt, 2019). The you tube channel that has introduced me to Artificial Intelligence, CodeBullet, picks a game and creates a neural network to beat it. I recommend watching his video where he creates an Artificial Intelligence to beat Hill Climb Racing. It is really interesting to see how the AI reacts to new challenges.

Conclusion

Personally, it really interests me that we are actually playing with Artificial Intelligence in most of the games, and how they are an important factor on how we actually felt about the game. If this particular topic interests you I suggest you give a look to AI and Games, a you tube channel which takes a particular game and explains the AI and how it works. This is a great example on how Artificial Intelligence is a tool to improve something or a type of art (yes, games are a type of art). In my next blog I will be talking about Artificial Intelligence in Music so stay tuned.

References

Chong, D., Tomlin, J., Mahesh, Olujomoye, O., Vidrio, Chang, S., & JR, S. P. P. (2017, August 28). AI in Video Games: Toward a More Intelligent Game. Retrieved from http://sitn.hms.harvard.edu/flash/2017/ai-video-games-toward-intelligent-game/

Maass, L. E. S. (2019, July 1). Artificial Intelligence in Video Games. Retrieved from https://towardsdatascience.com/artificial-intelligence-in-video-games-3e2566d59c22

Statt, N. (2019, March 6). How artificial intelligence will revolutionize the way video games are developed and played. Retrieved from https://www.theverge.com/2019/3/6/18222203/video-game-ai-future-procedural-generation-deep-learning

Writer, A. I. T. S. (2020, February 19). Understanding the Role of AI in Gaming. Retrieved from https://www.aithority.com/computer-games/understanding-the-role-of-ai-in-gaming/