brhfl.com

A chessboard for pebbling

Another post inspired by Numberphile. This one, specifically, is in response to a game presented by Zvezdelina Stankova in this introductory video on ‘Pebbling a Chessboard’, and three others that I’ll link to in a bit. Not right away, though, because she explains the game and then pauses for a bit so that the viewer can try to figure it out for themself. My way of doing this was to whip together a bit of a web game.

I’ll do a few explanations of my web version here before the reveal. The core game is one of checkers on an infinite checkerboard; pull a checker and place one up and to the right. Can’t pull one if you can’t do the placement. In my web version here, we’re reflected on the horizontal, so we’re going down and to the right. Much simpler to implement. The initial grid is 20x20, but it expands infinitely whenever a checker nears a border. Game is after the jump, I recommend watching the beginning of the previously linked video, and then playing around. That was why I made this. If you play around a bit, then eventually you can scroll down for more thoughts, I suppose. I think the board is tall enough so as to not accidentally spoil anything.

So, you’ve played with it for a while, right?

Right?

Okay, I just abused a header to quell spoilers, let’s move on with it. So I built my thing without a win condition check for testing purposes, and then I kept playing and playing. And I didn’t have a good provable version of why, but it became quickly apparent that it was unwinnable, and therefore I did not need to code that. Zvezdelina explains it much better, but the apparent reality to me was just that your board is always growing. You can’t start from the key spot (0,0) and your other two options just grow into an infinite field of misery. So, I didn’t prove it, but I was convinced and then I watched the rest of the video and no, I had no reason to code the win condition. The game, in some ways, reminds me of Conway’s Game of Life… largely because it’s hard to intuit what’s going to come of the simple ruleset and start position several iterations down the line.

There are three more videos on the matter: one, two, three. They’re all fascinating. If nothing else, I suppose I have a good template down for a checkerboard using CSS, SVG, and just a hint of jQuery to square up the table cells.