{"id":437506,"date":"2023-02-25T12:00:00","date_gmt":"2023-02-25T11:00:00","guid":{"rendered":"https:\/\/innovationorigins.com\/?p=437506"},"modified":"2023-02-25T12:00:00","modified_gmt":"2023-02-25T11:00:00","slug":"chatgpt-cant-play-chess-and-heres-the-reason-why","status":"publish","type":"post","link":"https:\/\/ioplus.nl\/archive\/en\/chatgpt-cant-play-chess-and-heres-the-reason-why\/","title":{"rendered":"ChatGPT is great, just not at chess"},"content":{"rendered":"\n<p><a href=\"https:\/\/openai.com\/blog\/chatgpt\/\">ChatGPT<\/a> &nbsp;is all the rage right now. So much so that we seem to forget what it actually is: a language model. And that means it isn\u2019t suited for all kinds of tasks that other machines are already capable of. Like playing chess, for one thing. <\/p>\n\n\n\n<p>ChatGTP&#8217;s performance in terms of language is undoubtedly impressive. But that doesn&#8217;t mean the system can do anything. Playing chess against ChatGPT is nothing short of hilarious. This <em>Open AI\u2019s Large Language Model <\/em>(LLM) just can\u2019t seem to play either coherently or even abide by the rules, let alone play well.<\/p>\n\n\n\n<p>An entertaining example is YouTuber and International Master Levy Rozman\u2019s (<a href=\"https:\/\/www.youtube.com\/@GothamChess\">GothamChess<\/a> on YouTube) <a href=\"https:\/\/www.youtube.com\/watch?v=iWhlrkfJrCQ\">game<\/a> against the AI, in which ChatGPT played a sequence of absurd illegal moves, among other shenanigans. It captured its own bishop after three moves, generated material out of thin air and even resorted to moving its opponent\u2019s pieces in the endgame. On some occasions, after an illegal move, when Rozman prompted it to do so, ChatGPT played another move, most of which were just as outlandish and illegal as the previous moves.<\/p>\n\n\n\n<p>Similarly, <a href=\"https:\/\/chessily.com\/\">Chessily.com<\/a> founder <a href=\"https:\/\/chessily.com\/about\/#Marc-Cressac\">Marc Cressac<\/a> had Stockfish 15.1 &#8211; the most advanced chess AI ever developed &#8211; play against ChatGPT, which he described in an online <a href=\"https:\/\/chessily.com\/blog\/stockfish-vs-chatgpt\/\">article<\/a>. As far as fun was concerned, the results did not disappoint. ChatGPT probably doesn\u2019t find much delight in following strict rules. Maybe, after 1500 years, the game of chess needs a refreshing spin and ChatGPT is here to provide it. A <em>coup d\u2019\u00e9tat <\/em>on one of the most popular games in human history, dethroning the authority of its <a href=\"https:\/\/www.chess.com\/learn-how-to-play-chess\">set of rules<\/a> and revolutionizing the status quo.<\/p>\n\n\n<div class=\"vlp-link-container vlp-layout-basic wp-block-visual-link-preview-link advgb-dyn-8ef31f37\"><a href=\"https:\/\/ioplus.nl\/archive\/en\/brain-training-system-levels-up-the-performance-of-gamers\/\" class=\"vlp-link\" title=\"Brain training system raises performance levels of gamers\"><\/a><div class=\"vlp-layout-zone-side\"><div class=\"vlp-block-2 vlp-link-image\"><\/div><\/div><div class=\"vlp-layout-zone-main\"><div class=\"vlp-block-0 vlp-link-title\">Brain training system raises performance levels of gamers<\/div><div class=\"vlp-block-1 vlp-link-summary\">For a professional gamer, just one percent of an improvement in their performance can worth millions of dollars. However, there is still no widespread tool for eSports players to measure and help them improve their performance.<\/div><\/div><\/div>\n\n\n<h2 class=\"wp-block-heading\">How ChatGPT approaches chess<\/h2>\n\n\n\n<p>Jokes aside, let\u2019s take a step back and try to understand how ChatGPT actually plays chess. The program, being a <em>Large Language Model &#8211;<\/em> meaning an artificial intelligence that can only produce information through written language in response to a prompt &#8211; is only able to play by using the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Algebraic_notation_(chess)\">algebraic notation system<\/a>. What is that? It is a system that identifies how one of the 32 pieces on the 8 by 8 board can move, assigning a capital letter to indicate a piece (excluding pawns, which are only identified by the square they\u2019re moving to), followed by a lower-case letter and a number which individuate one of the 64 squares on the board. Here is an example.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-id=\"437523\" src=\"https:\/\/archive.ioplus.nl\/wp-content\/uploads\/2023\/02\/chess-board-1-2.png\" alt=\"\" class=\"wp-image-437523\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-id=\"437524\" src=\"https:\/\/archive.ioplus.nl\/wp-content\/uploads\/2023\/02\/Chess-board-2-2.png\" alt=\"\" class=\"wp-image-437524\"\/><\/figure>\n<figcaption class=\"blocks-gallery-caption wp-element-caption\"><strong><em>One of the two Knights is moved (&#8220;Ng1 -&gt; f3&#8221; or &#8220;Nf3&#8221;)<\/em><\/strong><\/figcaption><\/figure>\n\n\n\n<p>White\u2019s Knight on the g1 square moved to the f3 square. In algebraic notation, this can be expressed as \u201cNg1 -&gt; f3\u201d or just \u201cNf3\u201d as, in this particular position, the f3 square can only be legally reached this way by one of the two Knights.<\/p>\n\n\n\n<p>Generally, this is the method ChatGPT can resort to when playing chess, since it does not have access to a built-in board. Although people may think that such a sophisticated Language Model could also be capable of playing this classic game. Moreover, average chess players and grandmasters alike have come to terms with getting categorically crushed by unbeatable AIs, like the all-powerful Stockfish, with no chance of even reaching a draw.<\/p>\n\n\n\n<p>So, ChatGPT\u2019s chess performances should technically be amazing, <em>right<\/em>? Well, not necessarily. Now, you may think that it just hasn\u2019t been specifically trained to play chess. While this is certainly true, it\u2019s not that simple.  In prder to clear this up, we need to understand how a Large Language Model works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LLMs<\/h2>\n\n\n\n<p>\u201cEssentially, an LLM can tell you what is the probability that a bunch of words appears in a [given] sequence,\u201d explains Evangelos Kanoulas, Professor at the University of Amsterdam\u2019s Informatics Institute, \u201cso it can tell you how likely a piece of text is.\u201d Moreover, words from natural language are converted to tokens, where every word corresponds to 1 to 3 tokens. Also, Prof. Kanoulas goes on to say, an LLM can use <em>conditional probability<\/em> to associate words, meaning that on the basis of a given word it can \u201cguess\u201d what the next word (or token) will be. So, the larger the Language Model is, the more it can give a good estimate of what the next word will be.<\/p>\n\n\n\n<p>\u201cLet\u2019s imagine that this machine has been trained by looking at how humans use words,&#8221; Prof. Kanoulas continues. &#8220;Most likely it has also seen chess games. So, someone writes \u2018Chess game, player one\u2019 and then the first move, [for example] d4. So now the AI learns that when a game starts, there is a good chance that the first move is d4, because it read it somewhere. [ChatGPT] has no idea about what this is. It doesn\u2019t know what chess is and doesn\u2019t know the rules\u201d. Basically, the AI analyses the language, recognizes the words which indicate the start of a chess game and replies with a probabilistic guess based on what is likely to be an appropriate answer to a specific prompt.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/archive.ioplus.nl\/wp-content\/uploads\/2023\/02\/chess-board-3-1.png\" alt=\"\" class=\"wp-image-437512\" width=\"305\" height=\"306\"\/><figcaption class=\"wp-element-caption\"><em><strong>The opening move \u201cd4\u201d<\/strong><\/em><\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-stackable-heading stk-block-heading stk-block-heading--v2 stk-block stk-4b45daf\" id=\"linguistic-predictions\" data-block-id=\"4b45daf\"><h2 class=\"stk-block-heading__text\">Linguistic predictions<\/h2><\/div>\n\n\n\n<p>Also, the machine is capable of making generalizations. This is to say that it can produce a sequence of words even though it has never seen a specific prompt. Maybe it has seen similar or correlating ones and it draws information from them. So, with no concept of the rules of chess, and having possibly seen a good number of chess games with differing first moves, it produces a generalized answer, which can result in our \u201cd4\u201d example. However, this guess must not be confused in terms of its nature. It is not a computational analysis of all the games the AI has seen, but only a linguistic prediction.<\/p>\n\n\n\n<p>In other words, ChatGPT does not play \u201cd4\u201d because it knows that it is a viable move, but only because the popularity of the move in chess games played by humans has made the text \u201cd4\u201d appear numerous times after the start of a game. \u201cOne thing that it knows,&#8221; &#8211; Prof. Kanoulas points out, &#8220;is that, in this case, a letter is probably not followed by a number, so it may not do \u201cdd\u201d. But it could. Maybe something weird happens, like a human playing an illegal move that breaks the probability of what the AI will do next. What will come out of that is something strange.\u201d<\/p>\n\n\n\n<div class=\"wp-block-stackable-heading stk-block-heading stk-block-heading--v2 stk-block stk-f6b83a0\" id=\"what-does-the-ai-know\" data-block-id=\"f6b83a0\"><h2 class=\"stk-block-heading__text\">What does the AI know?<\/h2><\/div>\n\n\n\n<p>Mistakenly, some may think that ChatGPT may be aware of the fact that the playing field is an 8 by 8 checkered board. However, it does not even know that. Again, the reason why, while playing, ChatGPT is not likely to go past the letter \u201ch\u201d and the number 8 is not because it knows it cannot do that. Rather, it has never, or a very small number of times, seen anyone typing a configuration of the text related to a chess move going past \u201ch\u201d or 8.<\/p>\n\n\n\n<p>Nevertheless, it is still very much capable of generating mistakes. For example, in Rozman\u2019s YouTube video mentioned earlier, ChatGPT, after capturing its own bishop by an illegal <a href=\"https:\/\/support.chess.com\/article\/266-how-do-i-castle#:~:text=Castling%20is%20the%20only%20time,king%2C%20all%20in%20one%20move!\">castling<\/a> move, moved its Knight from the b1 square to the c3 square, and found itself in the position shown on the following board.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/archive.ioplus.nl\/wp-content\/uploads\/2023\/02\/chess-board-4.png\" alt=\"\" class=\"wp-image-437514\" width=\"298\" height=\"298\"\/><figcaption class=\"wp-element-caption\"><strong><em>The configuration of the board during Rozman\u2019s game against ChatGPT<\/em><\/strong><\/figcaption><\/figure>\n\n\n\n<p>For this move, the AI provided this comment: \u201cI\u2019ll play Nc3 [Knight to c3], attacking your bishop and developing a piece\u201d. While the move definitely develops (in chess-speak, \u201cadvances\u201d or \u201cmakes a given piece able to move further\u201d) the Knight, in no way does it attack one of Rozman\u2019s Bishops. ChatGPT may have supplied this line of commentary because Knights often tend to attack Bishops, just not in this position and, normally, only when it is fair and legal to do so within the rules.<\/p>\n\n\n\n<div class=\"wp-block-stackable-heading stk-block-heading stk-block-heading--v2 stk-block stk-b749f7f\" id=\"not-bound-by-hardcore-game-rules\" data-block-id=\"b749f7f\"><h2 class=\"stk-block-heading__text\">Not bound by hardcore game rules<\/h2><\/div>\n\n\n\n<p>Here lies the whole premise: ChatGPT\u2019s training and learning process is not bound by hardcore game rules, like a chess engine is. Steven Abreu, MSc, a researcher from the University of Groningen (the Netherlands), clarifies that what works well for predicting the next token in language is to &#8220;keep many options open\u201d, and then to select \u201cthe most likely option\u201d. But an LLM model does not learn to invalidate some options, it just assigns a lower probability to those which tend to appear less.<\/p>\n\n\n\n<p>Ultimately, all things considered, is it accurate to state that ChatGPT actually <em>plays<\/em> chess? In a strict sense, no. ChatGPT responds to language that we, as humans, understand to be related to the game, without any concept of the game being played.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Will ChatGPT ever be good at chess?<\/h2>\n\n\n\n<p>Both Prof. Kanoulas and Abreu believe that, if allowed the time needed, ChatGPT could learn to play chess legally, or even well. \u201cI believe that LLMs can be trained to play chess properly\u201d Abreu states. According to him, this could be done through <em>Reinforcement Learning through Human Feedback<\/em>, a process which ChatGPT was trained by, where humans annotate which responses to a question are most suitable and ChatGPT then gradually learns to become better at having conversations, Abreu goes on to explain. Alternatively, the AI could be fine-tuned on existing chess games in order to predict the best moves. Or again, one could train ChatGPT to play chess like a chess engine. The gist is: there are many ways this could happen.&nbsp;<\/p>\n\n\n\n<p>In this regard, Prof. Kanoulas says that at this stage ChatGPT may not play as well as a chess AI does, because it \u201cknows nothing about rewards, it knows nothing about what it means to win [for example] the Queen\u201d. But if it sees enough times that, in particular occasions, people tend to take the Queen, it will also take it. \u201cProbabilistically speaking, it would kind of understand &#8211; not because it can calculate the reward itself, but because the humans did that in their head and the chess AI did in its system &#8211; that this is more likely to happen\u201d. In short, it doesn\u2019t know why it has to take the Queen, nor how that\u2019s going to affect the future, as the AI knows nothing about winning. Or losing, for that matter. It is just a high-probability response.<\/p>\n\n\n\n<p>Still, the conversation remains open as new technologies and scientific methods are rolled out in the artificial intelligence field. Concepts like \u201c<em>neurosymbolic knowledge<\/em>\u201d (a matter for another time!) could potentially revolutionize machine learning. Or maybe not. Time &#8211; and research &#8211; will tell. For now, we get to laugh at its incapacity to elaborate on tactics and calculations.<\/p>\n<style class=\"advgb-styles-renderer\">.stk-b749f7f{margin-bottom:23px !important}<\/style>","protected":false},"excerpt":{"rendered":"<p>ChatGPT &nbsp;is all the rage right now. So much so that we seem to forget what it actually is: a language model. And that means it isn\u2019t suited for all kinds of tasks that other machines are already capable of. Like playing chess, for one thing. ChatGTP&#8217;s performance in terms of language is undoubtedly impressive. [&hellip;]<\/p>\n","protected":false},"author":2583,"featured_media":495434,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","footnotes":""},"categories":[8553],"tags":[10373,75818,76260,76262,30608,76265],"location":[70256],"article_type":[60595],"serie":[],"archives":[],"internal_archives":[],"reboot-archive":[],"class_list":["post-437506","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-digital","tag-ai","tag-chatgpt","tag-chess","tag-llm","tag-machine-learning","tag-zero-sum-games","location-eu","article_type-analysis"],"blocksy_meta":[],"acf":{"subtitle":"Over the past few months, there has been a lot of hype around ChatGPT. Still, playing chess against it is hilarious, to say the least. Why, though?","text_display_homepage":false},"author_meta":{"display_name":"Francesco Morelli","author_link":"https:\/\/ioplus.nl\/archive\/author\/francesco-morelli\/"},"featured_img":"https:\/\/ioplus.nl\/archive\/wp-content\/uploads\/2023\/02\/Chess-Board-Knights.jpg","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/ioplus.nl\/archive\/en\/category\/digital\/\" class=\"advgb-post-tax-term\">Digital<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">Digital<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/ioplus.nl\/archive\/en\/category\/digital\/\" class=\"advgb-post-tax-term\">AI<\/a>","<a href=\"https:\/\/ioplus.nl\/archive\/en\/category\/digital\/\" class=\"advgb-post-tax-term\">chatGPT<\/a>","<a href=\"https:\/\/ioplus.nl\/archive\/en\/category\/digital\/\" class=\"advgb-post-tax-term\">Chess<\/a>","<a href=\"https:\/\/ioplus.nl\/archive\/en\/category\/digital\/\" class=\"advgb-post-tax-term\">LLM<\/a>","<a href=\"https:\/\/ioplus.nl\/archive\/en\/category\/digital\/\" class=\"advgb-post-tax-term\">machine learning<\/a>","<a href=\"https:\/\/ioplus.nl\/archive\/en\/category\/digital\/\" class=\"advgb-post-tax-term\">Zero-sum games<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">AI<\/span>","<span class=\"advgb-post-tax-term\">chatGPT<\/span>","<span class=\"advgb-post-tax-term\">Chess<\/span>","<span class=\"advgb-post-tax-term\">LLM<\/span>","<span class=\"advgb-post-tax-term\">machine learning<\/span>","<span class=\"advgb-post-tax-term\">Zero-sum games<\/span>"]}},"comment_count":"0","relative_dates":{"created":"Posted 3 years ago","modified":"Updated 3 years ago"},"absolute_dates":{"created":"Posted on February 25, 2023","modified":"Updated on February 25, 2023"},"absolute_dates_time":{"created":"Posted on February 25, 2023 12:00 pm","modified":"Updated on February 25, 2023 12:00 pm"},"featured_img_caption":"","series_order":"","_links":{"self":[{"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/posts\/437506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/users\/2583"}],"replies":[{"embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/comments?post=437506"}],"version-history":[{"count":0,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/posts\/437506\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/media\/495434"}],"wp:attachment":[{"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/media?parent=437506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/categories?post=437506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/tags?post=437506"},{"taxonomy":"location","embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/location?post=437506"},{"taxonomy":"article_type","embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/article_type?post=437506"},{"taxonomy":"serie","embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/serie?post=437506"},{"taxonomy":"archives","embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/archives?post=437506"},{"taxonomy":"internal_archives","embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/internal_archives?post=437506"},{"taxonomy":"reboot-archive","embeddable":true,"href":"https:\/\/ioplus.nl\/archive\/wp-json\/wp\/v2\/reboot-archive?post=437506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}