项目作者: ostamand

项目描述 :
Collect more gift than an AI opponent in this fast-paced Christmas-themed game.
高级语言: C#
项目地址: git://github.com/ostamand/rolling-balls.git
创建时间: 2018-12-01T21:58:55Z
项目社区:https://github.com/ostamand/rolling-balls

开源协议:MIT License

下载


Rolling Balls of Christmas

logo

Introduction

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.

logo

  • To play the game navigate to the Download section. Available for Windows and Android.
  • To watch me play a game follow this youtube link.
  • To learn more on how the opponent was trained using reinforcement learning follow this link to my blog.
  • To train your own agent using the provided training environement with 12 parallel agents use these steps

Download

The game is available for Windows & Android.

  • Link for Windows. Extract the zipped folder & double click on the .exe to play.
  • Link for Android. Download to your device and install to easily add to your apps.

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.

Installation

To train your own agent follow the steps below.

Create a Python virtual environment.

  1. conda create --name rolling-balls python=3.6
  2. activate rolling-balls

Install ml-agents.

  1. git clone https://github.com/Unity-Technologies/ml-agents.git
  2. cd ml-agents
  3. git checkout 0.5.0a
  4. cd ml-agents
  5. pip install .

Clone this repository.

  1. 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).

  1. python train_rolling_ball.py