Fictional Factory Inc is an Android game developer that has been active since 2012. The current app portfolio contains 2 games, all of which are listed in the category "Board". Two of the most important apps from Fictional Factory Inc are Yatzy Online and Farkle Online. Both of them have been installed more than 100 thousand times.
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.
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 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.
At Miracle Mill, we are passionate entrepreneurs and engineers, that work to utilise modern cutting-edge cloud technology. We are a cloud first company focused on building scalable applications utilising AWS cloud services.
We provide cloud consulting services with an Agile iterative approach to software development using DevOps methodologies.