<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Ballpark Figures]]></title><description><![CDATA[Companion to the Ballpark Figures YouTube channel (youtube.com/@BPKFigures).  I throw math and algorithms at everyday problems, and things that don't make it into my videos may end up here.]]></description><link>https://ballparkfigures.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!V63i!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0967df3-9b19-4e80-95a7-3b4ca32ab3d6_1280x1280.png</url><title>Ballpark Figures</title><link>https://ballparkfigures.substack.com</link></image><generator>Substack</generator><lastBuildDate>Tue, 28 Jul 2026 18:46:30 GMT</lastBuildDate><atom:link href="https://ballparkfigures.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Patrick Liscio]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[ballparkfigures@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[ballparkfigures@substack.com]]></itunes:email><itunes:name><![CDATA[Patrick Liscio]]></itunes:name></itunes:owner><itunes:author><![CDATA[Patrick Liscio]]></itunes:author><googleplay:owner><![CDATA[ballparkfigures@substack.com]]></googleplay:owner><googleplay:email><![CDATA[ballparkfigures@substack.com]]></googleplay:email><googleplay:author><![CDATA[Patrick Liscio]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Yahtzee]]></title><description><![CDATA[My second video, on Yahtzee strategy, is out.]]></description><link>https://ballparkfigures.substack.com/p/yahtzee</link><guid isPermaLink="false">https://ballparkfigures.substack.com/p/yahtzee</guid><dc:creator><![CDATA[Patrick Liscio]]></dc:creator><pubDate>Sun, 19 Jul 2026 20:30:13 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/edc89aae-28d4-40e4-af67-fbd4dffd092c_3840x2160.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>My second video, on Yahtzee strategy, is out.  You can find it <a href="https://youtu.be/DOgb5wrb7mM">here</a>.  This post covers some more details about strategy that I couldn&#8217;t fit in the video, as well as some interesting problems in Yahtzee strategy that I think are still open.  I also made a post about the response to my Battleship video, and some of the changes I made for the new video, which you can find <a href="https://ballparkfigures.substack.com/p/yahtzee-vs-battleship">here</a>.</p><p>In Battleship, a lot of my time was spent trying to salvage something from the increasingly complex placement strategy, ultimately delaying the video by quite a bit.  For Yahtzee, I decided to avoid this by focusing on what worked: leaning into the single-player point maximization and relegating multiplayer approaches some small segments at the end.  For what it&#8217;s worth, I do think a vast majority of the advantage in Yahtzee comes from point maximization and not from multiplayer adjustments.  However, this post will mostly just be providing some more insight and data on single player cases, although there are some interesting open questions on multiplayer strategy at the end.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://ballparkfigures.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Ballpark Figures! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>The Math</h2><p>Especially compared to Battleship, the Yahtzee math was relatively straightforward.  We just do some dynamic programming over all possible scorecard states that you can encounter in a game.  The 342 billion state version doesn&#8217;t actually appear anywhere in my code, other than a standalone script designed specifically to calculate that number for the video.</p><p>My original code centered around the version in which you just ignore which boxes gave which numbers of points, focusing on boxes filled in, top and bottom section scores, and number of Yahtzees.  I believe this is the most simplified version of our scorecard that still allows us to make all possible strategic decisions, with 105,285,166 non-terminal scorecard states.  If you&#8217;re trying to maximize your chances of reaching a specific number or of beating a specific opponent, you might need to know all of this information.</p><p>However, the video requires us to do a lot of computation on these states.  We need to know probabilities and expected points for each state, as well as various other calculations like &#8220;expected points for a box given that we haven&#8217;t filled that box by each turn number&#8221; for the line graph scene.  In most cases, we can&#8217;t calculate these numbers for the start state without calculating them for every other state, so it became very important to shrink the state space to do these computations.</p><p>This is part of the reason why I focused almost the entire video on the point-maximizing strategy.  If the only thing we care about is maximizing expected points, then you can ignore pieces of information that don&#8217;t directly affect future points, like the bottom section score.  This brings us down to 536,320 scorecard states, which actually allows for efficient computation of any statistic I may need in just a few minuts.</p><h2>The Endgame</h2><p>The endgame is fun to think about because it essentially gets down to what most people think about when they play Yahtzee: how do you get one box in particular?  The interesting ones here are the straights, 3 and 4 of a kind, and chance.</p><p>Chance is fun because it&#8217;s basically just a quant interview question showing up in the middle of a board game.  3 and 4 of a kind do a good job of illustrating this tradeoff between probability and raw numbers that make up an expected value, which I hope I got across in the video.  3 and 4 of a kind had a bunch of weird exceptions where you give up probability of success to maximize points.  I briefly showed most of these examples in the video, but I&#8217;ll put the full tables with these exceptions at the bottom of this article (notice how eg a single 5 appears ahead of 2-2 in the 3 of a kind table, and how 1-1 doesn&#8217;t appear at all.  There&#8217;s always something in your roll that you&#8217;d rather have than a pair of ones).</p><p>Getting the straight strategies into the video was one of the more fun challenges.  It&#8217;s an interesting puzzle to try to come up with rules like &#8220;reroll everything if you have no 3s or 4s&#8221; and &#8220;only keep a 1 if you have 1 and 2 but no 5&#8221; from a table like this:</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/hz9VX/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/08c7b8f7-89a0-42ef-a390-70a7c70ee825_1220x1742.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0354f93-38bd-4c85-9463-c0ff21b64a79_1220x1812.png&quot;,&quot;height&quot;:918,&quot;title&quot;:&quot;Small Straight Endgame Strategy&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/hz9VX/1/" width="730" height="918" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>This is a table of all of the 252 possible dice rolls prior to the last reroll of a game that is only missing a small straight (and doesn&#8217;t have Yahtzee bonuses available).  Notice that the expected points depend only on the dice that you choose to keep (this seems obvious in hindsight but took me a minute to realize).  Here&#8217;s a simplified version, grouped by the kept dice.  There are surprisingly few cases.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/rD2S1/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/343f4cab-aecd-46cf-adbb-941493012abf_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e3c2fb81-d496-43f9-bb8d-c9541b1fa5f2_1220x1072.png&quot;,&quot;height&quot;:543,&quot;title&quot;:&quot;Small Straight Endgame Strategy (Simplified)&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/rD2S1/1/" width="730" height="543" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>The way to read this chart is that you find go through the list form top to bottom until you find a subset of the dice you currently have, and then you choose those to keep.  </p><p>One thing that adds weirdness to these tables is the strange rules around Yahtzee bonuses.  If it&#8217;s the last turn, and the 100 point bonus for an extra Yahtzee isn&#8217;t available, then getting a Yahtzee is equivalent to getting whatever bottom-section box you&#8217;re looking for.  In a vast majority of cases, this doesn&#8217;t help you - Yahtzees are rare.  If you happen to have 4 of a kind and no 3s or 4s, though, then your 1 in 6 chance of finishing up the Yahtzee is a safer bet for filling your small straight than actually trying for a small straight.  I tried to use language that avoided these cases in the video, but for both straights and 3/4 of a kind there are cases where it&#8217;s better to go for a Yahtzee (full house has several cases where you&#8217;re indifferent on which one you go for).</p><p>If the 100 point bonus is available, though, then things get a lot weirder.  In any actual game, your strategy should basically be &#8220;go for a Yahtzee bonus if I need 100 points to win, and otherwise ignore it.&#8221;  If you&#8217;re trying to maximize expectation, though, then it leads to all kinds of weird changes.  Here&#8217;s that same small straight table, but with the Yahtzee bonus available:</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/0zp9K/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/938fd994-e53b-447b-b64b-840f60bacd52_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66e76bf7-d4d8-4a0a-a985-1c344bfb2c66_1220x1122.png&quot;,&quot;height&quot;:569,&quot;title&quot;:&quot;Small Straight Endgame Strategy (Simplified, with Yahtzee Bonus)&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/0zp9K/1/" width="730" height="569" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>4 of a kind becomes one of the best things to save, ahead of having 3/4 of the small straight.  Large straight is even weirder:</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/lm1Ke/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2147c6b-ec15-4032-93dd-a539810cd00b_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb08eec8-177d-4e5a-a44c-657d7d658994_1220x1122.png&quot;,&quot;height&quot;:306,&quot;title&quot;:&quot;Large Straight Endgame Strategy (Simplified, with Yahtzee Bonus)&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/lm1Ke/1/" width="730" height="306" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>If you have, say, 12333, the strategy says to keep the threes.  It&#8217;s a 1/36 chance of 100 points versus a 2/36 chance of 40 points, so it makes sense, but it still seems strange to ignore the box you&#8217;re actually going for when you&#8217;re that close to getting it.</p><p>Having a Yahtzee bonus available messes with pretty much every box.  Even in the top section, there are plenty of cases where you should just ignore the number you&#8217;re supposed to be going for to try to get a Yahtzee instead because of how valuable that 100 point bonus is.</p><h2>The Middlegame</h2><p>One of my regrets from the video is that I spent a lot of time talking about option value at various times, but don&#8217;t think I did a great job of communicating what that looks like in Yahtzee.</p><p>Yahtzee has</p><ul><li><p>9 boxes where you try to get a lot of the same number (top section, 3kind, 4kind, Yahtzee)</p></li><li><p>2 boxes where you try to get a lot of different numbers (small straight, large straight)</p></li><li><p>1 box in between these two (full house)</p></li><li><p>1 box that doesn&#8217;t care (chance)</p></li></ul><p>The goal is to keep around boxes, or combinations of boxes, that can go well with a wide variety of rolls.  Chance is the most extreme example of this, since it can get points for anything, but 3 and 4 of a kind are also good examples.</p><p>If you roll a 3 or 4 of a kind, it&#8217;s usually best to fill in a top section box instead.  This is partially because of the value of the top bonus, but also because 3 and 4 of a kind are easier to get later.  By filling in 3 5&#8217;s instead of a 3 of a kind, you get rid of a box that can only be filled in a few specific ways, and replace it with a box that can be filled in with 3 of any of the 6 numbers (even if you usually don&#8217;t want to fill it with small numbers).  The probability of getting 3 of a top box on the last turn is about 35%.  For 3 of a kind, it&#8217;s 71%.</p><p>While there are individual boxes that provide option value, there are also combinations of boxes that provide option value.  Both straights are good to keep around because of how easy it is to score points with them, but my line graph in the video actually undersells the importance of keeping these boxes open.  Once those boxes and chance are gone, every single box left on the board benefits from getting many of the same number.  If you get a roll with 4 or 5 distinct values, then that makes it difficult to do well in 10 of the 13 boxes in the game, so keeping around straights and chance for most of the game help to provide a nice balance where most rolls can do something for you.</p><h2>The Opening</h2><p>I left a lot out of the video, but opening theory for Yahtzee (at least for turn 1) turns out to not be <em>that</em> complicated.  Across both rerolls and the final box choice, there are only 89 cases to think about, and they can be simplified further for the purposes of trying to remember them if you&#8217;re so inclined.</p><h4>End of Turn 1</h4><p>Below is the full table from the video.  There are 32 distinct outcomes for turn 1 using the optimal strategy, which is actually fairly small compared to the 252 possible outcomes for the dice.  Note that some dice combinations can be represented by multiple rows on this table.  In those cases, the strategy is to choose the highest relevant row on the table.  For example, the roll 11335 could go under 2 1s or 2 3s, but 2 1s appears higher on the table, so we choose that box.</p><p>Some highlights that I didn&#8217;t mention in the video include that one place where you gain a small fraction of a point by choosing a 3 of a kind instead of a full house if you get 55666.  Each additional die you put in a top section box is worth about 3 times its face value in expected game score (eg going from 3 5s to 4 5s is worth almost 15 points, going from 1 1 to 2 1s is worth almost 3 points).  There are chance values ranging from 19 to 26.  The distribution of outcomes is fairly skewed: only 6 outcomes, totaling less than 30% of the probability, actually increase your expected score.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/b7TRz/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72cacf9d-dee4-465b-9446-c08e7df5ddb8_1220x1034.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5128392f-094e-48d2-b3fd-c383dae10163_1220x1104.png&quot;,&quot;height&quot;:243,&quot;title&quot;:&quot;End of Turn 1&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/b7TRz/1/" width="730" height="243" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><h4>Second Reroll of Turn 1</h4><p>Even though I cut them from the video for time, the strategy on rerolls for the first turn may actually be more instructive than the final decisions at the end of the turn.  The following tables have outcomes grouped by the dice that you&#8217;re supposed to keep, since that&#8217;s the only thing that matters for your expected score.  In cases where you keep all 5 dice, I just kept one representative roll (eg 11111 for Yahtzee, even though all Yahtzees are worth the same amount).  Note again that some dice rolls could fall under multiple rows in this table, so we should always keep the dice in the highest corresponding row.</p><p>Some highlights here: we sometimes keep a full house, but not always.  If we have 3 4s, 5s or 6s, we just keep those three dice rather than taking the full house.  2345 is noticeably better than the other small straights, since it doubles your chance at getting a large straight (this comes up a lot throughout the game).  You always keep at least 2 dice, and the only time you don&#8217;t keep a pair or 3 in a row is the roll 12356.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/rZK8s/2/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ef1864b-b482-4b31-af7b-863fbf292c32_1220x1034.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2a3aa6a-9fd9-401d-a158-315aeb1615ec_1220x1104.png&quot;,&quot;height&quot;:559,&quot;title&quot;:&quot;Second Reroll&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/rZK8s/2/" width="730" height="559" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><h4>First Reroll of Turn 1</h4><p>On the first roll, we care less about straights and focus more on groups of identical numbers.  The only time we keep multiple distinct numbers without a straight is in the specific roll 11345, since the model really doesn&#8217;t like keeping a pair of ones.  That reasoning also covers the roll 11236, which is the lone case where we keep just a 6 at the bottom of the chart.  Note that this also means that we never keep a full house on the first roll.  We&#8217;d always prefer to just keep 3 of a number, with a 52% chance that we&#8217;ll roll at least a fourth later on.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/1fL4o/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f12b738-a81d-46a0-a39f-4cd9fe026cf3_1220x1034.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a846f56d-b01f-4ab5-b416-f237e06be254_1220x1104.png&quot;,&quot;height&quot;:442,&quot;title&quot;:&quot;First Reroll&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/1fL4o/1/" width="730" height="442" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><h2>2-Player Strategy</h2><p>I had originally planned to focus more of this video on multiplayer strategy, but ultimately decided against it.  The Battleship video took a really long time to make.  That was partially due to having to figure everything out from scratch, but partially due to a bunch of my attempts at the placement strategy not working.  I wanted to see if I could get videos done on a monthly timeline, so I decided to stick with things that I knew would work for the Yahtzee video.  I did miss the more open-ended problems that I worked on in Battleship, but they ultimately turned out to take up a vast majority of my time on what turned out to be a small portion at the end of the video.</p><p>Single player point maximizing mostly just worked.  Other than the simplifications that had to be made to the state space, everything basically just went as intended.  Just adding one more player makes things much harder.  The single player version could be reduced to 500k states, but that doesn&#8217;t mean that the 2 player version has (500k)<sup>2</sup> states.  The thing that made the single player reduction work was that we only had to think about our ability to get future points.  When you add a second player, you need to know not only the distribution of future points for each player, but also the difference between the two players&#8217; points.</p><p>The number of reduced states peaks at turn 7 with 126,219.  Squaring that gives almost 16 billion, and when you factor in all possible differences in points between the two players and the 756 possible dice states, we&#8217;re potentially looking at quadrillions of positions, just for player 1 on turn 7.</p><h4>Reducing the State Space</h4><p>Now, there are definitely simplifications to be made here.  I&#8217;m sure there are plenty of score differences that are not possible, and we can filter out large numbers of states where one player is guaranteed to win the game, but we still lose the thing that was nice about the single player version.  We can&#8217;t just go through every state anymore.</p><p>Here are some thoughts I&#8217;ve had on ways around this, but I&#8217;d love to hear more if people have ideas.  You can probably eliminate a lot of states where one player is overwhelmingly likely, if not guaranteed, to win.  While the probability of two players&#8217; scores being close at any given time is quite high, the fraction of states in which the scores are close is much lower, so most states can be eliminated this way.</p><p>I also think there&#8217;s some reduction that can be done using the reduced scoring system I mentioned in the video.  Using the point-maximizing strategy, if player 1 beats player 2 by 1 point in the simplified scoring, there&#8217;s a 97% chance they also win the game.  If they win by 2 reduced points, the win probability is 99.98%.  I think a version where we just try to maximize the probability of beating our opponent on the reduced scoring scale (which, in a vast majority of games, caps out at 10) would get us most of the benefit, and would extend well to much larger numbers of players.  If we want to get a bit more involved, we can try to maximize P(more reduced points) + P(same reduced points) * P(more points | same reduced points), so that we only have to consider actual points in the case where reduced points are the same.</p><p>This also seems like a great place for a neural net or a tree search, but I&#8217;m not sure how much more can be squeezed out of 2-player strategy at this point.  For what it&#8217;s worth, I think a vast majority of the advantage in Yahtzee just comes from maximizing expected points, although I&#8217;m curious to seem how much the strategy changes in practice from trying to target an opponent.</p><h2>Multiplayer Strategy</h2><p>There are a bunch of different directions that you can go with multiplayer Yahtzee.  How many opponents do you have?  Are you trying to optimize your average placement, or specifically trying to win?  Do you have access to your opponents&#8217; scores?  Are you assuming that your opponents are using an optimal strategy, or a typical human one?  How do we even create a &#8220;typical human strategy?&#8221; (Battleship had the hunt-and-target, which was a sort of decent approximation, and appeared a few times in other analyses.  Coming up with a decent approximation of a human Yahtzee player seems like a really daunting task.)</p><p>My brief analysis in the video focused on one of the simplest versions of this.  Everyone else is using an optimal point-maximizing strategy.  Only you are trying to win, although you don&#8217;t have access to your opponents&#8217; scores.  I mostly just wanted to make the cool moving histograms and talk about the ridiculously large numbers of players, and it was also probably one of the easiest cases to analyze.</p><h4>Realistic Opponents</h4><p>We can at least talk about some of the other versions of this, though.  I mentioned in the video that more, worse players could be approximated as fewer, better players.  I don&#8217;t really know how accurate this is in practice.  I don&#8217;t have a great sense of what a &#8220;typical player&#8221; looks like, or what their chances would be of getting a lucky good score in a random game.  I would assume that if you&#8217;re thinking deeply about this, then you&#8217;re hopefully playing against players that are at least somewhat good at the game.  I do think that with some practice, it&#8217;s possible for a human to get pretty close to optimal.  In my 45 online games played while working on this video, my average score is actually slightly above 255, although there&#8217;s definitely some luck involved there.</p><h4>Maximizing Placement</h4><p>In the case where you&#8217;re just trying to maximize average placement, I mentioned that you should be more aggressive if you&#8217;re doing badly and more conservative if you&#8217;re doing well.  This is roughly true, but there&#8217;s a slightly more accurate version.  You should be more aggressive if your expected future points put you in a part of the overall distribution where the derivative of the probability density is positive, but conservative if the derivative is negative.</p><p>This version is still not completely accurate, but gets at a more general idea.  If the derivative of the pdf is positive, then you&#8217;re more likely to pass someone by gaining points than you are to get passed by losing points.  In most games, where point distributions are more bell-shaped, this is the same as just &#8220;be aggressive when you&#8217;re behind.&#8221;  Because Yahtzee has this weird multimodal distribution, it actually is worth thinking about this weird derivative effect, especially later in the game, if you are trying to be truly optimal about maximizing expected placement.</p><h4>Blind Multiplayer</h4><p>I think the version of multiplayer that I thought the most about, but didn&#8217;t actively work on, was this: everyone is trying to win, and playing optimally to do so, but you don&#8217;t know each others&#8217; scores.  Basically, you&#8217;re just trying to maximize your chances of having the highest score out of n good players.  This is sort of iterating on the version I put in the video.  Not only are you trying to beat all of these optimal players, but they are as well.</p><p>My approach to solving this problem is something like this: start by assuming a final distribution for the max of your opponents (maybe just use the distribution of the max of n-1 point maximizers like I did in the video).  Then come up with a strategy to maximize your probability of beating a point drawn from that distribution.  This requires using the larger state space with the 100 million states instead of the 500k, but this is still feasible to do.</p><p>Once you do that, replace everyone&#8217;s strategy with the new strategy you just computed, and repeat.  This should converge to an optimal strategy for this version of the game.  I would expect this to lead to a riskier strategy for everyone, resulting in higher chances of large totals than the ones shown in the video.  We&#8217;re still not properly reacting to everyone&#8217;s performance throughout the game, but we can (somewhat) efficiently calculate a strategy that is good in practice.</p><h4>Actual Optimal Multiplayer Strategy</h4><p>That leaves open the purer question of true optimal play.  I think the reduced point system can get you pretty far, but I don&#8217;t have anything particularly promising for how to beat that.  I&#8217;m imagining some sort of model that can take in everyone&#8217;s current state and spit out a distribution for the winning score of all of your opponents, but presumably that model should also take your state as an input, making it a bit circular.  Endgames can probably be analyzed pretty thoroughly, since there are hopefully only a few people with a realistic chance of winning by the end of the game, but earlier strategies would require a lot of things that I don&#8217;t have great thoughts on.  I&#8217;d love to hear what people think.</p><h2>Miscellaneous Tables</h2><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/hUQVq/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/790e0c70-d16d-4ccd-b55a-1689edd2e91c_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82b77d0c-e923-4877-b2f9-2c5e4e188cc2_1220x1072.png&quot;,&quot;height&quot;:243,&quot;title&quot;:&quot;4 of a Kind, First Reroll of Last Turn, No Yahtzee Bonus&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/hUQVq/1/" width="730" height="243" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/49MBk/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3d2e00c2-2732-4e23-9631-43aea6889ae9_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c10a441-28b6-458b-8f79-488b0c979845_1220x1072.png&quot;,&quot;height&quot;:543,&quot;title&quot;:&quot;3 of a Kind, First Reroll of Last Turn, no Yahtzee Bonus&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/49MBk/1/" width="730" height="543" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/mGnli/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60f2939b-0e85-4bac-9c75-b4b606f195e7_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b78e894c-ae74-4dfb-b939-7bb376622683_1220x1072.png&quot;,&quot;height&quot;:543,&quot;title&quot;:&quot;Chance Endgame Strategy (with Yahtzee Bonus)&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/mGnli/1/" width="730" height="543" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/FEjG7/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47314cf8-81f2-4a4a-bf75-c0ca88d08f87_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0b9a256-2b57-4126-a790-3934f3aaf7d0_1220x1072.png&quot;,&quot;height&quot;:543,&quot;title&quot;:&quot;4Kind Endgame Strategy (with Yahtzee Bonus)&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/FEjG7/1/" width="730" height="543" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/3Edcg/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cafcdefb-6501-4c8a-93d5-2219e94acf16_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b78ee40c-f6c9-4834-9b05-0f8fe9618d3d_1220x1072.png&quot;,&quot;height&quot;:543,&quot;title&quot;:&quot;3Kind Endgame Strategy (with Yahtzee Bonus)&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/3Edcg/1/" width="730" height="543" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/cDvBy/2/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0af93b63-8836-4426-a961-0ba7435c182f_1220x1002.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/21c6c444-e2ef-42b5-b43f-1dec691df334_1220x1122.png&quot;,&quot;height&quot;:569,&quot;title&quot;:&quot;Threes Endgame Strategy (with Yahtzee Bonus, need 3 3's for Top Bonus)&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/cDvBy/2/" width="730" height="569" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://ballparkfigures.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Ballpark Figures! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Yahtzee vs. Battleship]]></title><description><![CDATA[Overanalyzing YouTube from a sample size of one video]]></description><link>https://ballparkfigures.substack.com/p/yahtzee-vs-battleship</link><guid isPermaLink="false">https://ballparkfigures.substack.com/p/yahtzee-vs-battleship</guid><dc:creator><![CDATA[Patrick Liscio]]></dc:creator><pubDate>Wed, 15 Jul 2026 04:34:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!V63i!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0967df3-9b19-4e80-95a7-3b4ca32ab3d6_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>My second video, on Yahtzee, comes out this Sunday.  You can find my Battleship video <a href="https://www.youtube.com/watch?v=ZBdajiTz48k">here</a>.</p><p>This post was originally just going to be the end of my Yahtzee post, but it ended up being involved enough that I decided to make it into a separate post.  It&#8217;s also a quick preview of my next video for the small group of people who read this Substack.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://ballparkfigures.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Ballpark Figures! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>When I first made this channel, I decided that I would do one non-video project alongside each of my videos as I build up the channel.  My first project was creating this Substack.  My third will probably be a Discord server or a Patreon, so be on the lookout for those.</p><p>My project for this video is vibe-coding an hourly job that pulls my channel&#8217;s analytics from the YouTube API, as well as potentially some basic information about viewership numbers from other similar channels.  I don&#8217;t really have great plans on how I&#8217;m going to use this data - a lot of it won&#8217;t mean much until I have a second video worth of data to make comparisons, but I know I&#8217;ll be glad that I have it eventually.  I&#8217;ll almost certainly make a video about YouTube analytics at some point down the line.</p><p>It also got me thinking again about the inner workings of YouTube.  I&#8217;ve had a lot of thoughts as I&#8217;ve created my first two videos, and I figured I&#8217;d write them down, partially for my own benefit, and partially for anyone who might be interested in this sort of thing.</p><h2>On Battleship</h2><p>My first video, on Battleship, did far better than I possibly could have expected.  As I write this, the video has over 470 thousand views, and the channel has almost 9000 subscribers.  I thought a really successful outcome would be 100k-200k views, so the actual outcome was something I didn&#8217;t even really consider.  I was aware that it would be possible for the video to have some success - I chose Battleship as a topic partially because there was a track record of other videos about it doing pretty well - but it&#8217;s one thing to know that a lot of people could watch your video and another to see it happen.  I am truly grateful to everyone who watched the video, gave insightful comments, and subscribed to Ballpark Figures.</p><p>A weird thing about YouTube is that it&#8217;s much easier to find successful channels than unsuccessful ones.  If I search for Battleship strategy on YouTube, I can find several videos with hundreds of thousands or even millions of views.  There are plenty of other videos about Battleship, but it&#8217;s much harder to find them.  YouTube gives a great answer to the question &#8220;are there successful videos about this topic?&#8221; but the question I wanted answered before releasing the Battleship video was &#8220;does my video look more like the successful videos, or more like the unsuccessful ones?&#8221;  That second question is much harder to answer, which likely tricks a lot of YouTubers into thinking success is easier than it is.  Unfortunately, YouTube would probably consider this a feature rather than a bug, since it encourages more content on the platform.</p><h4>Projecting Battleship Success</h4><p>I did have a few things that did convince me that my video could work.  One was looking at existing videos on the topic.  I was eventually able to search hard enough to find some less successful videos, and there was a pretty clear dropoff in quality between the successful ones and the unsuccessful ones.  My beliefs on the quality of the videos didn&#8217;t always align perfectly with the number of views, but I couldn&#8217;t find any videos that seemed genuinely good and weren&#8217;t at least somewhat successful.</p><p>I didn&#8217;t quite have any great comparisons for my video - if there was another Battleship video with a similar level of depth, I probably wouldn&#8217;t have made mine.  But the successful ones had a few things in common.  They were all by established channels with hundreds of thousands to millions of subscribers (the largest was <a href="https://www.youtube.com/watch?v=LbALFZoRrw8">VSauce2</a>), and all were between 4 and 9 minutes.  One of the best was a Keith Galli video that was <a href="http://www.youtube.com/watch?v=jMpbYpaKtao">literally just a PowerPoint presentation</a>.  I knew that my video would be more comprehensive than anything out there, and the production quality would at least be comparable to a lot of these videos.  However, it left a lot of questions.  The YouTube algorithm favors longer videos, but would people actually want to watch 19 minutes of Battleship content?  Would people even see it if it came from a new channel?</p><h4>One Hit Wonders</h4><p>The next place I looked was for &#8220;one-hit wonder&#8221; channels: channels with a single video that turned out to be very successful.  It&#8217;s hard to take too much stock in these, because of the same availability bias issue I mentioned earlier, but they provided some reassurance that success for a video like mine was at least possible.</p><p>I found two of these videos: <a href="https://www.youtube.com/watch?v=inXUp5j107I">this one</a> on the Elo rating system in chess, and <a href="https://www.youtube.com/watch?v=POGGNamZoHQ">this one</a> mathematically analyzing the New York Times Connections game, which happened to come out while I was working on the Battleship video.  Both are similar length, comparable production quality, and similar topics.  Since I assumed that there were similar videos out there that were less successful than these, I sort of considered these two videos, which each have about 200k views, as an upper bound for what my first video could do.</p><p>I suspect that my video outperforming these is because of the relevance of the topic as well as the title and thumbnail (and maybe some amount of production quality in the case of the Connections video).  I didn&#8217;t put a ton of time into the title and thumbnail, but I think I got a bit lucky with them turning out pretty decent anyway.  YouTube allows you to A/B test titles and thumbnails.  My current title (I Analyzed All 30,093,975,536 Battleship Boards So You Don&#8217;t Have To<strong>) </strong>beat out two slight variations: one which used &#8220;30 Billion&#8221; instead of the full number and the original title, which just said &#8220;&#8230;Every Battleship Board&#8230;&#8221;</p><h2>Yahtzee vs. Battleship</h2><p>Success on YouTube is a weird thing.  My original plan was to start with three videos about boardgames: Battleship, Yahtzee, and Mastermind, and then to evaluate afterward to figure out what direction I want to take things after that.  Somehow, one successful video switched my approach from &#8220;what would be a fun topic to cover?&#8221; to &#8220;would half a million people watch this?&#8221;  Yahtzee meets that threshold (and the video was well underway by the time the Battleship video came out).  Mastermind does not.  It&#8217;s a really fun game to analyze, and I want to make a video about it at some point, but I want to wait until I learn how to properly package videos that can&#8217;t be carried by the topic itself.</p><h4>Changes for this video</h4><p>My original intention with the Battleship video was to make the most comprehensive strategy guide on YouTube.  People probably wouldn&#8217;t watch it right away, but maybe in a few years, people would search for Battleship strategy and come across my video, and I could know that I put something useful into the world.  Battleship already had a few pretty good videos out there, although I thought that I could be more thorough than anything out there even if I couldn&#8217;t match the production value.</p><p>The first major difference in the new video is just the topic - Yahtzee didn&#8217;t really have any really successful strategy videos, although I think this is mostly for lack of trying.  It&#8217;s probably just a less popular game: I think it has a similar following in the US, but Battleship is much more popular globally.  This was a bit of a double-edged sword: I got a lot of comments saying that I got the rules wrong (I used the American rules.  Most of western Europe uses the same rules, except ships can&#8217;t be adjacent, and you can keep guessing after a hit.  Most of eastern Europe uses the European rules, but with different ships: 4 of length 1, 3 of length 2, 2 of length 3, and 1 of length 4).  Granted, the YouTube algorithm likes comments, so maybe this was actually for the best.</p><h4>Audio/Video</h4><p>Speaking of comments, the other primary criticism for the video was the audio quality, especially during the talking head segments.  I got a new microphone (and made sure to actually switch my settings to use it), so that should hopefully be a quick win.  I&#8217;m honestly looking forward to getting a wider range of things to improve after the next video, since I get the feeling that the audio quality sort of overrode any other criticism that people might have had.</p><p>I also think the animation quality improved quite a bit in this video, although Yahtzee is inherently just a less visual game.   I put a lot of thought into how to visually represent the various rerolls, the different boxes, and the scorecard itself.  Ultimately, though, the game is just a bunch of dice and a scorecard, and I have several scenes that are just those two things.  We&#8217;ll see what people think of that.</p><h2>Video Content</h2><p>After Battleship did a lot better than I expected, I was reluctant to change much.  I ultimately decided, though, that it was still more useful to get a better sense of what worked rather than just trying to replicate the first video.  Chances are that most of the things in the Battleship video must have gone right, but as far as I know, it&#8217;s possible that there were actually a bunch of things holding it back from being an even better, more successful video.  I ultimately just decided to do what seemed natural for Yahtzee and then just log the changes so that I can get a better sense of what works.</p><p>The first major change is that this video is much longer.  I haven&#8217;t finished editing, but it&#8217;s going to be over half an hour.  This wasn&#8217;t a conscious choice.  The script was only a few pages longer than Battleship (although Battleship had an entire scene cut at the last minute).  I think the text was just a lot more dense, and the time from talking about every box on the scorecard added up.  I didn&#8217;t put anything in the video that I didn&#8217;t think was genuinely helpful, and I know that the YouTube algorithm favors longer videos, but we&#8217;ll see what people&#8217;s tolerance is for a video this long about a topic like Yahtzee.  I made a joke in the video about people watching a 40-minute video about Yahtzee, but I had to amend the original joke up from 30 minutes once I realized I was going to go over that.</p><h4>The Math</h4><p>One thing adding to this run time is that I made the video a bit more math-heavy.  The actual discussion of Yahtzee strategy doesn&#8217;t start until about 10 minutes into the video.  I tried to stick to my approach of mostly glossing over the math, and seriously considered cutting the dynamic programming section altogether, but decided to stick to the approach of seeing what works rather than assuming.  I had originally intended for my channel to appeal to both math people and people interested in the topic itself, but it seems like the Battleship video mostly hit the math crowd.  I&#8217;ll keep evaluating, and try to see if I can figure out better ways to appeal to a broader audience without making the videos less enjoyable for my fellow nerds.</p><h4>Timing and Ordering</h4><p>I also sort of violated the YouTube rule that you should front-load your most interesting content toward the beginning of the video.  I think the intro was one of the best scenes in the Battleship video, and while I think I put together a solid first few scenes for Yahtzee, a lot of the animations I&#8217;m most proud of are toward the end.  Bigger channels like Veritasium are also known for pushing the more complicated math toward the end of their videos, so that they can provide something for people who are really invested in the topic without pushing away their more general audience before getting to the part everyone would enjoy.</p><p>The Battleship video lent itself very well to this - the ship placement section naturally belonged at the end.  In Yahtzee, the multiplayer sections would have played this role, but I decided to keep these short to avoid the massive delays that slowed down the Battleship video.  Instead, we got a mathy section at the beginning, followed by a slightly technical endgame discussion.  We&#8217;ll see what people think.</p><p>In the other direction, though, I&#8217;m curious to see what people think about the relative lack of depth in the Yahtzee video.  The ship placement strategy in Battleship took up a ton of my time and probably made the video more confusing, but the people who were most invested in the video seemed to get a lot out of that (and make some insightful comments on the video).  In Yahtzee, I sort of stuck to the things that worked, avoiding a lot of the multiplayer strategy that would have added complexity to the video.</p><p>Overall, I&#8217;m really excited to be releasing the Yahtzee video.  In some ways, a lot of the pressure is off from not having to worry about how long it will take before people start seeing my videos.  On the other hand, I&#8217;m worried that I&#8217;ve set my expectations unrealistically high after one anomalous video.  I guess I&#8217;ll just have to wait and see.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://ballparkfigures.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Ballpark Figures! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Battleship]]></title><description><![CDATA[My first video is finally up!]]></description><link>https://ballparkfigures.substack.com/p/battleship</link><guid isPermaLink="false">https://ballparkfigures.substack.com/p/battleship</guid><dc:creator><![CDATA[Patrick Liscio]]></dc:creator><pubDate>Sat, 13 Jun 2026 20:31:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CROU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>My first video is finally up!  You can find <a href="https://www.youtube.com/watch?v=ZBdajiTz48k">here</a>.  I&#8217;m thrilled to finally be on YouTube. </p><p> This post has some more thorough explanations of things that I couldn&#8217;t cover in the video, although I realize it&#8217;s a bit scattered.  I&#8217;ll update this page as I think of some more things.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://ballparkfigures.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Ballpark Figures! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CROU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CROU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png 424w, https://substackcdn.com/image/fetch/$s_!CROU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png 848w, https://substackcdn.com/image/fetch/$s_!CROU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png 1272w, https://substackcdn.com/image/fetch/$s_!CROU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CROU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:168234,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://ballparkfigures.substack.com/i/201301429?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CROU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png 424w, https://substackcdn.com/image/fetch/$s_!CROU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png 848w, https://substackcdn.com/image/fetch/$s_!CROU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png 1272w, https://substackcdn.com/image/fetch/$s_!CROU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7c1c08-86e7-42bf-baa8-b68d332ba76d_3840x2160.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I spent a lot of time trying to figure out the topic for my first video.  My list of video ideas already numbers in the triple digits, although most of these will never see the light of day.  I ultimately decided to focus my first few videos on boardgames, hoping that the animations would be simpler, and the math would be more straightforward, since I could generate the data myself.  It turned out that I was very wrong on that second point.</p><p>Battleship specifically combined a few nice things.  First, it&#8217;s the right level of complexity for an early video: complicated enough that it&#8217;s worth thinking about, but simple enough that it&#8217;s possible to cover pretty much the whole game with a few hundred lines of code and a 20-minute video.</p><p>Second, it seems like a topic that people want to see.  There are already <a href="https://www.youtube.com/watch?v=jMpbYpaKtao">several</a> <a href="https://www.youtube.com/watch?v=8FctDuTfcO8">successful</a> <a href="https://www.youtube.com/watch?v=395D3dkts3s">videos</a> covering Battleship, and while some of them are quite good, they all leave clear gaps on how their strategies can be implemented in practice.  The videos all seemed to be based on <a href="https://www.datagenetics.com/blog/december32011/">this</a> page on DataGenetics, which does a good job of summarizing some strategies but is light on implementation details.</p><p>A favorite example of this becoming a problem was in <a href="https://www.youtube.com/watch?v=LbALFZoRrw8">the most popular Battleship video on YouTube</a>.  They mention a version of the heatmap strategy, saying &#8220;we can employ a rough algorithm in our minds,&#8221; but then refusing to elaborate on what our minds are actually doing.</p><p>I&#8217;m hoping that this is a place where my channel can add some value.  I have the time and the background to code some of these things up myself, making it easier to answer questions that might not be answered elsewhere.</p><h2>The Approach</h2><p>My original goal for this video was to come up with something close to a Nash equilibrium strategy for Battleship: strategies for both the placer and the guesser that are as good as possible against each other.  The thought was that I would go back and forth, coming up with a good guessing strategy, then a placing strategy that would make the guessing strategy fail, and then a guessing strategy that would be immune to this, and so on.</p><p>There were two main problems with this.  First, these are complicated strategies.  Both the placer and the guesser would have to employ random strategies (if your opponent knows your first guess is always E5, they&#8217;ll never put a ship there, so you have to sometimes guess less likely squares to avoid this).  Actually coming up with these strategies is hard even with a computer, and then trying to distill them into advice that human players could feasibly follow seemed like too difficult of a task.</p><p>The other issue is that the things that I put in the video ended up being a lot more difficult than I expected.  There were plenty of times that I expected an approach to work on the first try but instead needed to spend weeks experimenting to get anything to work.  I don&#8217;t think I can match a lot of the other Battleship videos on production quality, but I&#8217;m pretty sure that this is the most comprehensive Battleship strategy guide on the internet, and I&#8217;m hoping that people find it useful.</p><h2>The Greedy Guessing Strategy</h2><p>The core of this video comes from the greedy guessing strategy, which is based on the counterintuitive idea that random ship placements lead to non-uniform square probabilities.  I spent a while trying to rigorize why we should even care about this idea.  After all, players aren&#8217;t placing their ships uniformly at random, and they certainly aren&#8217;t choosing entire configurations uniformly at random.  So why make the randomness assumption at all?</p><p>The first reason is something that I briefly mentioned in the video.  If we have no information about what our opponent is doing, that&#8217;s sort of like imposing a uniform prior on possible things they could do.  If we assume that all squares are equally likely, then we are implicitly assuming that the placer is trying harder to put their ships in the corners of the board, since that is what would need to happen in order to see the same square probabilities across the board.</p><p>There&#8217;s another reason, which is still largely intuition-based, that I think applies more near the end of the game.  As the game goes on, the decisions that you&#8217;re making become more specific, and more tied to the exact collection of squares that have been guessed so far.  It&#8217;s easy to imagine an opponent who tries to put their ships in the corners, but it&#8217;s hard to imagine one who specifically tried to make it more likely to put their cruiser horizontally rather than their cruiser or battleship vertically through B7 when you have a hit there but misses at B5, B9, and E7.  As the scenarios get more specific, it&#8217;s harder to imagine that your opponent planned for them.</p><h4>&#8220;Find Mode&#8221; and &#8220;Sink Mode&#8221;</h4><p>Even though they didn&#8217;t make it into the video, a lot of the insights I found about the game came from dividing it into two phases: find mode and sink mode.  In find mode, every ship has either not been hit, or is completely sunk, so our focus is to find the next ship.  In sink mode, we have at least one ship that is partially sunk, so our goal is usually to sink that ship before moving on.  There are technically a few cases where the greedy strategy will continue searching for ships, even when one is partially sunk, but this is rare, and there are other good reasons to try to break things down this way.  I mention these two modes now because they are useful for a few things later on.</p><h4>The Implementation</h4><p>Part of the reason why there isn&#8217;t a lot of good information out there about our greedy strategy is that it takes a lot of work to simulate even a single game.  Given a position on a board, you need to check all 30 billion possible configurations (technically only 15 billion, since every position has a similar position with the submarine and cruiser switched) to see how many of them are compatible with the information you have so far.</p><p>Once there are a few pegs on the board, this gets a lot easier: you can just check which positions for the submarine and cruiser are compatible with the given pegs.  For each of those positions, you can check which positions for the carrier are compatible, and for each of those, you can check which positions for the battleship, and then the destroyer, are compatible.  The number of things that you have to check goes down quickly, but at the beginning of the game, it&#8217;s still 15 billion.</p><p>Just simulating a single game this way could take hours, even on my pretty solid desktop, but there are thankfully some nice simplifications that we can do.  One thing that saves us is that the positions that take the longest to check (the ones at the beginning of the game) are also the ones that show up the most often.  If I run 10,000 simulations, then every single one of them will start with an empty board, about 8,000 will start with a miss at E5, and about 2,000 will start with a hit at E5.  If we just cache the decision that we make in each position, then we avoid having to duplicate the most time-consuming steps.  This allowed me to run my 10,000 simulations in about a day.</p><p>A few things on this: this is part of the reason why I gave up on coming up with a good randomized strategy.  It will take much longer to build up the cache if we aren&#8217;t making the same decision every time that we see a position.  Second, this is also why the hunt-target histogram looks so much smoother than the other ones in my video.  I was able to run a million hunt-target simulations in much less time than the 10,000 simulations for the variants of the greedy method.  It also brings up some important points about the information that we get during the game.</p><h4>Information in Battleship</h4><p>We essentially get four types of information during the guessing phase of the game:</p><ol><li><p>Hit: there is a ship at that location</p></li><li><p>Miss: there is not a ship at that location</p></li><li><p>Sunk [SHIP]: that ship is entirely contained in the hits you&#8217;ve gotten so far</p></li><li><p>Sunk [SHIP]: that ship must go through the square you just hit</p></li></ol><p>1 and 2 are extremely important.  3 is somewhat helpful, and 4 is helpful only in very specific cases where two multiple ships are next to each other.</p><p>My original greedy strategy only took 1 and 2 into account, but I ended up needing to add 3 to get the placing strategy to work.  I only added 4 after the video was already filmed, and thankfully, it turned out not to make much of a difference.  Here are the average turn counts for 10,000 simulations for each version of the strategy:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;96221cc8-4c15-4375-af3e-e9b87c9cf3d8&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Info used    Average turns
12           46.94
123          44.71
1234         44.69</code></pre></div><p>That&#8217;s not a statistically significant difference between the last two, and I suspect that if I ran enough trials, including 4 would improve the results slightly, but this confirms that 4 is not really contributing much here.</p><h2>Flaws in the Strategy</h2><p>There are a few problems with the greedy strategy.  One is that it is exploitable.  If your opponent knows that you&#8217;ll start the game in the middle, they will be able to win pretty easily by putting ships in the corners.  The main way around this is to use a randomized guessing strategy, but this didn&#8217;t seem worth doing for reasons I mentioned above.</p><p>The other big problem problem with the greedy strategy is that it is, well, greedy.  It doesn&#8217;t consider how earlier moves will affect later ones.  It turns out, though, that actually finding a way to improve on this is easier said than done.</p><h4>The Checkerboard</h4><p>One thing that I thought would improve things quickly is the checkerboard strategy.  This is mentioned in a few other videos on Battleship, and seems like a pretty straightforward win.  The idea is this: every ship has length at least 2.  This means that if you&#8217;re careful, you only need to check half of the squares on the board in order to guarantee that you find every ship.  Specifically, you can color the board like a checkerboard, and then target only the dark squares.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L9QO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L9QO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png 424w, https://substackcdn.com/image/fetch/$s_!L9QO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png 848w, https://substackcdn.com/image/fetch/$s_!L9QO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!L9QO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L9QO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:26915,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://ballparkfigures.substack.com/i/201301429?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L9QO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png 424w, https://substackcdn.com/image/fetch/$s_!L9QO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png 848w, https://substackcdn.com/image/fetch/$s_!L9QO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!L9QO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc83e9c2-4f5b-4c66-8cfa-e9e36ef3fe28_1920x1080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>A major concern with the greedy strategy is that it doesn&#8217;t think ahead to how the current move will affect the rest of the game, and the parity issue addressed by the checkerboard is one place where the greedy strategy fails.  The greedy strategy will sometimes get stuck in cases where it has to make a bunch of guesses right next to each other because it made incompatible choices in different sections of the board.  A properly implemented checkerboard strategy should never take more than about 65 moves, since it should find all of the ships in no more than 50, but the greedy strategy will take longer than this reasonably often.</p><p>I had actually already animated and recorded a scene on improving the greedy strategy using the checkerboard.  The idea is this: when you&#8217;re in find mode, ignore the light squares on the checkerboard, and greedily choose the most likely dark square.  When you&#8217;re in sink mode, just choose the most likely square.</p><p>There&#8217;s just one problem with the checkerboard strategy: it doesn&#8217;t work.  I mean, it does.  It&#8217;s a huge improvement compared to randomly guessing, or even when added to the hunt and target strategy.  But the greedy strategy is so optimized that the checkerboard does more to prevent good guesses than to help future guesses.  The greedy strategy used in the video took 44.7 guesses on average, while adding the checkerboard approach actually increased it to 45.4.</p><p>I put in a few more attempts to try to get this to work.  I figured that the checkerboard might be most helpful at the beginning, organizing the guesses early on so that we wouldn&#8217;t have to waste turns later.  At the end, the checkerboard might just be getting in the way of much more likely guesses when there are only a few places that ships can go.  I tried an approach where we use the checkerboard strategy for some number of turns at the beginning, and switch to full greedy after that.  Here are the results.  Checkerboard[n] refers to n moves of checkerboard strategy, followed by regular greedy for the rest of the game.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;9d8df428-1a34-4da1-804d-1413ea008d8c&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Strategy          Average Turns
Greedy            44.71
Checkerboard      45.39
Checkerboard15    44.91
Checkerboard20    44.91
Checkerboard25    44.93
Checkerboard30    45.01
Checkerboard40    45.11
Checkerboard50    45.41</code></pre></div><p>Still nothing that can match the original greedy strategy, let alone beat it.  I guess I&#8217;m glad I checked that before releasing the video.</p><h4>Multiplayer Strategies</h4><p>The whole video basically assumes that Battleship is two 1-player games rather than a 2-player game.  While we have to think about how our opponent places their ships when we guess and vice versa, we&#8217;re basically just trying to guess as quickly as possible, without having to consider that there is another person guessing at the same time.  In a lot of games, there are specific things you have to think about when you&#8217;re ahead or behind.  If a basketball team is behind at the end of the game, they are likely to commit a lot of fouls.  This is a terrible strategy for most of the game, and most of the time, it causes them to lose by more than if they didn&#8217;t do it, but when you&#8217;re behind, it makes it better to play high-risk, high-reward strategies that wouldn&#8217;t be worth it otherwise.  Are there cases in a Battleship game where you should change your approach if you&#8217;re ahead or behind?</p><p>I strongly suspect that there are cases like this, although I haven&#8217;t been able to come up with any concrete examples yet.  I&#8217;m looking for an example where either</p><ol><li><p>A player who is behind will make a move that will make them use more turns on average, but if it works, will allow them to finish in less than a certain number of turns and win the game.</p></li><li><p>A player who is ahead will make a move that will make them use more turns on average, but is guaranteed to take at most a certain number of turns, guaranteeing that the other player can&#8217;t finish in time.</p></li></ol><p>I&#8217;m sure there are other possible examples of two player strategies like this, but I expect that the easiest examples to come up with would take one of these two forms.  Either way, I doubt that tailoring your strategy to whether you are ahead or behind makes as much of a difference in Battleship as in a lot of other games.</p><h2>Placement Strategy</h2><p>While it accounted for relatively little of the video, the placement strategy took the vast majority of my time, and ultimately led to some long delays for the video.  I was hoping that this would be the main thing that my video would contribute, since the greedy guessing strategy already exists in various places online, even if there isn&#8217;t a really thorough explanation anywhere else.</p><p>By the end, I was pretty convinced that random ship placement is actually fairly close to optimal when it comes to placing ships in a way that can&#8217;t be exploited by a good guesser.  Negative results aren&#8217;t as fun to put in a video, but this is pretty interesting in and of itself.</p><p>I had to speed through it in the video, but I want to be a bit more clear about what I was trying to do in this section.  As I mentioned in the video, there&#8217;s a pretty good way to beat the greedy strategy, or any deterministic strategy, but just not putting your ships where your opponent is guessing.  But that&#8217;s not really what we want from our ship placement strategy.  We want a strategy that works against any opponent, including one who knows the strategy that we&#8217;re using.</p><p>For the entire ship placement section of the video, every time I said &#8220;greedy strategy&#8221;, I meant &#8220;greedy strategy for this specific ship placement strategy&#8221;.  For whatever ship placement strategy we were using, the greedy strategy would calculate the most likely square to contain a ship under that strategy and then pick the most likely one.  The greedy strategy isn&#8217;t completely optimal, but I suspect that it&#8217;s close enough to optimal that if a ship placement strategy forces more guesses against a greedy strategy, it&#8217;s probably hard to exploit in general.</p><h4>The Linear Algebra Approach</h4><p>I had originally planned to take a linear algebra approach to ship placement.  This was going to be the most &#8220;pure math&#8221; part of the video.  There are 180 places for a destroyer to go on a battleship board (10x9 horizontal, and 9x10 vertical).  There are 160 for the cruiser and submarine, 140 for the battleship, and 120 for the carrier.  If you randomly place a destroyer by assigning probabilities to each of the 180 locations, then you can use that to figure out the probabilities of the destroyer landing on any square.</p><p>In some sense, the &#8220;problem&#8221; with random ship placement was that assigning equal probabilities to the 180 destroyer locations led to unequal probabilities for the 100 squares.  So can we assign probabilities to the 180 locations so that the 100 squares become equally likely?  This can be written as a system of equations with 100 equations and 180 variables, plus a constraint that the variables are probabilities and therefore must be at least 0 and sum to 1.  There are more variables than equations, so if we add some extra constraints, it seems like we should be able to get a nice solution for this.</p><p>This turns out not to work, though.  The destroyer and carrier both produce systems with infinitely many solutions, while the other ships produce systems with none.  While it may seem strange at first that it only works for the shortest and longest ships in the game, there&#8217;s actually a pretty nice reason for this: the lengths of those ships (2 and 5) are both divisors of the length of the board (10).</p><p>Essentially, what happens is this.  Just find a way to put 50 destroyers on the board together.  The easiest way is just to do 10 rows of 5 horizontally, or 10 columns of 5 vertically.  Then, you can just place a destroyer in any of those 50 locations with probability 1/50.  This will give every square a 1/50 chance of being covered.  You can do the same thing with 20 carriers.  The infinitely many solutions come from the fact that you can take linear combinations of any of these arrangements.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!571x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!571x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png 424w, https://substackcdn.com/image/fetch/$s_!571x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png 848w, https://substackcdn.com/image/fetch/$s_!571x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!571x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!571x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:73419,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://ballparkfigures.substack.com/i/201301429?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!571x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png 424w, https://substackcdn.com/image/fetch/$s_!571x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png 848w, https://substackcdn.com/image/fetch/$s_!571x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!571x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63dc7c32-f9f5-4e5a-b08c-cbc53e21aa7e_1920x1080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>While it&#8217;s not obvious that there shouldn&#8217;t be any solutions for the submarine and cruiser, it&#8217;s pretty clear that you at least can&#8217;t use the above method, since it&#8217;s impossible to cover 100 squares with ships of length 3.  The fact that it doesn&#8217;t work for the length 4 battleship, however, actually brings up a cool math problem.  10 isn&#8217;t divisible by 4, but 100 is, so it seems like we should be able to come up with a way to arrange 25 battleships on the board and do the same thing.  There&#8217;s actually a nice classic proof for why we can&#8217;t.</p><p>It involves, funnily enough, a checkerboard, but not quite the same one we used before.  We make a checkerboard pattern out of 2x2 blocks instead of 1x1 blocks.  Wherever we place a battleship on this board, it will always cover 2 dark squares and 2 light squares.  However, the board has 52 dark squares and only 48 light squares.  Since there are 48 light squares and 2 per battleship, this means we can only fit 24 battleships on the board.  Indeed, it turns out that any way we can possibly fit 24 battleships on the board will have to leave 4 dark squares uncovered.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0B_o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0B_o!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png 424w, https://substackcdn.com/image/fetch/$s_!0B_o!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png 848w, https://substackcdn.com/image/fetch/$s_!0B_o!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!0B_o!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0B_o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40293,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://ballparkfigures.substack.com/i/201301429?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0B_o!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png 424w, https://substackcdn.com/image/fetch/$s_!0B_o!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png 848w, https://substackcdn.com/image/fetch/$s_!0B_o!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!0B_o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F134e1df9-897b-4546-b9c5-b29d602b2976_1920x1080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>But back to the original problem.  Even if we try to find approximate solutions to our systems of equations for each ship, it leaves open some major issues.  It specifically comes down to the difference between the find and sink phases of the game.  If we choose the destroyer location randomly from 50 non-overlapping locations, then this turns out to be theoretically optimal for taking as many turns as possible to find, on average.  However, we can always sink the ship in just one additional turn, because once we&#8217;ve found the ship, we know which of the 50 locations we&#8217;ve hit, and then we know where the other half of the ship is.  In general, the linear algebra approach is good for lengthening the find phase of the game, but possibly at the expense of the sink phase.</p><p>So our linear algebra approach doesn&#8217;t really work, since it can lead to solutions that are not great in practice.  What if we instead just try to maximize the total turns to find and sink directly?</p><h4>The Expected Turns Approach</h4><p>Instead, we&#8217;ll try to just maximize the expected number of turns needed to find and sink each ship.  We&#8217;ll still go one ship at a time, since finding a probability distribution over all 30 billion configurations is a bit too complicated.  For each ship, we&#8217;ll place the ship at random over all possible locations, and then we&#8217;ll use a greedy guessing strategy that&#8217;s aware of the placement probabilities to try to find and sink just that one ship.  If we change the probabilities, we can see if the 1-ship greedy guessing strategy takes more or less time to sink the ship on average.  Since there are only 120-180 places where the ship can go, we can just check the number of turns needed to sink the ship in every possible location every time we change the probabilities.</p><p>I wrote an optimizer that goes through all pairs of ship locations, and tries to increase the probability of putting the ship in one location, and similarly lowers the probability of putting the ship in the other location.  If this increases the expected number of turns to find the ship, we keep the new probabilities and keep going.  Running this for each ship leads to increases of about 1-2 turns per ship.  We can then sample random ship configurations by just choosing a location for each ship at random from our updated probability distribution, and throwing out any samples with overlapping ships.</p><p>But then something strange happened.  Even though the single ship find-and-sink times increased by 1-2 turns per ship, the total number of turns actually went <em>down</em> when the greedy guessing strategy was run on 5 ships.  For a while, I assumed that there was just a bug in my code (and for some of that time, there was), but I ultimately realized it was something else: the same find vs. sink issue that came up in the linear algebra approach.</p><p>Basically, finding and sinking look different when you go from one ship to 5.  The number of turns from the 5 sink phases roughly add, but the number of turns from the 5 find phases don&#8217;t.  This is because the same turn can be used to try to find multiple ships.  Your first turn of the game contributes toward the find phase for all 5 ships.  After you sink your first ship, each turn contributes to 4 different find phases, and so on.  Each turn in the sink phase usually only contributes toward one ship.</p><p>So when we run the optimizer for each ship, we are essentially trying to maximize the number of turns in 5 find phases plus 5 sink phases, when we really have 1 find phase and 5 sink phases.  The optimizer did a great job of increasing the number of turns in each find phase, but the number of turns in the sink phases actually went down slightly.  This worked for individual ships, but when we combined them, the loss from all of our sink phases added up and cancelled out any gains we got from the find phase.</p><p>So I changed my optimizer.  In an attempt to weigh the sink phase properly, I tried to maximize (1/5 * find_turns + sink_turns) for each ship, instead of the (find_turns + sink_turns) that we had before.  This did slightly better, but still didn&#8217;t show a meaningful improvement.</p><p>The next attempt involved the observation that not all ships are created equal.  In some sense, adding a turn to the find time only actually affects the final result of the game if the ship you&#8217;re trying to find is your last ship.  Finding your first ship a turn earlier doesn&#8217;t really help you unless you also find your last ship a turn earlier.  Because of this, smaller ships, which are harder to find, will contribute more to the total length of the find phase.  Specifically, I ran 1000 game simulations using the greedy strategy to get the percentage of the time where each ship was found last:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;f6fcfb4a-d3a0-4d9d-bb20-708e1cf7dde3&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Length   Ship       % Time Last
2        Destroyer          49%
3        Cruiser            19%
3        Submarine          19%
4        Battleship        8.5%
5        Carrier           4.5%</code></pre></div><p>This is sort of interesting information in its own right, but it also suggests a modification to our optimizer.  Instead of maximizing (1/5 * find_turns + sink_turns) , we maximize (.49 * find_turns + sink_turns) for the destroyer, (.19 find_turns + sink_turns) for the cruiser and submarine, and so on, so that we&#8217;re weighing the find turns appropriately for each ship.  Finding the carrier faster probably doesn&#8217;t matter much, since you&#8217;ll probably still be looking for other ships anyway, but finding the destroyer faster matters a lot, since there&#8217;s basically a 50/50 chance that it will be the last thing keeping you from winning the game.</p><p>Unfortunately, this didn&#8217;t improve things enough either, so I had to get back to the real problem that I had been avoiding.  Up to this point, I had only been considering hits and misses when thinking about a board state (1 and 2 from the section above about information in Battleship games).  These are the easiest things to think about, because the only things you need to keep track of are the red and white pegs currently on the board.  If you want to properly use information about sunk ships, you have to know not only what the board looks like now, but what the board looked like when each ship was sunk.  I had been hoping to avoid thinking about this, because it would require a rewrite of a lot of my code for choosing guesses with the greedy strategy.</p><p>But I had gotten to a point where I was completely stuck on half of my video.  No matter what I did, I couldn&#8217;t get any improvement on random ship placement, and ignoring information about sinking ships seemed to be the next big thing to try.  The problem with not using sunk ship information was that any time you sunk a ship other than the carrier, there was a decent chance that the greedy strategy would just keep guessing in that direction.  This didn&#8217;t have that much of an impact on the success of the algorithm (it ended up adding about 2 turns on average), but those extra turns came in exactly the worst places.</p><p>When we calculated the expected number of turns to find and sink the destroyer, we were doing it in a game that only included a destroyer.  When the destroyer was sunk, the counter stopped.  But in the actual games we were playing, there would often be a few extra guesses after sinking the destroyer that would occur almost any time the destroyer wasn&#8217;t sunk last.  Those guesses weren&#8217;t accounted for by the optimizer.</p><p>I finally rewrote the code to add information type 3 (the sunk ship must be included in the red pegs from the time it was declared sunk) and it immediately fixed the problem.  We still only got a benefit of about half a turn, but we finally found a way to get our improved placement strategy to do something productive.</p><h4>On probabilities of adjacent ships</h4><p>Now, this approach to trying to place ships one at a time was only supposed to be my first attempt at an improved placement strategy.  Because it took so long, I didn&#8217;t get the chance to try anything else, but I think there&#8217;s still a decent amount of improvement that can be made from considering interactions between multiple ships.  Specifically, I strongly suspect that it&#8217;s better to put ships next to each other more often than pure randomness would suggest.</p><p>In addition to avoiding guesses near the edges of the board, the greedy strategy also avoids guessing near ships that have already been sunk.  The sunk ship essentially acts like another wall, reducing the number of ways that other ships could go through the adjacent squares.  Just as we were able to slow down a greedy guesser by putting more ships in the corners, I suspect that we could produce a similar improvement by putting more ships next to each other, but I guess I&#8217;ll have to save that for another time.</p><h2>Final takeaways</h2><p>I learned a lot from making this video, both on Battleship and otherwise.  Animating took a lot more time than I expected, but editing took a lot less.  I was not expecting the math to be the bottleneck here, but I guess this is what I get for trying to do original research for my first video.  Granted, one of my goals for this channel was to show what it&#8217;s like to do math in the real world, and my many hacks and failed attempts are probably more representative than a perfectly clean video would have been.</p><p>With that said, I&#8217;m excited for my next video to be a bit more straightforward.  I&#8217;m tackling another board game that also has relatively interaction between the players.  The math is already done, so I&#8217;m expecting this video to come out a lot faster, and to have significantly fewer last-minute changes and cuts.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://ballparkfigures.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Ballpark Figures! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Welcome to Ballpark Figures]]></title><description><![CDATA[See youtube.com/@BPKFigures]]></description><link>https://ballparkfigures.substack.com/p/welcome-to-ballpark-figures</link><guid isPermaLink="false">https://ballparkfigures.substack.com/p/welcome-to-ballpark-figures</guid><dc:creator><![CDATA[Patrick Liscio]]></dc:creator><pubDate>Tue, 09 Jun 2026 04:43:59 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!phbh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://ballparkfigures.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://ballparkfigures.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>I&#8217;ve loved math for pretty much my whole life.  I don&#8217;t think I have some deep, well-thought-out reason for why math is so great - I just find it fun and appreciate that it often makes sense.  I suppose I could try to come up with some nice explanation of what math means to me, but I think I would mostly just be trying to use fancy words to make my interest sound more impressive than it really is.</p><p>It seems that nowadays, people who are good at math are pushed into one of three areas: academia, finance, and tech.  I spent 5 years getting an applied math PhD (I thought &#8220;applied&#8221; meant &#8220;useful,&#8221; but then spent 5 years working on theoretical combinatorics problems), followed by 3 years in finance and 1 year failing to build a tech startup.  After shutting down the startup, I finally had some time to get back to what drew me to math in the first place: being able to better understand something about the world, and then to share that with others.</p><p>I&#8217;m starting the Ballpark Figures YouTube channel (as well as this Substack) to try to accomplish this goal.  It is partially an excuse to try to turn my side projects into a job, but also an attempt to address something that I&#8217;ve noticed online.  There are many videos that do a great job of explaining math concepts, but relatively few that do a great job of using them.  In cases where math is applied to real world problems, the problem often ends up being simplified so much that the solution is no longer useful in the real world.</p><p>The goal of the channel is this: take a topic that some (non-math nerd) people care about.  Throw in some math at whatever level of complexity the problem calls for.  Then pull out some takeaways that viewers can actually use somewhere in their lives.</p><h3>About You</h3><p> In thinking about the sort of community that I&#8217;m hoping to build, I&#8217;m imaging two different types of viewers:</p><ul><li><p>A core audience of math nerds who watch most of my videos</p></li><li><p>People who are really passionate about any topic and are excited to see a video about it, even if math happens to be involved.</p></li></ul><p>If I do my job well, then maybe some members of that second group can be converted to the first.</p><p>This is definitely going to be an interesting balance to try to strike, and I&#8217;m sure it will take a while to figure out how to handle this properly.  This Substack will be part of my attempt at this - it will be here for the math nerds even if my videos start going in a different direction.</p><h3>The Ballpark Figures Substack</h3><p>This Substack is mostly intended as a sort of overflow for the YouTube channel.  It will include things like in-depth explanations, failed experiments, and various things that just got cut for time.  I am very bad at removing things from my work, and I hope that having this Substack will enable me to make some much-needed cuts from my YouTube videos.</p><p>My first few videos will provide way more information than you wanted to know about some classic board games, with my first coming out this week.  Thank you so much for reading, and welcome to Ballpark Figures!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!phbh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!phbh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png 424w, https://substackcdn.com/image/fetch/$s_!phbh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png 848w, https://substackcdn.com/image/fetch/$s_!phbh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png 1272w, https://substackcdn.com/image/fetch/$s_!phbh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!phbh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png" width="1456" height="1291" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1291,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:391010,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://ballparkfigures.substack.com/i/201246154?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!phbh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png 424w, https://substackcdn.com/image/fetch/$s_!phbh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png 848w, https://substackcdn.com/image/fetch/$s_!phbh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png 1272w, https://substackcdn.com/image/fetch/$s_!phbh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80846b2d-a73f-429b-8387-b2bea828a13b_1961x1739.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://ballparkfigures.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Ballpark Figures! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item></channel></rss>