{"id":42,"date":"2013-05-29T20:39:00","date_gmt":"2013-05-29T20:39:00","guid":{"rendered":"https:\/\/paulgcurran.com\/skepticalstats\/?p=42"},"modified":"2013-05-29T20:39:00","modified_gmt":"2013-05-29T20:39:00","slug":"tetris-pieces-and-you","status":"publish","type":"post","link":"https:\/\/paulgcurran.com\/skepticalstats\/?p=42","title":{"rendered":"Tetris pieces and you"},"content":{"rendered":"<p>Over the span of my life I have played a lot of Tetris. &nbsp;I actually just sat down and tried to figure out when I might have reasonably played my first game of Tetris, and let&#8217;s just say it was a very long time ago. <\/p>\n<p>I&#8217;m not sure I even want to start coming up with a reasonable estimate for the number of hours I&#8217;ve played Tetris, because it&#8217;s not likely to be best measured in hours (or even days). &nbsp;I&#8217;m sure it would be even worse if we put it into the metric of &#8220;if all the [thing] I had done in my life was my full time job, how long would that job last?&#8221; &nbsp;Let&#8217;s just say I&#8217;m sure I&#8217;ve knocked out at least a few 40-hour work weeks.<\/p>\n<p>We&#8217;re not here to evaluate my life choices, though, we&#8217;re here to talk about Tetris. &nbsp;Before we continue too far I should also say I&#8217;m somewhat of a (Nintendo) Tetris purist. &nbsp;I&#8217;m not going to say that we need to go back to something that will run on a Soviet DVK-2,<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/2.bp.blogspot.com\/-MsGJ4Bkdkzc\/UbtYL_a6vGI\/AAAAAAAAC7s\/Qahk785IhUM\/s1600\/Tetris-VeryFirstVersion.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/2.bp.blogspot.com\/-MsGJ4Bkdkzc\/UbtYL_a6vGI\/AAAAAAAAC7s\/Qahk785IhUM\/s1600\/Tetris-VeryFirstVersion.png\" height=\"386\" width=\"640\" \/><\/a><\/div>\n<p>But I will say that there&#8217;s really no need to go much further than a game that was for all intents perfectly executed to what it needed to be. &nbsp;To put it in the words of Spock in Wrath of Khan -while lamenting the fact that Kirk allowed himself to be promoted to Admiral out of the role of Captain &#8211; &#8220;Commanding a starship is your first, best destiny. &nbsp;Anything else is a waste of material.&#8221;<\/p>\n<p>Tetris is meant to be Tetris. &nbsp;This is Tetris:<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/3.bp.blogspot.com\/-ZDqjmc6X1_s\/UbtYHGq073I\/AAAAAAAAC7k\/hKyKTQdzifQ\/s1600\/Tetris_NES_play.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/-ZDqjmc6X1_s\/UbtYHGq073I\/AAAAAAAAC7k\/hKyKTQdzifQ\/s1600\/Tetris_NES_play.png\" height=\"478\" width=\"640\" \/><\/a><\/div>\n<p>Anything else is a waste of material. &nbsp;Anything else is like bedazzling the Mona Lisa. <\/p>\n<p>Side note, I just thought that up but couldn&#8217;t help but google it. &nbsp;And&#8230;someone has actually <a href=\"http:\/\/red-luxury.com\/2011\/03\/14\/a-bedazzled-mona-lisa-in-china\/\">bedazzled the Mona Lisa<\/a>.<\/p>\n<p>Anyway, we can talk about Tetris, but if you want a version where you can press a button to quick drop (in Tetris vernacular &#8220;hard drop&#8221;), or you want to be able to rotate pieces when they&#8217;re against the wall and don&#8217;t have room (&#8220;wall kick&#8221;), or you want to see where the piece would be if it were to keep falling where it is (&#8220;ghost piece&#8221;), or you want to be able to spin pieces to slow their descent (&#8220;easy spin&#8221; or &#8220;infinite spin&#8221;), or you want to be able to hold a piece and\/or swap a piece into some sort of reserve (&#8220;cheating&#8221;), well, we&#8217;re playing different games. <\/p>\n<p>And you&#8217;re playing the one designed for toddlers. &nbsp;Baby&#8217;s first Tetris, perhaps. <\/p>\n<p>Sorry, am I being too hard here? <\/p>\n<p>No. &nbsp;No, I don&#8217;t think so. &nbsp;But let&#8217;s get to the actual point here. <\/p>\n<p>You can see in the above image that Tetris is happy to give you some numbers on what you&#8217;re doing. &nbsp;It&#8217;s not really the most efficient to look at these numbers during a game and plan for pieces that might be coming, but it&#8217;s interesting to look at after the fact. &nbsp;&#8220;Oh, that&#8217;s why I lost &#8211; I didn&#8217;t get enough square pieces&#8221; (said no one ever). <\/p>\n<p>Except we&#8217;re really pushing for some Tetris-speak today, so instead of square pieces we&#8217;ll call them O pieces. &nbsp;Yep, that&#8217;s their letter-association name. &nbsp;From top to bottom in the above picture we have T, J, Z, O, S, L, I pieces.<\/p>\n<p>Let&#8217;s make it a little easier:<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/3.bp.blogspot.com\/-_BKbrNwBRjA\/UbteiQG6smI\/AAAAAAAAC78\/rLAQpXjZJoM\/s1600\/tetris+table.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/-_BKbrNwBRjA\/UbteiQG6smI\/AAAAAAAAC78\/rLAQpXjZJoM\/s1600\/tetris+table.png\" height=\"640\" width=\"398\" \/><\/a><\/div>\n<p>Okay, so now we&#8217;re all on the&nbsp;same page. <\/p>\n<p>If you have said anything at the end of the game while looking at the stats, it was probably something relating to your lack (or perceived but unsubstantiated) lack of straight &#8220;I&#8221; pieces. <\/p>\n<p>Everything I&#8217;ve read would tend to indicate that the distribution of Tetris pieces (I&#8217;m sorry, &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Tetromino\">tetrominos<\/a>&#8220;) to be random (if not<a href=\"http:\/\/en.wikipedia.org\/wiki\/Tetris#Computational_complexity\"> randomly deterministic<\/a>). <\/p>\n<p>By the way, don&#8217;t mistake that sentence as simple &#8211; those are two starts to some pretty deep wiki-spirals. <\/p>\n<p>If the pieces are random, and you play forever (<a href=\"http:\/\/en.wikipedia.org\/wiki\/Tetris#Possibility_of_indefinite_gameplay\">can you play Tetris forever?<\/a>), you should get roughly a uniform distribution across the types of pieces. &nbsp;How uniform does uniform really have to be to be considered uniform, though?<\/p>\n<p>I&#8217;ve been playing and recording a game or two here and there, but mostly recording the stats from having others play. &nbsp;All this has produced the following RAW DATA:<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/2.bp.blogspot.com\/-4H7bmQ02NCE\/UbzF4Xrv2NI\/AAAAAAAAC8w\/fE4EIuxGUqs\/s1600\/tetris+raw.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/2.bp.blogspot.com\/-4H7bmQ02NCE\/UbzF4Xrv2NI\/AAAAAAAAC8w\/fE4EIuxGUqs\/s1600\/tetris+raw.png\" \/><\/a><\/div>\n<p>From this we can also calculate the proportions of pieces for each game. <\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/2.bp.blogspot.com\/-5Yg6GuRLUtw\/UbzHUYgvbvI\/AAAAAAAAC88\/rdgA5mSKPes\/s1600\/chart_3.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/2.bp.blogspot.com\/-5Yg6GuRLUtw\/UbzHUYgvbvI\/AAAAAAAAC88\/rdgA5mSKPes\/s1600\/chart_3.png\" height=\"454\" width=\"640\" \/><\/a><\/div>\n<p>This shows the relative distributions for each game. &nbsp;Other than one game with way too many S pieces and one game with way too few J pieces, things do seem to be in a fairly tight range. &nbsp;We can collapse this down to just means to get a feel if this bit of noise cancels out. <\/p>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/1.bp.blogspot.com\/-hkvcD9Z-wYM\/UbzMdmSUYmI\/AAAAAAAAC9w\/IMb0TtlRCFY\/s1600\/chart_4+(1).png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/1.bp.blogspot.com\/-hkvcD9Z-wYM\/UbzMdmSUYmI\/AAAAAAAAC9w\/IMb0TtlRCFY\/s1600\/chart_4+(1).png\" height=\"454\" width=\"640\" \/><\/a><\/div>\n<p>We can see that things look fairly uniform, though it&#8217;s hard to tell exactly what the expected levels are. &nbsp;Changing the scaling to bias lets us see what percentage of pieces we can expect above or below the expected uniform distribution per game:<\/p>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/2.bp.blogspot.com\/-xUYUW92vTIc\/UbzMUosENNI\/AAAAAAAAC9o\/GaeWK7QAX08\/s1600\/chart_5.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/2.bp.blogspot.com\/-xUYUW92vTIc\/UbzMUosENNI\/AAAAAAAAC9o\/GaeWK7QAX08\/s1600\/chart_5.png\" height=\"454\" width=\"640\" \/><\/a><\/div>\n<p>The bias is quite small, and even with these fairly large numbers of pieces (&gt;6700) a chi-square test of association fails to show a deviation from a random distribution. &nbsp;[&nbsp;<i>x<\/i><span style=\"font-size: xx-small;\">2<\/span> (6) = 9.260, <i>p<\/i> = 0.16 ]<\/p>\n<p>Oddly, the most common piece in this data seems to be the piece we&#8217;re always looking for (the &#8220;I&#8221;), but this does seem to just be a blip in otherwise random piece distribution. &nbsp;I guess there&#8217;s not really any reason to complain, at least overall, unless I want to complain about having too many of the best piece (and for no reason).<\/p>\n<p>Anyway, why are you still reading this and not playing Tetris?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the span of my life I have played a lot of Tetris. &nbsp;I actually just sat down and tried to figure out when I might have reasonably played my first game of Tetris, and let&#8217;s just say it was a very long time ago. I&#8217;m not sure I even want to start coming up &hellip; <a href=\"https:\/\/paulgcurran.com\/skepticalstats\/?p=42\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Tetris pieces and you<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-42","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":0,"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paulgcurran.com\/skepticalstats\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}