Giter Site home page Giter Site logo

zeta36 / using-google-neural-machine-translation-for-chess-movements-inference-tensorflow- Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 2.0 20.39 MB

Using (Google) Neural Machine Translation for chess movements inference (TensorFlow)

License: Apache License 2.0

Python 96.49% Shell 3.51%
tensorflow neural-machine-translation chess-position machine-learning

using-google-neural-machine-translation-for-chess-movements-inference-tensorflow-'s Introduction

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, Cho et al., 2014) 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 b

Target: Bg4

The 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:

w
/
1
p
r
n
b
q
k
P
R
N
B
Q
K

and the target vocabulary:

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.64

This means that, given a board state whatever, the model can predict in a seq2seq way a valid (and usually human) chess movement.

using-google-neural-machine-translation-for-chess-movements-inference-tensorflow-'s People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.