Extending a Game Engine with Machine Learning and Artificial Intelligence

Loading...
Thumbnail Image

URL

Journal Title

Journal ISSN

Volume Title

Perustieteiden korkeakoulu | Master's thesis

Date

2019-06-17

Department

Major/Subject

Game Design and Production

Mcode

SCI3046

Degree programme

Master’s Programme in Computer, Communication and Information Sciences

Language

en

Pages

53

Series

Abstract

Since the early days of Artificial Intelligence (AI), video games have been a popular testbed for evaluating methods. However, not until a long time ago, this only included building AI agents for playing board games like chess. In the last decade, researchers have found out that games are also a rich source for other types of AI problems. At the same time, Machine Learning (ML) has entered its golden age with the advancements of deep learning. In games, this has led to a wide range of novel AI methods for solving various problems like playing games with super-human performance. Despite the significant advances, state-of-the-art AI methods are still far from being used in commercial games. One of the main reasons is that the tools used by researchers and game developers are different, which makes it difficult to use open-source codes in game projects. Furthermore, implementing these methods requires a moderate understanding of ML, which is not among the skill set of a regular game programmer. This calls for plug-and-play tools that enable game developers to deploy AI methods with minimum cost. In this thesis, we develop a library that enables game developers to use state-of-the-art ML methods in their commercial projects. This library integrates Tensorflow, a modern ML toolbox, into Unity, the most common game engine in the industry. This library uses C# with intuitive Keras-like API for building and training models. We have also implemented several state-of-the-art algorithms, including Proximal Policy Optimization (PPO), Matrix Adaptation Evolution Strategies (MA-ES), and Generative Adversarial Networks (GAN). This library can also be used along with Unity ML-Agents, the Unity plugin for building AI-training environments. Moreover, we provide various examples that demonstrate the library and the algorithms. One important example is a game called Calamachine Union, where the core game mechanic includes training the AI.

Description

Supervisor

Hämäläinen, Perttu

Thesis advisor

Hämäläinen, Perttu

Keywords

machine learning, games, AI, neural networks

Other note

Citation