What is Yatzy Online?

Yatzy Online is a popular mobile gaming app with other 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.

“Born in the Cloud”

Yatzy Online was what we term at Miracle Mill 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 following 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.

Building a Human Element

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 current 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.

The Results

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.

Do you have an existing or proposed product that is using machine learning? Reach out to Miracle Mill today and allow our dedicated team of Machine Learning Data Scientists to engage in making your goals a reality.

Let's Work
Together

Drop us a line