Dr. C. Scott Ananian (cananian) wrote,
Dr. C. Scott Ananian

More shut-the-box

In previous entries I've been discussing the mathematics of the game "Shut the Box". I first asked about good strategies which were simple enough for a human to use.

One obvious intuitive strategy is to chose tiles to flip down such that your score is as low as possible after each turn. It turns out this is an extraordinarily bad choice: against an optimal 2nd player, the 1st player can expect to lose 75.3% of their stake in each game, and against an optimal 1st player, a second player following this strategy will lose 70.8% of their stake (first player shuts the box 9.5% of the time and wins 71.5% of the rest of the games).

A better strategy is the opposite: flip tiles so that your score is as high as possible after each turn! Against optimal play, this strategy shuts the box in 9.6% of games and loses 5.8% of the stake as the first player (compared to shutting the box in 9.5% of games but losing only 2.5% of the stake when playing optimally), and loses 5.3% of the stake as the second player (compared to winning 2.5% when playing optimally). Obviously, this strategy is a little better as a 1st player strategy: the 2nd player can improve by immediately flipping tiles to secure a win or tie if the opportunity is available, and following the "largest result" strategy otherwise. This loses only 1.2% of the stake to an optimal 1st player (again, compared to losing 5.3% using the unmodified strategy or winning 2.5% using an optimal 2nd player strategy).

A table of the positions where optimal 1st player strategy differs from "largest result" is small enough to memorize (!) or squeeze on a single page as a cheat sheet allowing actual optimal 1st player play by a human (390 differences from optimal). Optimal 2nd player strategy is more complicated: tabulating the differences from even the modified "largest result" strategy described above still runs to 15 pages. As far as I know this is still an open problem: is there a better "short and comprehensible" strategy? Is there a better way to represent optimal 2nd player play to allow real practice by a human?

In my previous post, I promised to describe how strategy changes when you increase the number of players in the game, and to talk about an "alternating turns" variant of the game. That will have to wait until the next post -- this one is long enough already!
Tags: shut the box

  • Rust is not fast

    There are plenty of safe high-level languages in the world; JavaScript, for example. Rust is different: it's supposed to be safe and fast. But…

  • JavaScript in asm.js (and a little rust)

    Over on twitter, Tim Caswell mentioned, "I think high-level scripting language on top of something like rust.zero would make for an amazing OS."…

  • SDR 0.7

    Happy Thanksgiving! Here's SDR 0.7 to celebrate the holiday. Version 0.7 incorporates a number of dance engine refactorings completed shortly after…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment