Later, we'll run our IL algorithm on a revisited version of a famous game called Flappy Bird (https://en.wikipedia.org/wiki/Flappy_Bird). In this section, we'll give you all the commands needed to install it.
But before installing the environment of the game, we need to take care of a few additional libraries:
- In Ubuntu, the procedure is as follows:
$ sudo apt-get install git python3-dev python3-numpy libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev
$ sudo pip install pygame
- If you are a Mac user, you can install the libraries with the following commands:
$ brew install sdl sdl_ttf sdl_image sdl_mixer portmidi
$ pip install -c https://conda.binstar.org/quasiben pygame
- Then, for both Ubuntu and Mac users, the procedure is the following:
- First, you have to clone PLE. The cloning is done with the following line of code:
git clone https://github.com/ntasfi/PyGame-Learning-Environment
PLE is a set of environments that also includes Flappy Bird. Thus, by installing PLE, you'll obtain Flappy Bird.
- Then, you have to enter the PyGame-Learning-Environment folder:
cd PyGame-Learning-Environment
- And finally, run the installation with the following command:
sudo pip install -e .
Now, you should be able to use Flappy Bird.