Machine learning and Gaming Industry (A technological dive-through)

Brijesh Kumar
7 min readNov 29, 2021

Gaming industry is undoubtedly an immensely large and an ever expanding industry in the tech sector. Video games have been around for quite some time now, providing entertainment to both children and adults alike. The opportunities in the field are endless, with the industry’s annual revenue crossing $120.1 billion in 2019 alone. As the tech and hardware around us evolve, so do the games that come along with them, hence making the video game creation process even more complex. Current day video game generation requires a wide variety of disciplines to work together in tandem, ranging from game engine programmers, physics programmers, sound engineers, scripters, game-play programmers, etc., and that is just scraping the surface of it. As the creation process gets more and more complex, it adds on to the cost of production of the game. However, with the help of several machine learning techniques and algorithms, video game publishers are able to ease out their tasks in various departments. We’ll be giving a thorough look through various applications of machine learning in the field of gaming.Machine Learning in game development

Machine learning is the ability for a system to learn and improve from experience or data, without being explicitly programmed. It is a subset of AI or ‘Artificial Intelligence.’ Various machine learning techniques are used in video game creation ranging from bots or NPCs controlled by machine learning algorithms to world creation and even texture up-scaling to make the games look much more aesthetically pleasing without requiring additional work or computational costs that come with them.

Bots powered by Machine Learning algorithms

Currently, the NPCs (Non-Playable-Characters) and the opponent that a player encounters in a video game have their behavior and attributes pre-scripted by a gameplay programmer. However, in order to increase the responsiveness of the game and to make it look much more realistic, machine learning algorithms are used to model their behaviors and attributes such that their difficulty level rises significantly. It happens because the algorithms learn from the players’ moves over time and help in making the game robust and much more unpredictable.
One such example could be OpenAI’s pet project:- OpenAI Five.
OpenAI Five is the name for the AI created by the team at OpenAI to create bots for an online multiplayer game Dota 2 by harnessing the power of Large Scale Deep Reinforcement Learning. The OpenAI team made the bots play against each other by playing about 10,000 years of games in order to learn the mechanics of the game, human-AI co-operating etc.
The results of the project were outstanding; it was able to defeat the world champions of the game i.e Redbull’s OG Gaming.
Thus, the applications of Machine Learning helped the gameplay programmers in saving up a lot of time and effort, since scripting a non-playable character of this skill would require hours and hours of hard work.

World Generation using AI

Another aspect of game development is level design or world design which requires thousands of developer and artist work hours to render. However, such a process can be simplified and a large and expansive world can be generated dynamically using AI. One such example is Microsoft Flight Simulator (2020). The developers used an AI solution to render the entire world without handcrafting all the 3D assets and textures by utilizing Azure cloud and an AI algorithm that analyzes map data and geometry from satellite scans to generate photorealistic 3D models and textures for terrain, buildings, foliage, etc, at runtime dynamically based on the region a person is visiting. This helps save up the space required by the game’s assets on a machine and even saves up development effort and increases the quality of the game.

Increasing graphical fidelity using AI

Making the game worlds look indistinguishable from the real world is another challenge but if done efficiently, can act as a cherry on the top. However, the higher the graphical fidelity of a game, the more would be the hardware costs. The primary hardware that is utilized to render game worlds and other graphics in the same is known as Graphics Processing Units or GPUs, as the gamers like to refer to them.
NVIDIA in 2019 introduced a technology known as DLSS (Deep Learning Super Sampling). This technology uses deep learning to upscale lower resolution images to a higher resolution for display on high-resolution systems. This allowed the developers to utilize low-resolution textures and UV maps inside games which were then upscaled to a higher resolution dynamically at run-time using minimal computation by the GPUs as compared to loading a higher resolution texture into the video memory. Hence, leading to better-looking worlds at minimal hardware costs.

DLSS
The difference in DLSS and native 4K frames

Automating character animation using AI

Another demanding aspect of game development is bringing the player, NPC models to life, i.e animating them. Animating a character requires hours of work and can be tedious and repetitive if being done on a wide variety of models. This process can be automated with the help of AI.
For example:- An upcoming role-playing game (RPG) Cyberpunk 2077, animated facial expressions and speech actions by harnessing the power of machine learning by using software developed specifically for the purpose known as JALI. It uses an acoustics model, a pronunciation dictionary, and a grapheme-to-phoneme model. This helped the developers animate the facial expressions of in-game characters in up to 10 languages without additional hard work.

Another example can be Adobe Mixamo. Mixamo’s technologies use machine learning methods to automate the steps of the character animation process, including 3D modeling to rigging and 3D animation.

Adobe Mixamo

Mixamo also continued to launch another product known as Mixamo Face Plus which allowed users to record their own facial expressions with a webcam and then use GPU accelerated machine learning algorithms to create facial feature animation inside a game engine’s characters. This helped a lot of individual developers save a lot of money as such a task would have required expensive motion capture equipment and specialists.

Adobe Mixamo Face Plus CC

Player experience modeling

The expertise a person has over a game can vary for different individuals. Therefore, having predefined difficulty levels in games can make the game less enjoyable for certain players based on their play style. Hence, adaptive difficulty levels can make the game much more challenging and interesting. This comes under player experience modeling, which means providing tailor-made experiences to players as per their level of expertise in real-time.
For example:- Crash Bandicoot, Archon: The Light and the Dark, and Flow are some video games that use dynamic game difficulty balancing. Game AI can also determine player intent through gesture recognition which enables players to communicate and interact with video games naturally without any mechanical devices.

Conclusion

Artificial intelligence is a vast field; stretching beyond new boundaries every day. It is expanding at a rapid rate and has established itself in almost all fields of tech and science; gaming is just one of them. The near future holds limitless possibilities and endless areas to explore in this domain. Its full potential is untapped yet.

Thus, we can say that this was just the tip of the iceberg. We cannot just put a limit on the benefits of AI in the gaming industry. As the future unfolds, we will see more and more games with AI controllers to optimize user experience like never before. Besides, AI will also provide a testing ground to game developers to improve their code and design to finally build a game that rocks the game charts.

Final Notes

I am a CS Undergrad, currently in my senior year pursuing B.Tech (CSE) from Bennett University, Greater Noida, India, who’s always looking forward to developing inter-disciplinary software projects. Find me on LinkedIn to connect with me.

--

--