Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeta36/using-google-neural-machine-translation-for-chess-movements-inference-tensorflow-
Using (Google) Neural Machine Translation for chess movements inference (TensorFlow)
https://github.com/zeta36/using-google-neural-machine-translation-for-chess-movements-inference-tensorflow-
chess-position machine-learning neural-machine-translation tensorflow
Last synced: 18 days ago
JSON representation
Using (Google) Neural Machine Translation for chess movements inference (TensorFlow)
- Host: GitHub
- URL: https://github.com/zeta36/using-google-neural-machine-translation-for-chess-movements-inference-tensorflow-
- Owner: Zeta36
- License: apache-2.0
- Created: 2017-07-17T06:22:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T07:24:49.000Z (over 7 years ago)
- Last Synced: 2024-10-29T08:04:56.042Z (2 months ago)
- Topics: chess-position, machine-learning, neural-machine-translation, tensorflow
- Language: Python
- Homepage:
- Size: 19.9 MB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Using (Google) Neural Machine Translation for chess movements inference
Somedays ago a free version of the source code of the GNMT (Google Neural Machine Translation) was release in: https://github.com/tensorflow/nmt
by Thang Luong, Eugene Brevdo, Rui Zhao
# Introduction
Sequence-to-sequence (seq2seq) models
([Sutskever et al., 2014](https://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf),
[Cho et al., 2014](http://emnlp2014.org/papers/pdf/EMNLP2014179.pdf)) have
enjoyed great success in a variety of tasks such as machine translation, speech
recognition, and text summarization.I've used the release of this seq2seq to show the power of the model. Using a vocabulary with just de numbers and letters
(the symbols) used for the chess algebraic notation, I was able to train a model to infer the movement a human would do given
a table state.The supervised learning uses then source-target pairs of the form:
Source:
rnq1kb1r/pp11ppp1/11p11n11/1111111p/11111111/11111NPb/PPPP1P1P/RNBQR1KB bTarget:
Bg4The source is the state of the board, and the target the movement a human would do in this situation.
In this way the source vocabulary was:
``` python
w
/
1
p
r
n
b
q
k
P
R
N
B
Q
K
```and the target vocabulary:
``` python
p
r
n
b
q
k
P
R
N
B
Q
K
x
+
O
-
1
2
3
4
5
6
7
8
a
c
d
e
f
g
h
=
```# Results
Using a NMT + GNMT attention (2 layers) the model was able to reach a good result with:
eval dev: perplexity 2.83
eval test: perplexity 3.07
global training step 72100 lr 0.868126 step-time 0.51s wps 9.57K ppl 2.76 bleu 20.64This means that, given a board state whatever, the model can predict in a seq2seq way a valid (and usually human)
chess movement.