Git Product home page Git Product logo

deep-pink's People

Contributors

apeeyush avatar erikbern avatar thomasahle avatar vyasgiridhar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep-pink's Issues

Installing dependencies.

I'm having issues with installing all the dependencies, particularly hdf5. Can you describe more specifically the names of the packages you used and their versions, or post an install script which installs all the correct versions of these packages to create an environment which supports this code?

Missing INSTALL.md

I actually wanted to write one, but I got stuck... After

PYTHONPATH=$HOME/.local/lib/python2.7/site-packages/ easy_install --user numpy Theano python-chess cython h5py

It seems that itertools, heapq and pickle are available in core Python but I am still stuck how to get ahold of sunfish easily... as you can tell, my native language is not exactly Python...

A Doubt

Why does the computer always start with the same pawn?

float division by zero

Hi, I got an error when running train.py
I have already download pgn files in the working directory.
When creating function get_data:

test_size = 10000.0 / len(data[0])
print('Splitting', len(data[0]), 'entries into train/test set')
data = train_test_split(*data, test_size=test_size)

len(data[0]) is 0. So comes to the error.
Do you know how to fix that?
I'm sure I have already downloaded pgn files and run parse_game.py at first

Deep Pink GUI and Chess Engine

Hello,
is Deep Pink a GUI that works only with pychess and sunfish, or can external XB/WB-chess engines e.g. Crafty, GNUChess respectively UCI-chess programs e.g. Stockfish, Toga be embedded into this application too?

concerning Deep Pink Chess Engine:
What´s about implementation of two very common chess protocols UCI respectively WinBoard/XBoard a.k.a. CECP?
http://www.shredderchess.com/download.html - http://download.shredderchess.com/div/uci.zip
http://home.hccnet.nl/h.g.muller/engine-intf.html - http://home.hccnet.nl/h.g.muller/engine-intf.html

bb2array in parse_game.py

Hi. I have some problem while using your tool. There was TypeError: 'instancemethod' object is not iterable. I think that is because you use iterating in function b.pieces. How can I fix this problem and why it appears? Is it only my problem?

AssertionError - assert(gn_current.board().turn == 0)

I'm getting AssertionErrors when trying to run play.py, with the output looking like this:

maxd 1.000000 maxn 278.426311
Traceback (most recent call last):
  File "C:\Users\Lol\Desktop\deep-pink-master\deep-pink-master\play.py", line 226, in game
    gn_current = player.move(gn_current)
  File "C:\Users\Lol\Desktop\deep-pink-master\deep-pink-master\play.py", line 119, in move
    assert(gn_current.board().turn == 0)
AssertionError

and keeps repeating itself. Any idea on how to fix this?

New branch with Python3 support and Dockerfile

Hi, @erikbern. First of all, congratulations for the hard work.

I've forked your repo and updated it to use Python3 (3.6.7).
I've also created a Dockerfile to setup an image that has all dependencies installed.

If you see value on this, please create a branch called py3 and then I'll open a PR on it.

Here is the code.

Updated installation instructions

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.

Loss function seems incorrect??

Hello! I have been reading your article on this and implementing it myself to learn pytorch. However, I am a bit confused by your loss function. specifically, why do you include the term:
-log(sigmoid(f(q)-f(r)) and not -log(sigmoid(f(r)-f(q))? Don't we want to reward f(r)>f(q) with low loss, and punish f(r)<f(q) with high loss, and not the other way around? Just looking for an explanation so I understand :)

Error loading pickle file : Multiarray module not found

I have installed numpy in my ubuntu and window machine.
When it is loading the pickle file in play.py, it is throwing an import error:

I have tried importing numpy.core.multiarray and its working fine , but pickle object is not able to be loaded ?

ImportError: No module named multiarray.

Help is urgently required!
Thanks!

Sunfish search error

When I run play.py, i get the following error:

Traceback (most recent call last):
File "play.py", line 226, in game
gn_current = player.move(gn_current)
File "play.py", line 196, in move
move, score = sunfish.search(self._pos, maxn=self._maxn)
AttributeError: 'module' object has no attribute 'search'

What does this error mean?

Why game move is too slow?

Hi again. I've solved problem with the bb2array and start the tool. The model was learned on only 827 games. So it plays very slowly. How I should fix it? Was this problem appeared before?

Downloading Some Dependencies resulted in Pygame not working anymore

Downloading Some Dependencies resulted in Pygame not working anymore. Tried reinstalling everything and it didn't solve anything. Using a Mac Yosemite 10.10 Python 2.7 Enthought Canopy heres the error:

ImportError: dlopen(/Users/Patrick/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/pygame/base.so, 2): Symbol not found: _SDL_EnableUNICODE
Referenced from: /Users/Patrick/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/pygame/base.so
Expected in: flat namespace
in /Users/Patrick/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/pygame/base.so

I think the paths were changed somehow but i dont know how to fix them. Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.