PCG logo
Case Study

Evolving online games with AWS Machine Learning

customHeroImage
Introduction

The online gaming market is a competitive arena, and users demand engaging and challenging experiences. As well as providing the construction platforms for developing mobile apps, cloud computing also offers a new dimension in the form of affordable machine learning and the way it can inject new life into the gaming experience. Yatzy, a popular mobile gaming app, became an excellent demonstration of these new capabilities in practice.

About Fictional Factory Inc

Fictional Factory Inc is an Android game developer. Active since 2012, its current app portfolio includes 2 games, both listed in the "Board" category. Two of Fictional Factory Inc's most popular apps are Yatzy Online and Farkle Online - both of which have been installed more than 100,000 times.

The Challenge

Yatzy Online is a popular mobile gaming app with over 2 million downloads. This mobile Android and iOS app allows users of all ages, from all over the world, to play online, against themselves, the computer, or with other players. The app started in 2012. Since its launch, the platform has experienced continuous growth. With over two million downloads, Yatzy Online allows users to connect easily to play with friends or random players from all over the world. This mobile app was built for both Android and iOS. It was developed utilizing Node.js and React.js. and deployed using Amazon Web Services (AWS). It has recently undergone a powerful transformation to utilize Machine Learning as a part of its technology stack.

Yatzy Online was what we term at PCG as a “born in the cloud” solution, meaning, since conception the app has utilized powerful cloud technology to enhance functionality, scale, and control costs.

We have specifically utilized Amazon Web Services according to the following iterative timeline:

  • Deploy to Amazon EC2 in 2012
  • Migrate from MongoDB to Amazon DynamoDB
  • Enable human-like computer with Amazon SageMaker
  • Convert compute to AWS Lambda

We have taken this approach to achieve the following core outcomes, to iteratively improve game functionality, allow a large amount of data to be quickly accessible, and create a believable computer player.

image-3622686a3816
The Solution

In 2019, one of the continuous challenges the project was facing were limitations in the current computer player. Thus, a plan was created to utilize AWS Machine Learning services to optimize AI and human-like behavior.

The existing computer player was making category choices with the help of precalculated combinations and some calculations on the go. Since calculations take almost every dice combination, the computer player almost always has the predisposition to win the game, which would reduce the overall user experience.

Due to the fact that Yatzy Online already uses plenty of AWS services and is highly dependent on this ecosystem, the logical way to upgrade the application was to continue adding AWS services. We worked to assess what AWS services could allow for the building and training of machine learning models.

Several AWS services were used in order to collect the data, transform it, train a ML model and deploy it. The first step is to collect the data from the users i.e. players of the Yatzy Oline game. For this, Amazon Kinesis Data Firehose was used, which provides an easy way to reliably load the streaming data into Amazon Simple Storage Service (S3). Next, the data was filtered, and transformed into the format needed for the next step, using AWS Glue, a fully managed ETL (Extract, transform and load) service, and saved into Amazon Simple Storage Service (S3) in CVS format.

The entire process of ML model selection, training, validation, hyper-parameter tuning, and the deployment was done using Amazon SageMaker. Jupyter notebooks were used, provided by Amazon SageMaker notebooks with fully elastic underlying compute resources. Several built-in algorithms were tested and two, Linear Learner and XGBoost, were selected as performing well and were found to be well suited for the given multi-class classification problem. The hyperparameter tuning was also done using Amazon SageMaker i.e. by running a hyperparameter tuning job using the random strategy.

For the deployment of the algorithm an Amazon SageMaker endpoint, an AWS Lambda function, and an API gateway was created. The AWS Lambda function takes the data sent from the user, through the API gateway, transforms it to the right format and invokes the Amazon SageMaker endpoint. Following this, the prediction i.e. the category to be chosen is sent back to the user.

image-7ec07be232e7
Results and Benefits

The results of the validation of the model showed high classification accuracy. Furthermore, the machine learning model bases its output entirely on how the human player plays the game, so it feels much more human.Given the success of the project work will continue, future goals include optimizing existing services, with a continuation of adding more ML AWS services.

About PCG

Public Cloud Group (PCG) supports companies in their digital transformation through the use of public cloud solutions.

With a product portfolio designed to accompany organisations of all sizes in their cloud journey and competence that is a synonym for highly qualified staff that clients and partners like to work with, PCG is positioned as a reliable and trustworthy partner for the hyperscalers, relevant and with repeatedly validated competence and credibility.

We have the highest partnership status with the three relevant hyperscalers: Amazon Web Services (AWS), Google, and Microsoft. As experienced providers, we advise our customers independently with cloud implementation, application development, and managed services.


Services Used

Continue Reading

Article
VPC Endpoints: Explanation and Cost Comparison

In this blog post, I will explain what VPC Endpoints actually are. What are the differences between VPC Gateway and Interface Endpoints? What benefits do VPC Endpoints offer? Also, a cost breakdown of how much the VPC Endpoints cost, as well as a comparison of the costs to a NAT Gateway.

Learn more
Case Study
Software
Generative AI
Using AI to Transform Marketing for Small Producers

A detailed case study on Farsk.ai, a Swedish startup leveraging AI to help small producers market their products. It covers the challenges, AI-driven solutions, and the positive impact on user engagement and sales.

Learn more
Case Study
Software
With FSx Netapp for ONTAP to the Oracle database on AWS

The goal was to migrate the databases and associated applications to the AWS Cloud while maintaining high standards of performance, robustness and security.

Learn more
Article
Pain-free migration from Amazon Workdocs

Amazon WorkDocs is being discontinued in 2025. This article explores your options for alternative file storage and collaboration solutions and outlines the right steps to ensure a smooth transition for your business.

Learn more
See all

Let's work together

United Kingdom
Arrow Down