Selfplay training server

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Selfplay training server

Post by Daniel Shawul »

I have finally gobbled up a server-client framework for training neural networks for chess and other games.
This was possible after I bought hardware, powerful enough for training and handling client requests.
The server-client model is made of a bunch of scripts with some java backend for socket connections.
I am pretty sure no one would write something like this for real applications, but it seems to work for my purpose.
For one, there is no user authentication in place. You get in contribute and get out, no way to know how much contribution
you made at the moment.

Right now it does not have a database backend, nor has it a web interface -- although the latter in the works for atleast
viewing the training games.

The server is currently running some useless training of a 2x32 net with 1-node playouts just for testing purposes.
This will ofcourse change once all the bugs are sorted out.

The client is at : https://github.com/dshawul/nn-dist
To start contributing clone that repository and execute either "client.bat" or "client.sh".
You need java runtime library to run the client, the compiler shouldn't be necessary though as the java byte code is provided in the repo.
This should automatically install scorpio, connect to server and start contributing training games. I have had surprizes with
the windows batch scripts so please do let me know if you encounter problems.

If somebody wants to contribute to the training code, I am more than happy to do so. I am a newbie in this
so glad to hand over the code.

I discuss with Chris a while ago about a public-domain chess neural networks, so this is what came of it.
If you contribute to the training, or technically even if you didn't although i prefer you did contribute, you get the nets for free
with no strings attached...

Let me know what you think
Daniel
noobpwnftw
Posts: 560
Joined: Sun Nov 08, 2015 11:10 pm

Re: Selfplay training server

Post by noobpwnftw »

So 1, how do you trust your contributors in their work, what's stopping them from submitting random junk instead? 2, do you have a plan to take in labeled data?
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Selfplay training server

Post by Daniel Shawul »

noobpwnftw wrote: Sat Jul 27, 2019 2:31 am So 1, how do you trust your contributors in their work, what's stopping them from submitting random junk instead? 2, do you have a plan to take in labeled data?
Yes, that is a big problem. I just don't have the skills or the time to do all the things that a proper server/client framework needs.
But I agree having a way to account for user's contribution's is a big motivation factor and will strive to do it.
Note that I am a newbie in this and if someone is willing to help or take over, I am more than happy to hand over the project.
Currently the only solution to "junk data" attacks would be to restart training from the point where things went south.
Like all newbies do, I trust the user would not do that :)

The server-client communicate the PGN file as well as a "labelled" epd. The labelled epd has epd strings and the probabilities of each move in
text format. So if you want to feed it a PGN all you have to do is send one move with probablity 1 for each position so it is possible. Should
be possible to write a script for feeding the server PGN data.

Daniel
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Selfplay training server

Post by Michel »

Daniel Shawul wrote: Sat Jul 27, 2019 2:51 am
noobpwnftw wrote: Sat Jul 27, 2019 2:31 am So 1, how do you trust your contributors in their work, what's stopping them from submitting random junk instead? 2, do you have a plan to take in labeled data?
Yes, that is a big problem. I just don't have the skills or the time to do all the things that a proper server/client framework needs.
But I agree having a way to account for user's contribution's is a big motivation factor and will strive to do it.
Note that I am a newbie in this and if someone is willing to help or take over, I am more than happy to hand over the project.
Currently the only solution to "junk data" attacks would be to restart training from the point where things went south.
Like all newbies do, I trust the user would not do that :)

The server-client communicate the PGN file as well as a "labelled" epd. The labelled epd has epd strings and the probabilities of each move in
text format. So if you want to feed it a PGN all you have to do is send one move with probablity 1 for each position so it is possible. Should
be possible to write a script for feeding the server PGN data.

Daniel
Hi Daniel,

I am curious. Why do you start from scratch and not from the lc0 training framework?
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Selfplay training server

Post by Daniel Shawul »

I am inquiring about that. If I can get someone knowledgeable to help with the server setup
that would be great. I don't know how hard it would be to modify it for chess variants and other games.
If the lc0 server-client do not have chess specific codes ( or has them isolated from the server/client code),
it should not be difficult to modify it for my purpose.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Selfplay training server

Post by Daniel Shawul »

Things have improved now.
There is now a database backend that authenticates user's identities and also keeps track of their contribution.

I have also added a simple website that allows one to view match games, download networks and all the data used
for training etc.

http://scorpiozero.ddns.net

Right now I am training a 2x32 net using 800 playouts. I am the only active user at the moment so this is going to be slow.

Please contribute using the client provided on the webpage!

Thanks,
Daniel
Robert Pope
Posts: 558
Joined: Sat Mar 25, 2006 8:27 pm

Re: Selfplay training server

Post by Robert Pope »

Michel wrote: Sat Jul 27, 2019 4:24 am
Daniel Shawul wrote: Sat Jul 27, 2019 2:51 am
noobpwnftw wrote: Sat Jul 27, 2019 2:31 am So 1, how do you trust your contributors in their work, what's stopping them from submitting random junk instead? 2, do you have a plan to take in labeled data?
Yes, that is a big problem. I just don't have the skills or the time to do all the things that a proper server/client framework needs.
But I agree having a way to account for user's contribution's is a big motivation factor and will strive to do it.
Note that I am a newbie in this and if someone is willing to help or take over, I am more than happy to hand over the project.
Currently the only solution to "junk data" attacks would be to restart training from the point where things went south.
Like all newbies do, I trust the user would not do that :)

The server-client communicate the PGN file as well as a "labelled" epd. The labelled epd has epd strings and the probabilities of each move in
text format. So if you want to feed it a PGN all you have to do is send one move with probablity 1 for each position so it is possible. Should
be possible to write a script for feeding the server PGN data.

Daniel
Hi Daniel,

I am curious. Why do you start from scratch and not from the lc0 training framework?
The world is a richer place when we have diversity of all kinds.
Last edited by Robert Pope on Mon Jul 29, 2019 3:28 pm, edited 1 time in total.
Robert Pope
Posts: 558
Joined: Sat Mar 25, 2006 8:27 pm

Re: Selfplay training server

Post by Robert Pope »

Can't figure out how to delete. I'm glad there are people trying their own approaches, but I didn't realize Michel was asking specifically about the training server code.