TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Training GPT-2 to Play Chess

157 点作者 simulate超过 5 年前

13 条评论

dwohnitmok超过 5 年前
An amusing point from the comments<p>&gt; 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 &quot;look good to people interested in AI.&quot; 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 &quot;good&quot; at the scenario, only entertaining to human observers.
评论 #21987265 未加载
评论 #21989492 未加载
epenson超过 5 年前
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:&#x2F;&#x2F;github.com&#x2F;ElliotPenson&#x2F;n-gram-chess" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ElliotPenson&#x2F;n-gram-chess</a>
评论 #21989599 未加载
评论 #21990293 未加载
thomasahle超过 5 年前
I made similar chess engine using FastText: <a href="https:&#x2F;&#x2F;github.com&#x2F;thomasahle&#x2F;fastchess" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;thomasahle&#x2F;fastchess</a><p>It is surprising to me that you can predict optimal&#x2F;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.
veselin超过 5 年前
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.
评论 #21987531 未加载
TehShrike超过 5 年前
This is the chess version of all those &quot;type these two words into your phone and keep clicking the next word&quot; memes<p>it&#x27;s not going to generate anything meaningful, it&#x27;s meant to get close enough to realistic to be either funny or interesting<p>I was very tickled.
评论 #21987181 未加载
amasad超过 5 年前
This is amusing but doesn&#x27;t really prove anything special about GPT-2 or general intelligence. You can probably get similar results with an n-gram model.
评论 #21988920 未加载
YeGoblynQueenne超过 5 年前
&gt;&gt; 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&#x27;t be very different. Except that they won&#x27;t elicit breatheless articles about being a &quot;step towards general intelligence&quot;.
评论 #21994220 未加载
sillysaurusx超过 5 年前
Hello everybody. I made this notebook. If you like this kind of thing, please subscribe to gwern&#x27;s patreon. <a href="https:&#x2F;&#x2F;patreon.com&#x2F;gwern" rel="nofollow">https:&#x2F;&#x2F;patreon.com&#x2F;gwern</a><p>It&#x27;s a GPT-2 1.5B model trained on the kingbase 2019 dataset. (&gt;3M games of &gt;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&#x27;s an incomplete whitepaper on swarm training: <a href="https:&#x2F;&#x2F;www.docdroid.net&#x2F;faDq8Bu&#x2F;swarm-training-v01a.pdf" rel="nofollow">https:&#x2F;&#x2F;www.docdroid.net&#x2F;faDq8Bu&#x2F;swarm-training-v01a.pdf</a><p>The dataset is available here:<p><pre><code> gsutil cp gs:&#x2F;&#x2F;gpt-2-poetry&#x2F;data&#x2F;kingbase-ftfy.txt . </code></pre> Each line is of the form [Result &quot;0-1&quot;] [WhiteElo &quot;2715&quot;] [BlackElo &quot;2793&quot;] 1. e4 ...<p>Result 0-1 means black won; 1-0 means white won; 1&#x2F;2-1&#x2F;2 means a draw.<p>At runtime I prompt it with [Result &quot;0-1&quot;] 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&#x27;t trained for very long, yet the preliminary results are interesting enough to warrant a more serious time investment. <a href="https:&#x2F;&#x2F;twitter.com&#x2F;theshawwn&#x2F;status&#x2F;1208667331230089216" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;theshawwn&#x2F;status&#x2F;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:&#x2F;&#x2F;www.gwern.net&#x2F;GPT-2#gpt-2-1.5b" rel="nofollow">https:&#x2F;&#x2F;www.gwern.net&#x2F;GPT-2#gpt-2-1.5b</a><p>Lastly, someone on &#x2F;r&#x2F;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:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;slatestarcodex&#x2F;comments&#x2F;el87vo&#x2F;a_very_unlikely_chess_game&#x2F;fdh0vqd&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;slatestarcodex&#x2F;comments&#x2F;el87vo&#x2F;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:&#x2F;&#x2F;twitter.com&#x2F;theshawwn&#x2F;status&#x2F;1214245145664802817" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;theshawwn&#x2F;status&#x2F;1214245145664802817</a><p>I hope you all found this enjoyable. The GCE bill is currently $50, which I&#x27;m keeping an eye on. (Go subscribe to gwern&#x27;s patreon to see more projects like this!)
empath75超过 5 年前
Seems like it just memorized openings.
评论 #21987472 未加载
asdfefasdfeb超过 5 年前
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.
评论 #21987793 未加载
AlexCoventry超过 5 年前
&gt; 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&#x27;re slipping up.<p>[0] <a href="https:&#x2F;&#x2F;twitter.com&#x2F;theshawwn&#x2F;status&#x2F;1213559429293060099" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;theshawwn&#x2F;status&#x2F;1213559429293060099</a>
macherm超过 5 年前
Funny attempt! Challenge: win by minimizing the number of moves. My record so far is mate in 8 moves: <a href="https:&#x2F;&#x2F;lichess.org&#x2F;pG4S7RcF" rel="nofollow">https:&#x2F;&#x2F;lichess.org&#x2F;pG4S7RcF</a>
wwarner超过 5 年前
this is hilarious and also a great idea. i dont see any reason why you can&#x27;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?
评论 #21987403 未加载