Live data from Hacker News

Training GPT-2 to Play Chess

slatestarcodex.com

1–10 of 39 posts

Re: Training GPT-2 to Play Chess

#3
An amusing point from the comments

> It’s not even trying to be competitive, it’s just guessing how the game will continue. If you blunder, it might guess that this must be a game between two blundering fools, and play accordingly.

In a certain sense, GPT-2 is optimized to "look good to people interested in AI." Above all else it tries to generate plausibly-human-looking things, while completely oblivious of any other goal. This makes it an interesting fit for scenarios with objective scoring criteria. It may never be "good" at the scenario, only entertaining to human observers.

Re: Training GPT-2 to Play Chess

#4
This is the chess version of all those "type these two words into your phone and keep clicking the next word" memes

it's not going to generate anything meaningful, it's meant to get close enough to realistic to be either funny or interesting

I was very tickled.

Re: Training GPT-2 to Play Chess

#7

This is the chess version of all those "type these two words into your phone and keep clicking the next word" memes it's not going to generate anything meaningful, it's meant to get close enough to realistic to be either funny or interesting I was very tickled.

Similar, but GPT-2 is better at text prediction than the Markov chains used on your phone.

Re: Training GPT-2 to Play Chess

#8

An amusing point from the comments > It’s not even trying to be competitive, it’s just guessing how the game will continue. If you blunder, it might guess that this must be a game between two blundering fools, and play accordingly. In a certain sense, GPT-2 is optimized to "look good to people interested in AI." Above all else it tries to generate plausibly-human-looking things, while completely oblivious of any othe…

It’s a pity that the common annotation for a “surprising” move is to follow the move code with an examination mark (or two) rather than preceding it; otherwise we would have a simple way of making the model generate surprising moves on command. :)

Re: Training GPT-2 to Play Chess

#9
post #8

An amusing point from the comments > It’s not even trying to be competitive, it’s just guessing how the game will continue. If you blunder, it might guess that this must be a game between two blundering fools, and play accordingly. In a certain sense, GPT-2 is optimized to "look good to people interested in AI." Above all else it tries to generate plausibly-human-looking things, while completely oblivious of any othe…

It’s a pity that the common annotation for a “surprising” move is to follow the move code with an examination mark (or two) rather than preceding it; otherwise we would have a simple way of making the model generate surprising moves on command. :)

You could always train another model off reversed move notation and wrap it with something that reverses the output again. ;)

Re: Training GPT-2 to Play Chess

#10
Hello everybody. I made this notebook. If you like this kind of thing, please subscribe to gwern's patreon. https://patreon.com/gwern

It's a GPT-2 1.5B model trained on the kingbase 2019 dataset. (>3M games of >2000 ELO rating.) It was trained for 400k steps with batch size 6 using 140 TPUs in 24h using a technique known as swarm training. Here's an incomplete whitepaper on swarm training: https://www.docdroid.net/faDq8Bu/swarm-training-v01a.pdf

The dataset is available here:

  gsutil cp gs://gpt-2-poetry/data/kingbase-ftfy.txt .
Each line is of the form [Result "0-1"] [WhiteElo "2715"] [BlackElo "2793"] 1. e4 ...

Result 0-1 means black won; 1-0 means white won; 1/2-1/2 means a draw.

At runtime I prompt it with [Result "0-1"] and a high elo for white and black to make it more likely to generate higher level moves.

Our next project will be a GPT-2 IRC bot where you can talk with simulated people. We currently have one that wasn't trained for very long, yet the preliminary results are interesting enough to warrant a more serious time investment. https://twitter.com/theshawwn/status/1208667331230089216

Many people have asked for a thorough technical writeup which I hope to make available soon. In the meantime, you an read some of our GPT-2 1.5B adventures here: https://www.gwern.net/GPT-2#gpt-2-1.5b

Lastly, someone on /r/slatestarcodex apparently did this exact same thing a few months ago. They trained on algebraic notation instead of PGN format, which is basically x1y1x2y2 coordinate form with no mention of the type of piece. It was also trained on 1B moves. The engine is superior to ours and can apparently reach move 40 without blundering, according to the replay. https://www.reddit.com/r/slatestarcodex/comments/el87vo/a_ve...

I have also been porting the stylegan2 codebase to TPUs to facilitate swarm training. We hope to train on a very large dataset like the entirety of danbooru2018. No promises, but results are interesting so far. https://twitter.com/theshawwn/status/1214245145664802817

I hope you all found this enjoyable. The GCE bill is currently $50, which I'm keeping an eye on. (Go subscribe to gwern's patreon to see more projects like this!)

Post reply on HN