<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Kirill Bobyrev</title><link>https://kirillbobyrev.com/</link><description>Recent content on Kirill Bobyrev</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 02 Jan 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://kirillbobyrev.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Anki: the ultimate tool for learning</title><link>https://kirillbobyrev.com/blog/anki/</link><pubDate>Thu, 02 Jan 2025 00:00:00 +0000</pubDate><guid>https://kirillbobyrev.com/blog/anki/</guid><description>How spaced repetition transformed my approach to learning as a software engineer.</description><content:encoded><![CDATA[<p>As a software engineer, I&rsquo;m constantly learning new things. The challenge isn&rsquo;t
just absorbing information - it&rsquo;s retaining what I&rsquo;ve learned while continuing
to grow. <a href="https://apps.ankiweb.net/">Anki</a> has become my go-to tool for making
learning both enjoyable and efficient.</p>
<h2 id="what-makes-anki-special">What Makes Anki Special<a
      href="#what-makes-anki-special"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>Anki isn&rsquo;t just another flashcard app. It&rsquo;s built with focus on spaced
repetition, a learning technique that shows you material right before you&rsquo;re
about to forget it. This timing makes the study sessions incredibly efficient.</p>
<h3 id="key-features">Key Features<a
      href="#key-features"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h3>
<ul>
<li><strong>Works everywhere:</strong> Free on Windows, Mac, Linux, and Android (iOS costs
$25). Everything syncs perfectly between devices.</li>
<li><strong>Flexible content:</strong> Basic text, LaTeX math formulas, images, audio - you
can study anything. This flexibility is crucial when tackling diverse topics.</li>
<li><strong>Smart organization:</strong> Hierarchical decks and tags keep everything
organized. You can import and export decks to share with others.</li>
<li><strong>Advanced techniques:</strong> Features like <a href="https://docs.ankiweb.net/editing.html#cloze-deletion">cloze
deletion</a> and <a href="https://docs.ankiweb.net/editing.html#image-occlusion">image
occlusion</a> make
studying more effective.</li>
</ul>
<h2 id="my-experience">My Experience<a
      href="#my-experience"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>I wish I&rsquo;d discovered Anki during university. Now, as I refresh my math
knowledge and work through computer science papers, it&rsquo;s become essential. By
memorizing core definitions and concepts, I can derive most complex results I
need.</p>
<p>Anki has a DIY feel - you won&rsquo;t find polished, pre-made decks for every topic.
But this actually helps. Creating your own cards forces you to engage with the
material more deeply, which is especially valuable for challenging subjects.</p>
<h2 id="why-more-people-should-know-about-it">Why More People Should Know About It<a
      href="#why-more-people-should-know-about-it"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>It&rsquo;s surprising how few engineers know about Anki, especially compared to
mainstream apps like Duolingo. For serious learners who want to retain
knowledge long-term, Anki&rsquo;s customizable approach offers huge advantages. The
trade-off is that it requires more setup and maintenance.</p>
<h2 id="takeaway">Takeaway<a
      href="#takeaway"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>Anki isn&rsquo;t perfect for every learning style or subject. But for building and
maintaining foundational knowledge, it&rsquo;s unmatched. If you&rsquo;re serious about
learning - whether as a student or lifelong learner - it&rsquo;s worth trying.</p>
]]></content:encoded></item><item><title>Analyzing long win streaks in online chess</title><link>https://kirillbobyrev.com/blog/analyzing-long-win-streaks/</link><pubDate>Tue, 28 Nov 2023 00:00:00 +0000</pubDate><guid>https://kirillbobyrev.com/blog/analyzing-long-win-streaks/</guid><description>A statistical analysis of Hikaru Nakamura's 55-game winning streak in online blitz chess.</description><content:encoded><![CDATA[<p>In-depth analysis of recent data suggests a high likelihood of Hikaru
Nakamura achieving a 55-game winning streak in online blitz, based on thousands
of his games played this year (and even more likely given that Hikaru just
crossed 35,000 blitz games mark on Chess.com alone). Similarly, longest streaks
by Magnus Carlsen (32 wins), Nihal Sarin (22 wins), and Daniel Naroditsky (33
wins) align with statistical expectations. The occurrence of both short (10+
wins) and long (15+ wins) streaks among these elite players is also found to be
probable and not out of the ordinary. A simple explanation of Hikaru&rsquo;s
performance is that he plays an enormous number of games online, is highly
skilled and (on average) has much weaker opponents than his peers (moreover, he
specifically <a href="https://www.youtube.com/watch?v=wDUCMEgYKrE&amp;t=435s">mentions</a>
cherry-picking opponents in order to score many points and create good content).</p>
<hr>
<p><strong>Update</strong>: Chess.com team has published a
<a href="https://www.chess.com/blog/CHESScom/regarding-recent-accusations">statement</a>
the next day reinforcing that they do not think long win streaks and individual
performances of Hikaru Nakamura are suspicious and hint at the possibility of
cheating.</p>
<blockquote>
<p>We have confirmed these results with external statisticians, including a professor of statistics at a top-10 university.</p>
</blockquote>
<p>Unfortunately, they have not shared any calculations and analysis. I would be
very interested to see the methods and tools that were used and compare them to
mine.</p>
<hr>
<p>I&rsquo;ve conducted basic analysis using Elo win probability estimations and
Monte-Carlo simulation to estimate the likelihood of Hikaru Nakamura (and his
peers) achieving long winning streaks, as recently highlighted by Vladimir
Kramnik. For results and calculations, see <a href="/blog/analyzing-long-win-streaks/#monte-carlo-simulations">Monte-Carlo
simulation</a> tables
and <a href="/blog/analyzing-long-win-streaks/#conclusion">conclusion</a> below.</p>
<p>This post does not aim to determine whether Hikaru Nakamura or other players
have engaged in any form cheating. Instead, my goal is to critically examine
historical data from Chess.com games, focusing on the probability of long win
streaks and exceptional performances. Even though the tools I use are reasonably
robust, the preliminary analysis studies significant outliers, both in terms of
the players and their performances. It also has some limitations and uses
assumptions which are explained in detail.</p>
<p>My analysis does not require extensive computation and anyone interested can run
the
<a href="https://gist.github.com/kirillbobyrev/c16ef00e01370e9789d1d6b91fe63442">code</a>
within seconds on a most computers. All graphs and calculations are produced by
these two scripts run with different parameters that I describe in the post. I
hope to address some of these limitations in a consequent study which I want to
publish soon.</p>
<p>In addition, this post does not consider and study the &ldquo;hot hand&rdquo; effect in
detail (a belief that a player who has just won is more likely to win again and
generate a streak). The &ldquo;hot hand&rdquo; fallacy is extensively studied in statistics:
e.g. here&rsquo;s an interesting
<a href="https://statmodeling.stat.columbia.edu/2015/07/09/hey-guess-what-there-really-is-a-hot-hand/">post</a>
and a <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2627354">paper</a> (from
Econometrica, one of the top journals in Statistics and Economics). The research
suggests that &ldquo;hot hand&rdquo; phenomenon exists despite prevalent beliefs that were
dominant for many decades in Statistics.</p>
<h2 id="prelude">Prelude<a
      href="#prelude"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>Cheating is a huge problem in modern chess and it has been extensively discussed
a lot in the last couple of years. Among many other voices, Vladimir Kramnik
(14th World Chess Champion) frequents <a href="https://www.youtube.com/@LevitovChess">Levitov
Chess</a> YouTube channel and shares his
views on the topic. He recently implied that Hikaru Nakamura, a renowned chess
player, known for his exceptional skills in online blitz and streaming presence,
might be cheating and asked Chess.com to investigate the case. The main finding
that he has presented so far is that Nakamura has exceptionally long winning
streaks against skilled opponents. This has sparked numerous discussions online
and attracted a lot of interest from the chess community.</p>
<p>In his <a href="https://youtu.be/2u-DKBSzJ1s?si=IhLJu9kqChzYtHhk&amp;t=1328">recent video</a>
Kramnik points out the following findings:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Avg opponent rating</th>
					<th style="text-align: center">Results</th>
					<th style="text-align: center">Performance rating</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">2950</td>
					<td style="text-align: center">45.5 / 46</td>
					<td style="text-align: center">3627</td>
			</tr>
			<tr>
					<td style="text-align: center">2912</td>
					<td style="text-align: center">34.5 / 35</td>
					<td style="text-align: center">3589</td>
			</tr>
			<tr>
					<td style="text-align: center">2737</td>
					<td style="text-align: center">55 / 55</td>
					<td style="text-align: center">∞</td>
			</tr>
			<tr>
					<td style="text-align: center">2949</td>
					<td style="text-align: center">46 / 48</td>
					<td style="text-align: center">3450</td>
			</tr>
			<tr>
					<td style="text-align: center">2792</td>
					<td style="text-align: center">47.5 / 48</td>
					<td style="text-align: center">3469</td>
			</tr>
	</tbody>
</table>
<p>Vladimir believes that this performance is unusual and warrants a thorough
investigation by Chess.com, although he explicitly mentions that he does not
accuse Hikaru Nakamura of cheating.</p>
<p>As someone with a background in software engineering, data science, and
mathematics, and a passion for chess, I&rsquo;m interested in exploring Vladimir
Kramnik&rsquo;s recent statements. My aim is to sift through the data and see if
there&rsquo;s substance to these claims.</p>
<h2 id="looking-into-data">Looking into data<a
      href="#looking-into-data"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>My goal is to answer a relatively simple question: how statistically probable is
it for someone rated as high as Hikaru in online chess to have the win streaks
and high performances like the one mentioned in Vladimir Kramnik&rsquo;s table.</p>
<p>Luckily, I can easily get plenty of data with online chess games and study it.
Chess.com provides <a href="https://www.chess.com/news/view/published-data-api">Published-Data
API</a> that I can use to
gather more data and look at more aggregated statistics. <a href="https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-archive">Monthly
archives</a>
endpoints offer a way to collect data on any player.</p>
<p>The dataset I have collected is as follows:</p>
<ul>
<li>Games are rated</li>
<li>Time control is 3+0 blitz games: Hikaru goes into detail on why
blitz with and without increment are very different in a <a href="https://youtu.be/sr6gBCG_hb4?t=731">recent
video</a> and shouldn&rsquo;t be compared directly</li>
<li>Games are played between <code>2023-09-26</code> and <code>2023-11-26</code> (60 days period that is
consistent with Kramnik&rsquo;s analysis)</li>
<li>Played in the standard chess format (as opposed to Fischer Random Chess)</li>
</ul>
<p>Here are my findings:</p>
<ul>
<li>Hikaru has played a total of 600 games in the last couple of months</li>
<li>Hikaru won 518 of these games</li>
<li>Hikaru drew 26 of these games</li>
<li>Hikaru scored 531 out 600 points in total or 88.5% of total points</li>
<li>Hikaru&rsquo;s average rating was 3248.42</li>
<li>The average opponent rating is 2873.43, median opponent rating is 2919.5</li>
</ul>
<p>Let&rsquo;s look at Hikaru&rsquo;s opponents rating distribution:</p>
<p>
  
<figure class="figure-block"><img
  src="/blog/analyzing-long-win-streaks/hikaru_opponent_ratings_60d_hu_90977e4db552648f.webp"
  srcset="/blog/analyzing-long-win-streaks/hikaru_opponent_ratings_60d_hu_c00463123508408d.webp 480w, /blog/analyzing-long-win-streaks/hikaru_opponent_ratings_60d_hu_90977e4db552648f.webp 640w"sizes="(min-width: 2200px) 54rem, (min-width: 1600px) 50rem, (max-width: 45.5rem) 100vw, 45.5rem"
  width="640"
  height="480"
  alt="Hikaru’s opponents rating distribution"
  loading="lazy"
  decoding="async"
/>
</figure>
</p>
<p>Here are top 6 win streaks:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Length</th>
					<th style="text-align: center">Avg opponent rating</th>
					<th style="text-align: center">Starting rating</th>
					<th style="text-align: center">First game</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">55</td>
					<td style="text-align: center">2736.64</td>
					<td style="text-align: center">3176</td>
					<td style="text-align: center"><a href="https://www.chess.com/game/live/89602740099">https://www.chess.com/game/live/89602740099</a></td>
			</tr>
			<tr>
					<td style="text-align: center">45</td>
					<td style="text-align: center">2772.89</td>
					<td style="text-align: center">3231</td>
					<td style="text-align: center"><a href="https://www.chess.com/game/live/94493554773">https://www.chess.com/game/live/94493554773</a></td>
			</tr>
			<tr>
					<td style="text-align: center">35</td>
					<td style="text-align: center">2864.83</td>
					<td style="text-align: center">3226</td>
					<td style="text-align: center"><a href="https://www.chess.com/game/live/89994571321">https://www.chess.com/game/live/89994571321</a></td>
			</tr>
			<tr>
					<td style="text-align: center">34</td>
					<td style="text-align: center">2744.71</td>
					<td style="text-align: center">3222</td>
					<td style="text-align: center"><a href="https://www.chess.com/game/live/90353334085">https://www.chess.com/game/live/90353334085</a></td>
			</tr>
			<tr>
					<td style="text-align: center">28</td>
					<td style="text-align: center">2930.96</td>
					<td style="text-align: center">3287</td>
					<td style="text-align: center"><a href="https://www.chess.com/game/live/93637696397">https://www.chess.com/game/live/93637696397</a></td>
			</tr>
			<tr>
					<td style="text-align: center">26</td>
					<td style="text-align: center">2958.46</td>
					<td style="text-align: center">3256</td>
					<td style="text-align: center"><a href="https://www.chess.com/game/live/93912033813">https://www.chess.com/game/live/93912033813</a></td>
			</tr>
	</tbody>
</table>
<p>These streaks are quite impressive, and I think I have found the streak that
Vladimir Kramnik has mentioned in his video! The longest win streak does feature
2736.64 average opponent rating, which is exactly 2737 after rounding up. It
looks like I&rsquo;m using a similar methodology so far.</p>
<p>Another thing I wanted to consider is Hikaru&rsquo;s starting rating. The ratings
often vary for players and can go up and down by 200-300 points depending on
mood, fatigue, tilt and other factors. I decided to store Hikaru&rsquo;s rating at the
start of the streak as a simple snapshot of his shape in that particular time
frame.</p>
<h2 id="looking-at-other-players">Looking at other players<a
      href="#looking-at-other-players"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>Hikaru mentioned the concept of &ldquo;farming&rdquo; in <a href="https://youtu.be/sr6gBCG_hb4?t=900">his recent
video</a> in response to the winning
streak data found by Kramnik. &ldquo;Farming&rdquo; is beating the opponent consistently to
&ldquo;create content&rdquo; and gain rating. Hikaru claims that he and Daniel Narodisky are
particularly strong in winning against lower-ranked opponents many times in a
row and that statistics would be different for Magnus Carlsen or Fabiano
Caruana.</p>
<p>Let&rsquo;s take top 5 players from Chess.com
blitz <a href="https://www.chess.com/leaderboard/live">leaderboard</a> from today:</p>
<p>
  
<figure class="figure-block"><img
  src="/blog/analyzing-long-win-streaks/top_5_blitz_hu_1d8c0002ac015bc7.webp"
  srcset="/blog/analyzing-long-win-streaks/top_5_blitz_hu_758781276f25742f.webp 480w, /blog/analyzing-long-win-streaks/top_5_blitz_hu_1d8c0002ac015bc7.webp 734w"sizes="(min-width: 2200px) 54rem, (min-width: 1600px) 50rem, (max-width: 45.5rem) 100vw, 45.5rem"
  width="734"
  height="328"
  alt="Top 5 blitz players on Chess.com"
  loading="lazy"
  decoding="async"
/>
</figure>
</p>
<p>Hikaru Nakamura and Daniel Narodistky have by far most games, which is expected
since both of them are streaming a lot and play online almost exclusively (with
the exception of Hikaru recently having awesome live classical performances).</p>
<p>MVL only played 94 games in 3+0 format this year, so I won&rsquo;t use his data for
calculations.</p>
<p>Let&rsquo;s look at some statistics for all these players for the year of 2023 (from
2023-01-01 to 2023-11-28).</p>
<p><strong>N.B.</strong> I decided to use this year instead of lifetime statistics in order to
make the calculations comparable between players. Magnus Carlsen didn&rsquo;t play
much on Chess.com until the Magnus Group merger and has only started playing
actively recently (e.g. API call for games of July 2022 and most of the last
year <a href="https://api.chess.com/pub/player/magnuscarlsen/games/2022/07">returns</a> no
games at all). Of course, if I have considered lifetime statistics of each
player, then the results would be different. Additionally, there is a prevalent
belief that ratings were on a different scale and the activity was an order of
magnitude lower before the online chess boom in 2020. Therefore, even if I want
to consider more data, I would probably only check last few years.</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Statistics</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">Games</td>
					<td style="text-align: center">908</td>
					<td style="text-align: center">3032</td>
					<td style="text-align: center">2767</td>
					<td style="text-align: center">5123</td>
			</tr>
			<tr>
					<td style="text-align: center">Points</td>
					<td style="text-align: center">716.5</td>
					<td style="text-align: center">2558.5</td>
					<td style="text-align: center">1970.5</td>
					<td style="text-align: center">3964.0</td>
			</tr>
			<tr>
					<td style="text-align: center">Scored of total</td>
					<td style="text-align: center">78.9%</td>
					<td style="text-align: center">84.38%</td>
					<td style="text-align: center">71.9%</td>
					<td style="text-align: center">77.3%</td>
			</tr>
			<tr>
					<td style="text-align: center">Avg rating</td>
					<td style="text-align: center">3227.60</td>
					<td style="text-align: center">3216.22</td>
					<td style="text-align: center">3142.38</td>
					<td style="text-align: center">3130.88</td>
			</tr>
			<tr>
					<td style="text-align: center">Avg opponent</td>
					<td style="text-align: center">2984.50</td>
					<td style="text-align: center">2897.95</td>
					<td style="text-align: center">2976.46</td>
					<td style="text-align: center">2901.46</td>
			</tr>
			<tr>
					<td style="text-align: center">10+ streaks</td>
					<td style="text-align: center">15</td>
					<td style="text-align: center">79</td>
					<td style="text-align: center">23</td>
					<td style="text-align: center">62</td>
			</tr>
			<tr>
					<td style="text-align: center">15+ streaks</td>
					<td style="text-align: center">3</td>
					<td style="text-align: center">35</td>
					<td style="text-align: center">3</td>
					<td style="text-align: center">21</td>
			</tr>
			<tr>
					<td style="text-align: center">20+ streaks</td>
					<td style="text-align: center">1</td>
					<td style="text-align: center">17</td>
					<td style="text-align: center">1</td>
					<td style="text-align: center">6</td>
			</tr>
			<tr>
					<td style="text-align: center">Longest streak</td>
					<td style="text-align: center">32</td>
					<td style="text-align: center">55</td>
					<td style="text-align: center">22</td>
					<td style="text-align: center">33</td>
			</tr>
	</tbody>
</table>
<p>These statistics do look surprising at the first glance, but let&rsquo;s look deeper
into the data. As Hikaru mentioned, I think it&rsquo;s a fair assumption that
Narodistky is better comparison than Carlsen, Sarin and other players. This is
because Daniel is an incredibly strong player himself and has similar goals to
create content through streams and videos. Long win streaks <em>are the content</em> in
many cases. For example, when I looked at the distribution of win streaks, there
is a clear spike around 10 wins, which is unsurprising because this is called
&ldquo;adoption&rdquo; in online chess and usually means that the player who scored 10-0 on
their opponent dominated the match. Naroditsky also excels in short time
controls without an increment.</p>
<p>Another interesting observation is that Carlsen and Sarin are nowhere close to
both Nakamura and Naroditsky in terms of win streaks count. Carlsen has played
much less, but Sarin played almost as much as Nakamura. However, it&rsquo;s worth
noting that an average opponent of Sarin is almost 100 rating points higher than
for Nakamura. That, coupled with the fact that Sarin&rsquo;s average rating is 70
points lower than Nakamura&rsquo;s probably explains a lot. In that regard, Naroditsky
is again very close to Hikaru in terms of average opponent, even though his
average rating is also 86 points lower than Nakamura&rsquo;s.</p>
<h3 id="looking-at-each-players-opposition">Looking at each player&rsquo;s opposition<a
      href="#looking-at-each-players-opposition"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h3>
<p>It is clear that on average, Hikaru plays against weaker opposition than
everyone else in the list. But how different is each player&rsquo;s opposition?</p>
<p>First, what are the average rating gaps between average rating of the player and
their opposition?</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Player</th>
					<th style="text-align: center">Average rating gap</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">Carlsen</td>
					<td style="text-align: center">243</td>
			</tr>
			<tr>
					<td style="text-align: center">Nakamura</td>
					<td style="text-align: center">318.3</td>
			</tr>
			<tr>
					<td style="text-align: center">Sarin</td>
					<td style="text-align: center">166</td>
			</tr>
			<tr>
					<td style="text-align: center">Naroditsky</td>
					<td style="text-align: center">229.4</td>
			</tr>
	</tbody>
</table>
<p>Again, Hikaru is in the clear first in terms of playing much weaker opposition.
If Naroditsky himself would be rated higher, then the gap would be similar to
Nakamura&rsquo;s, so again it makes much sense to compare Nakamura and Naroditsky
here. Sarin also plays a lot, but it looks like he mostly plays against very
high-rated opponents and is likely mostly interested in training rather than
playing for the sake of rating and creating content.</p>
<p>In addition to averages, let&rsquo;s also look at the quantiles of each player&rsquo;s
opponents:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Quantile</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">25%</td>
					<td style="text-align: center">2967</td>
					<td style="text-align: center">2846</td>
					<td style="text-align: center">2932</td>
					<td style="text-align: center">2816</td>
			</tr>
			<tr>
					<td style="text-align: center">50%</td>
					<td style="text-align: center">3019</td>
					<td style="text-align: center">2920</td>
					<td style="text-align: center">2991</td>
					<td style="text-align: center">2904</td>
			</tr>
			<tr>
					<td style="text-align: center">75%</td>
					<td style="text-align: center">3054</td>
					<td style="text-align: center">2994</td>
					<td style="text-align: center">3041</td>
					<td style="text-align: center">2997</td>
			</tr>
			<tr>
					<td style="text-align: center">90%</td>
					<td style="text-align: center">3088</td>
					<td style="text-align: center">3054</td>
					<td style="text-align: center">3074</td>
					<td style="text-align: center">3052</td>
			</tr>
	</tbody>
</table>
<p>Again, the statistics for Nakamura and Naroditsky are very similar here. Now
that we see this data, it&rsquo;s much easier to understand why Hikaru has these long
win streaks:</p>
<ul>
<li>Hikaru plays a lot of games, so the sample size is large</li>
<li>Hikaru is rated very highly, similarly to Carlsen</li>
<li>Hikaru plays against much weaker opposition (on average) than his peers, which
is similar to Daniel Naroditsky, but then again he is ranked much higher</li>
</ul>
<p>It might be easier to look at the rating distributions visually:</p>
<p>
  
<figure class="figure-block"><img
  src="/blog/analyzing-long-win-streaks/MagnusCarlsen_opponent_ratings_hu_9b68b70e2d211f31.webp"
  srcset="/blog/analyzing-long-win-streaks/MagnusCarlsen_opponent_ratings_hu_e79154f7f799923f.webp 480w, /blog/analyzing-long-win-streaks/MagnusCarlsen_opponent_ratings_hu_9b68b70e2d211f31.webp 640w"sizes="(min-width: 2200px) 54rem, (min-width: 1600px) 50rem, (max-width: 45.5rem) 100vw, 45.5rem"
  width="640"
  height="480"
  alt="Carlsen’s opponents rating distribution"
  loading="lazy"
  decoding="async"
/>
</figure>
</p>
<p>
  
<figure class="figure-block"><img
  src="/blog/analyzing-long-win-streaks/Hikaru_opponent_ratings_hu_973293e93778fa17.webp"
  srcset="/blog/analyzing-long-win-streaks/Hikaru_opponent_ratings_hu_9cbe09c56058e44b.webp 480w, /blog/analyzing-long-win-streaks/Hikaru_opponent_ratings_hu_973293e93778fa17.webp 640w"sizes="(min-width: 2200px) 54rem, (min-width: 1600px) 50rem, (max-width: 45.5rem) 100vw, 45.5rem"
  width="640"
  height="480"
  alt="Nakamura’s opponents rating distribution"
  loading="lazy"
  decoding="async"
/>
</figure>
</p>
<p>
  
<figure class="figure-block"><img
  src="/blog/analyzing-long-win-streaks/nihalsarin_opponent_ratings_hu_307bd50eecd334cd.webp"
  srcset="/blog/analyzing-long-win-streaks/nihalsarin_opponent_ratings_hu_20a26cde8be111b7.webp 480w, /blog/analyzing-long-win-streaks/nihalsarin_opponent_ratings_hu_307bd50eecd334cd.webp 640w"sizes="(min-width: 2200px) 54rem, (min-width: 1600px) 50rem, (max-width: 45.5rem) 100vw, 45.5rem"
  width="640"
  height="480"
  alt="Sarin’s opponents rating distribution"
  loading="lazy"
  decoding="async"
/>
</figure>
</p>
<p>
  
<figure class="figure-block"><img
  src="/blog/analyzing-long-win-streaks/DanielNaroditsky_opponent_ratings_hu_b4c6533b117c8822.webp"
  srcset="/blog/analyzing-long-win-streaks/DanielNaroditsky_opponent_ratings_hu_c9c056bd176c0903.webp 480w, /blog/analyzing-long-win-streaks/DanielNaroditsky_opponent_ratings_hu_b4c6533b117c8822.webp 640w"sizes="(min-width: 2200px) 54rem, (min-width: 1600px) 50rem, (max-width: 45.5rem) 100vw, 45.5rem"
  width="640"
  height="480"
  alt="Naroditsky’s opponents rating distribution"
  loading="lazy"
  decoding="async"
/>
</figure>
</p>
<p>Now, let&rsquo;s get to figuring out the probability of achieving the streaks we
found.</p>
<h2 id="analysis">Analysis<a
      href="#analysis"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>My main question is: what would be a probability of Hikaru having these very
long winning streaks against opponents of the rating groups that I found?</p>
<p>Let&rsquo;s discuss some limitations: we will consider each opponnet&rsquo;s win probability
in each game to be independent of adjacent games. This is not strictly true in
real life: factors such as fatigue, tilt, time of day, and many others,
certainly have impact.</p>
<p>I will also consider that Hikaru&rsquo;s rating (and his opponents&rsquo; ratings) is
&ldquo;fair&rdquo;, i.e. he has not cheated while achieving it. He is a top-2 ranked blitz
player in the world and top-3 classical (according to today&rsquo;s
<a href="https://2700chess.com/">2700chess</a> leaderboard).</p>
<p>I will use Monte-Carlo simulation to simulate a large number of games being
played between each player and his opponents and check how often we find similar
win streak patterns. The key here is knowing an approximate probability of each
game outcome. We can use win probability formula based on players Elo rating or
a machine learning model. This approach is similar to one used on
<a href="https://pawnalyze.com/tournament/2022/02/27/Elo-Rating-Accuracy-Is-Machine-Learning-Better.html">Pawnalyze</a>.</p>
<h3 id="using-elo-to-estimate-win-probabilities">Using Elo to estimate win probabilities<a
      href="#using-elo-to-estimate-win-probabilities"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h3>
<p>Elo is a good starting model, because it&rsquo;s simple, is studied well and has been
long applied to chess. Chess.com uses Glicko, but it is also a crude
approximation when it comes to win probabilities, so we&rsquo;ll stick with the
simpler Elo system. It has, however, a number of drawbacks.</p>
<p>A common issue with Elo system is that it doesn&rsquo;t take into account White&rsquo;s
first move advantage (which is not good, but we&rsquo;re mostly considering the win
probabilities on average) and it also doesn&rsquo;t work very well with large Elo
differences.</p>
<p>Also, constants in probability formulas are some widely used ones and they are
best suited for FIDE classical ratings, which have a slightly different range
(with the top players never getting above 2900 whereas on Chess.com Hikaru and
Magnus Carlsen have achieved a rating over 3300). Blitz and classical are quite
different, too.</p>
<p>Another issue is that Elo is known to work poorly when the rating gaps are large
(which is the case most of the time when someone rated online as high as Hikaru
or Magnus plays blitz).</p>
<p>For Elo, we can use the same formulas from <a href="https://wismuth.com/elo/calculator.html">Wismuth Elo
calculator</a> (Pawnalyze post also
mentions these formulas as a decent starting point):</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">expected_score</span><span class="p">(</span><span class="n">elo_difference</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">  <span class="k">return</span> <span class="n">scipy</span><span class="o">.</span><span class="n">special</span><span class="o">.</span><span class="n">erfc</span><span class="p">(</span><span class="o">-</span><span class="n">elo_difference</span> <span class="o">/</span> <span class="p">((</span><span class="mf">2000.0</span> <span class="o">/</span> <span class="mi">7</span><span class="p">)</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">2</span><span class="p">)))</span> <span class="o">/</span> <span class="mi">2</span>
</span></span></code></pre></div><p>There &ldquo;full&rdquo; formula that takes into account draws in chess (Note 7 on Wismuth)
does not give good results for our rating ranges and is not reliable. Also,
draws are <em>very</em> common in high-level classical chess. In fact, draws are often
the default result of these games. In online blitz without an increment that is
not the case, because of flagging. The difference in &ldquo;expected score&rdquo; and
adjusted probabilities is quite large. For example, in case of Hikaru&rsquo;s 55-win
streak he started with a rating of 3176 against average opponents having 2736.
The expected score (or &ldquo;simple win probability&rdquo;) is 93.7% while the adjusted
probability is 70% with the draw probability of&hellip; 47%! That doesn&rsquo;t add up
because of FIDE constants and different rating ranges.</p>
<p>I think this is a critical observation, because it heavily influences the
resulting probability. We will consider the expected score to be an overly
optimistic win probability for the sake of simplicity.</p>
<p>And here we can also see that draws are much less likely in faster time
controls:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Time control</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">1+0</td>
					<td style="text-align: center">11.2%</td>
					<td style="text-align: center">6.9%</td>
					<td style="text-align: center">7.6%</td>
					<td style="text-align: center">8.3%</td>
			</tr>
			<tr>
					<td style="text-align: center">3+0</td>
					<td style="text-align: center">11.5%</td>
					<td style="text-align: center">7.8%</td>
					<td style="text-align: center">11.4%</td>
					<td style="text-align: center">13.5%</td>
			</tr>
			<tr>
					<td style="text-align: center">3+1</td>
					<td style="text-align: center">14.9%</td>
					<td style="text-align: center">13.8%</td>
					<td style="text-align: center">12.3%</td>
					<td style="text-align: center">23.1%</td>
			</tr>
	</tbody>
</table>
<p>Note: I could probably adjust win probabilities using sampled draw probabilities
since <code>expected_score = win_probability + draw_probability / 2</code>.</p>
<p>Even when the difference is just a second of increment, for professional chess
players that is enough to make a huge difference.</p>
<p>Let&rsquo;s take a look at the projected <em>average</em> win probabilities of each player
throughout the year.</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Statistics</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">Avg rating</td>
					<td style="text-align: center">3227.60</td>
					<td style="text-align: center">3216.22</td>
					<td style="text-align: center">3142.38</td>
					<td style="text-align: center">3130.88</td>
			</tr>
			<tr>
					<td style="text-align: center">Avg opponent</td>
					<td style="text-align: center">2984.50</td>
					<td style="text-align: center">2897.95</td>
					<td style="text-align: center">2976.46</td>
					<td style="text-align: center">2901.46</td>
			</tr>
			<tr>
					<td style="text-align: center">Win probability</td>
					<td style="text-align: center">80.2%</td>
					<td style="text-align: center">86.7%</td>
					<td style="text-align: center">71.9%</td>
					<td style="text-align: center">78.9%</td>
			</tr>
	</tbody>
</table>
<p>Now let&rsquo;s turn to each player&rsquo;s longest winning streak:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Statistics</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">Streak length</td>
					<td style="text-align: center">32</td>
					<td style="text-align: center">55</td>
					<td style="text-align: center">22</td>
					<td style="text-align: center">33</td>
			</tr>
			<tr>
					<td style="text-align: center">Start rating</td>
					<td style="text-align: center">3162</td>
					<td style="text-align: center">3176</td>
					<td style="text-align: center">3148</td>
					<td style="text-align: center">3075</td>
			</tr>
			<tr>
					<td style="text-align: center">Avg opponent</td>
					<td style="text-align: center">2884</td>
					<td style="text-align: center">2736</td>
					<td style="text-align: center">2906</td>
					<td style="text-align: center">2819</td>
			</tr>
			<tr>
					<td style="text-align: center">Win probability</td>
					<td style="text-align: center">83%</td>
					<td style="text-align: center">93%</td>
					<td style="text-align: center">80%</td>
					<td style="text-align: center">81.4%</td>
			</tr>
	</tbody>
</table>
<p>There&rsquo;s a clear pattern here: the opposition is way weaker than the average
opposition of each player. As a result, win probability is significantly higher.</p>
<h3 id="monte-carlo-simulations">Monte-Carlo simulations<a
      href="#monte-carlo-simulations"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h3>
<p>Let&rsquo;s spin up Monte-Carlo simulations and finally see if the win streaks we
found make sense!</p>
<p>The simulation I use is quite basic, as it essentially assumes:</p>
<ul>
<li>Each game is independent (which is certainly not true: I would imagine an
opponent who lost a number of games to be demoralized)</li>
<li>Each player maintaining the same rating throughout all games (average player
rating)</li>
<li>All opponents having the same rating (average opponent rating): that is also
certainly not true. For example, while Hikaru Nakamura&rsquo;s average opponent
rating throughout the year is 2897.95, the historic 55-game win streak was
scored against opponents of 2736 average rating. That is over 150 points
difference!</li>
</ul>
<h4 id="probability-of-scoring-multiple-short-and-long-win-streaks">Probability of scoring multiple short and long win streaks<a
      href="#probability-of-scoring-multiple-short-and-long-win-streaks"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h4>
<p>To understand what parameters to use for each simulation, let&rsquo;s take a look at
<a href="#looking-at-other-players">previous section</a>&rsquo;s table again.</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Statistics</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">Games</td>
					<td style="text-align: center">908</td>
					<td style="text-align: center">3032</td>
					<td style="text-align: center">2767</td>
					<td style="text-align: center">5123</td>
			</tr>
			<tr>
					<td style="text-align: center">10+ streaks</td>
					<td style="text-align: center">15</td>
					<td style="text-align: center">79</td>
					<td style="text-align: center">23</td>
					<td style="text-align: center">62</td>
			</tr>
			<tr>
					<td style="text-align: center">15+ streaks</td>
					<td style="text-align: center">3</td>
					<td style="text-align: center">35</td>
					<td style="text-align: center">3</td>
					<td style="text-align: center">21</td>
			</tr>
			<tr>
					<td style="text-align: center">20+ streaks</td>
					<td style="text-align: center">1</td>
					<td style="text-align: center">17</td>
					<td style="text-align: center">1</td>
					<td style="text-align: center">6</td>
			</tr>
			<tr>
					<td style="text-align: center">Avg win probability</td>
					<td style="text-align: center">80.2%</td>
					<td style="text-align: center">86.7%</td>
					<td style="text-align: center">71.9%</td>
					<td style="text-align: center">78.9%</td>
			</tr>
	</tbody>
</table>
<p>In the table above, the average win probability is the one for the entire year.</p>
<p>I will run simulations and estimate probability of each player having at least
as many streaks of given length as they have scored in real life over the past
year.</p>
<p>So, for each simulation the parameters are:</p>
<ul>
<li>Number of games: played throughout the year</li>
<li>Streak cutoff: 10, 15 or 20</li>
<li>Minimum number of streaks: streaks that the player has scored throughout the
year (table above)</li>
<li>Win probability: average win probability (table above)</li>
</ul>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Probability of</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">10+ streaks</td>
					<td style="text-align: center">94.6%</td>
					<td style="text-align: center">99.9%</td>
					<td style="text-align: center">90.6%</td>
					<td style="text-align: center">100%</td>
			</tr>
			<tr>
					<td style="text-align: center">15+ streaks</td>
					<td style="text-align: center">97%</td>
					<td style="text-align: center">99.5%</td>
					<td style="text-align: center">91.8%</td>
					<td style="text-align: center">98.3%</td>
			</tr>
			<tr>
					<td style="text-align: center">20+ streaks</td>
					<td style="text-align: center">89%</td>
					<td style="text-align: center">95.5%</td>
					<td style="text-align: center">65.3%</td>
					<td style="text-align: center">91.5%</td>
			</tr>
	</tbody>
</table>
<p>Because streaks of 20+ wins are such an outlier and were scored against weaker
field, not the average field of opponents each player has faced, the probability
drops noticeably. That is expected.</p>
<p>Other than that, it looks like the win streaks we have observed are completely
normal and very likely. Also, Nakamura&rsquo;s &ldquo;fighting&rdquo; style certainly yields great
results.</p>
<h4 id="probability-of-scoring-the-single-longest-win-streak">Probability of scoring the single longest win streak<a
      href="#probability-of-scoring-the-single-longest-win-streak"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h4>
<p>Now, let&rsquo;s turn back to the question of whether the longest win streak is
probable or not for each player.</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Statistics</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">Games</td>
					<td style="text-align: center">908</td>
					<td style="text-align: center">3032</td>
					<td style="text-align: center">2767</td>
					<td style="text-align: center">5123</td>
			</tr>
			<tr>
					<td style="text-align: center">Win probability</td>
					<td style="text-align: center">83%</td>
					<td style="text-align: center">93%</td>
					<td style="text-align: center">80%</td>
					<td style="text-align: center">81.4%</td>
			</tr>
			<tr>
					<td style="text-align: center">Longest streak</td>
					<td style="text-align: center">32</td>
					<td style="text-align: center">55</td>
					<td style="text-align: center">22</td>
					<td style="text-align: center">33</td>
			</tr>
	</tbody>
</table>
<p>In this table, the win probability is the one calculated against a weaker field
of players who have been defeated in the longest win streak of each player. We
will &ldquo;assume&rdquo; that each player has been playing against this weaker field the
whole year for simplicity.</p>
<p>Let&rsquo;s calculate probability of scoring the longest winning streak for each
player:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">Probability of</th>
					<th style="text-align: center">Carlsen</th>
					<th style="text-align: center">Nakamura</th>
					<th style="text-align: center">Sarin</th>
					<th style="text-align: center">Naroditsky</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">Longest streak</td>
					<td style="text-align: center">32.3%</td>
					<td style="text-align: center">98.4%</td>
					<td style="text-align: center">98.5%</td>
					<td style="text-align: center">65.6%</td>
			</tr>
	</tbody>
</table>
<p>These results are more interesting. I certainly did not expect Carlsen&rsquo;s
probability of getting a win streak of 32+ games to be this low given relatively
high win probability that he has, but also Carlsen is the one who played a least
number of games this year on Chess.com. I&rsquo;m pretty sure he plays a lot on
Lichess and he is still the best player in the world, so I think the &ldquo;Magnus
factor&rdquo; (among many others) has a huge influence.</p>
<h2 id="conclusion">Conclusion<a
      href="#conclusion"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h2>
<p>My analysis, while basic and approximate, suggests that the winning streaks
found in top players&rsquo; online blitz games on Chess.com are not statistically
improbable. Despite the rudimentary nature of my methods, the key takeaway is
that the occurrences highlighted by Vladimir Kramnik do not seem to be
extraordinarily rare, even with this possibly optimistic approach.</p>
<p>While I respect Kramnik&rsquo;s efforts to shed light on the prevalence of online
cheating, the specific insinuation regarding Hikaru Nakamura&rsquo;s alleged cheating
seems quite unlikely. Considering his consistent performance both in
over-the-board and online chess, Nakamura&rsquo;s results appear to be within the
realm of possibility.</p>
<p>There&rsquo;s room for improvement in my analysis. Primarily, it would be interesting
to move from a basic Elo-based estimation to a more refined machine learning
model trained on Chess.com&rsquo;s historical data. This isn&rsquo;t just about verifying
the probability of long win streaks but also about understanding how different
the outcomes are from the simple Elo model used in this study.</p>
<p>Additionally, fully leveraging Chess.com&rsquo;s historical data would allow me to
simulate the actual game sequences players have experienced this year. Instead
of relying on win probabilities against an &ldquo;average opponent&rdquo;, using individual
game data and opponent ratings should yield more precise results.</p>
<h3 id="side-note">Side note<a
      href="#side-note"
      class="heading-anchor"
      aria-label="Link to this section"
      >&sect;</a
    ></h3>
<p>Even though the simulated probabilities are incredibly high for all events I
found, this isn&rsquo;t conclusive. My method isn&rsquo;t perfect and the results would
drastically change under different assumptions. The key factor is likely the win
probability estimation (which is very naive in this study). Simulation appears
to be really sensitive to different probabilities and the results would change
if I chose a different win probability estimation strategy.</p>
<p>For example, if I use the full Elo win probability formulas from Wismuth
mentioned before, then <code>win_probability(3176, 2736) = 70%</code>. Even though that is
for classical time control, it&rsquo;s consistent with what I would personally
initially guess before looking at the data. And, with that, simulating 3000
games with win probability of 70% in each of them would give 0% chance of
accumulating a win streak of 55 games. This isn&rsquo;t as clear-cut as the
calculations above suggest. I look forward to improving the probability
estimation with more robust methods such as machine learning.</p>
<p>Another significant issue is that I&rsquo;m calculating the probabilities by making
each player&rsquo;s rating and their opponents&rsquo; rating to be constant throughout the
whole simulation. It would be great to change that and reflect actual ratings of
each examined player and their opponent in each game.</p>
]]></content:encoded></item></channel></rss>