An amusing point from the comments<p>> 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.<p>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.
Reminds me of an old project of mine: n-gram chess. Similarly ok in openings, awful in endgames, and generally bad at chess.<p><a href="https://github.com/ElliotPenson/n-gram-chess" rel="nofollow">https://github.com/ElliotPenson/n-gram-chess</a>
I made similar chess engine using FastText: <a href="https://github.com/thomasahle/fastchess" rel="nofollow">https://github.com/thomasahle/fastchess</a><p>It is surprising to me that you can predict optimal/strong engine moves with 27% accuracy using a completely trivial linear model, that is by a single matrix multiplication.<p>I wonder how well it would compete with this GPT-2 engine.
GPT-2 is byte pair encoding and transformer. Is there any indication that BPE plays any role here, because the vocabulary is fixed? If not, then it is only the transformer that is interesting and this post is just trying to use the name of the model, because it sounds cool. And actually giving moves directly to transformer may improve the results.
This is the chess version of all those "type these two words into your phone and keep clicking the next word" memes<p>it's not going to generate anything meaningful, it's meant to get close enough to realistic to be either funny or interesting<p>I was very tickled.
This is amusing but doesn't really prove anything special about GPT-2 or general intelligence. You can probably get similar results with an n-gram model.
>> How impressed should we be that the same AI can write poems, compose music, and play chess, without having been designed for any of those tasks? I still don’t know.<p>For the record, you can do the same things with a Hidden Markov Model (or hand-crafted rules) and the results won't be very different. Except that they won't elicit breatheless articles about being a "step towards general intelligence".
Hello everybody. I made this notebook. If you like this kind of thing, please subscribe to gwern's patreon. <a href="https://patreon.com/gwern" rel="nofollow">https://patreon.com/gwern</a><p>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: <a href="https://www.docdroid.net/faDq8Bu/swarm-training-v01a.pdf" rel="nofollow">https://www.docdroid.net/faDq8Bu/swarm-training-v01a.pdf</a><p>The dataset is available here:<p><pre><code> gsutil cp gs://gpt-2-poetry/data/kingbase-ftfy.txt .
</code></pre>
Each line is of the form [Result "0-1"] [WhiteElo "2715"] [BlackElo "2793"] 1. e4 ...<p>Result 0-1 means black won; 1-0 means white won; 1/2-1/2 means a draw.<p>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.<p>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. <a href="https://twitter.com/theshawwn/status/1208667331230089216" rel="nofollow">https://twitter.com/theshawwn/status/1208667331230089216</a><p>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: <a href="https://www.gwern.net/GPT-2#gpt-2-1.5b" rel="nofollow">https://www.gwern.net/GPT-2#gpt-2-1.5b</a><p>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. <a href="https://www.reddit.com/r/slatestarcodex/comments/el87vo/a_very_unlikely_chess_game/fdh0vqd/" rel="nofollow">https://www.reddit.com/r/slatestarcodex/comments/el87vo/a_ve...</a><p>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. <a href="https://twitter.com/theshawwn/status/1214245145664802817" rel="nofollow">https://twitter.com/theshawwn/status/1214245145664802817</a><p>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!)
1.e4 e5 2.Ke2 Nc6 3.Kf3 g6 4.Kg4 Bg7 5.Nf3 h6 6.Nxe5 Bxe5 7.d4 Bg7 8. e5 at this point the notebook started allocating more memory and after it became irresponsive.
> GPT2 Chess update: I wrote some code to calculate the probability of all valid chess moves. It can reach endgame now.[0]<p>Shocking. Our AI overlords will soon stumble into power, if we only point out where they're slipping up.<p>[0] <a href="https://twitter.com/theshawwn/status/1213559429293060099" rel="nofollow">https://twitter.com/theshawwn/status/1213559429293060099</a>
Funny attempt! Challenge: win by minimizing the number of moves. My record so far is mate in 8 moves: <a href="https://lichess.org/pG4S7RcF" rel="nofollow">https://lichess.org/pG4S7RcF</a>
this is hilarious and also a great idea. i dont see any reason why you can't play a few million games against itself and other engines and see where it takes you. less efficient than alpha zero probably, but how much so?