Survival AI game

Survival AI Game is a small game aimed at explaining the risk of bias in AI to non-technical audiences.

This project was the final project of my 3rd year of Bachelor in Reims. The objective was to upgrade an existing project for a presentation that would later be given by researchers from the University of Reims to help explain AI to the general public.

The idea is to show that if you train an AI model on a user’s behavior, the model can learn the same biases as the player. In theory, a “good” AI should perform as well as possible, but if the player (who creates the training data by playing) consistently makes poor or harmful choices, the AI may learn to reproduce those choices.

As a result, by playing in a specific way, the AI model can mirror the player’s biases and may even amplify them.

Quick Technical Overview

We decided to fully rewrite the application from the ground up, switching from a Python project to a web-based project. We used Svelte to build the web application, which made it easier to deploy on phones (a key requirement for this project).

We also chose to train the AI model locally on the phone. For this, we used TensorFlow.js, which allows us to create, train, and run a model in JavaScript without a server. This makes deployment easier because we don’t require an internet connection once the page has loaded. It also means that if the server goes down after the page loads, the presentation can still run.

Finally, the goal was to train the AI in real time as the player plays. We simply re-ran training every X steps in the game using the board state, the player position, and the next move (up to the most recent one).

If you are curious, take a look at the repository.
Note: check the branches, as we did not merge them into main properly (especially for the AI part).