erikbern / deep-pink

Deep Pink is a chess AI that learns to play chess using deep learning.
http://erikbern.com/2014/11/29/deep-learning-for-chess/
813 stars 159 forks source link

Updated installation instructions #17

Open ghost opened 7 years ago

ghost commented 7 years ago

I've only started playing with the code (ran play.py but now more focused on the blog post), but here are my installation steps. I hope this helps someone.

This all assumes you have Anaconda installed on your machine and use Linux.

If you normally use Python 3, create a new environment for Python 2.7:

conda create -n python2 python=2.7

Environments are like alternate Python installations you can step into whenever you need to. Whenever you want to use the 2.7 environment, use

source activate python2

When installing packages and running deep-pink, make sure you're in a python 2.7 environment. Some of the dependencies can be installed with Anaconda:

conda install theano scikit-learn h5py

python-chess you can get through pip (will work through Anaconda):

pip install python-chess

Getting Sunfish is a little weirder, since I couldn't get conda or pip to get it. Instead, I cloned the repo git clone https://github.com/thomasahle/sunfish and just copied sunfish.py from it into deep-pink's directory. According the Sunfish's readme.md, it's self-contained in that one script.