Collect more gift than an AI opponent in this fast-paced Christmas-themed game.
Rolling Balls of Christmas is a fast-paced game where you get to play against an AI opponent trained through a reinforcement learning algorithm.
The rules are simple. Both the player (in green) and the opponent (in red) control a ball sitting on a square platform while a gift (the target) is also located on it. Each time either the player or the opponent reaches the gift it gets one point. Inversely, each time a ball falls off the platform the respective opponent gets one point. The first one to get to 20 points wins the game. Each level the opponents gets better.
The game is available for Windows & Android.
To move the ball on Windows use either the arrows or the W (up), A (left), S (down) and D (down) keys. On a mobile device use the provided control at the bottom right of the screen.
To train your own agent follow the steps below.
Create a Python virtual environment.
conda create --name rolling-balls python=3.6
activate rolling-balls
Install ml-agents.
git clone https://github.com/Unity-Technologies/ml-agents.git
cd ml-agents
git checkout 0.5.0a
cd ml-agents
pip install .
Clone this repository.
git clone https://github.com/ostamand/rolling-balls.git
Download the training environment and copy/paste the content of the extracted folder to Training/data
Train the agent using the included PPO algorithm (or use your own).
python train_rolling_ball.py