-
Notifications
You must be signed in to change notification settings - Fork 32
Installation Instructions
These installation instructions were tested on Ubuntu 14.04, but they should work across most unix distributions provided you have the proper packages. You will need git, g++, python, numpy, and for one of the example programs that displays to the screen you will need pygame and SDL.
Installation of ale_python_interface requires the installation of the Arcade Learning Environment. This interface currently only works with the version of the arcade learning environment available on their repository It does not work with the current 0.4.4 release, as they seem to have made changes to their API.
To install ALE from their github repository, run the following:
git clone https://github.com/mgbellemare/Arcade-Learning-Environment.git
cd Arcade-Learning-Environment
cp makefile.unix makefile
make
This will produce a libale.so shared object file that the ale_python_interface will need to load and link against during compilation. Make a note of the full directory for Arcade-Learning-Environment. Note that "make install" appears to be broken, it does not copy everything we need.
Before installing the ale_python_interface, be aware that it needs to find the Arcade Learning Environment to link against it as well as an include path to include the necessary header file. The easiest way to provide the locations is to edit your ~/.bashrc file and add the following lines to the bottom:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<PATH-TO_ARCADE-LEARNING-ENVIRONMENT>/
export LIBRARY_PATH=$LIBRARY_PATH:<PATH-TO_ARCADE-LEARNING-ENVIRONMENT>/
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:<PATH-TO_ARCADE-LEARNING-ENVIRONMENT>/src/
Where <PATH-TO_ARCADE-LEARNING-ENVIRONMENT> is the full path name to the location where the arcade learning environment was compiled (where the libale.so file can be found). You must replace this text with the correct path.
Once the environment variables for the paths have been set up, the ale_python_interface can be installed. To build ale_python_interface, first clone the repository
git clone https://github.com/bbitmaster/ale_python_interface.git
cd ale_python_interface
python setup.py build
python setup.py install
If you get an error when running python setup.py build, it probably means that your path has not been set correctly.
Once installation is complete, the easiest way to test that it is properly installed is to open a python terminal and type the following:
from ale_python_interface import ALEInterface
If this produces no errors, then it is installed correctly. Additionally, there are example programs in the /examples directory that can be ran.
Should these instructions not work, or if you have improvements to suggest, you are encouraged to open an issue on this repository.