a swirl of green, pink, blue, yellow, and orange

graham builds

a blog about #nim rss feed icon

Working on a game called Nimnim

posted by graham on October 13, 2025

Background

Every game of Magic: the Gathering can technically be won by making another player try to draw a card when there are no cards left in their deck, a strategy called “milling.”1 In custom fan formats like Dandân2, there is a single deck shared between the two players, which encourages milling as a more serious backup strategy if the whole “making your opponent lose life” thing doesn’t work out. Recently, I became curious what a custom format might look like if milling was not only a backup but the only strategy? Constraints breed creativity, after all.

Nim is a much older game than MTG about trying not to be the last player to remove an object from a central pile. Every turn, each player can choose to pick up one object, pick up two objects, or pick up half of the remaining objects. It’s often used as an example game with easy rules to implement in introductory computer-science classes, since the game strategy is solved and coding that strategy is simple to do. Part of what makes the strategy so simple is that both players always have the same actions they can take each turn, and