Randomized Chess

2014 September 5
by Daniel Lakeland

I've been sick a lot recently, in part thanks to having small children. In any case, one thing I've been doing is revisiting Chess. I honestly am pretty clumsy at Chess but it's one of those things I always felt I should probably do. When I was younger most of my friends played stronger games than me, and it was hard to enjoy when you were getting beaten all the time. Now, thanks to Moore's law and clever programming, even the very very very top players are useless against a 4 core laptop computer runningĀ Stockfish.

So we can all agree now that it's no fun getting blasted out of the water every time, but also we can use computers to make things better and more interesting for humans, since that's what they're for right?

There are lots of proposals for randomized or alternative starting position Chess games. For example Chess 960 (Fischer random chess) is a variant with 960 possible starting positions. The idea is to avoid making Chess a game where a big advantage comes from memorizing opening moves in some opening database. I'm more or less for this in my play. I enjoy playing Chess well enough, but I have absolutely NO interest in poring over variation after variation in a big book of opening theory. I think some people like this stuff, so for them, they can of course continue to play regular chess.

On the other hand, for people like me, consider the following method of starting the game:

  1. Set up the board in standard starting position.
  2. Using a computer, play N random legal pairs of moves (turns). possibly with or without capture.
  3. Using a chess program on the computer, find the "score" for this position.
  4. Accept the position if the chess program decides that the score is within \epsilon of 0.0 (where positive is good for white, negative is good for black, this is standard output from chess engines), otherwise go to step 1.
  5. Assign the color randomly to the human (or to one of the humans if you're not playing against a computer).
  6. Start the game by allowing white to move.

Note, this variation also can be used to handicap games by accepting a starting position if it is within \epsilon of some handicap value h, and then assigning the weaker player to the color who has the advantage. It's also possible to play N random moves and then allow the computer to move K moves until the score evens out properly if you can get support from the chess engine. Finally, it's also possible to search a large database of games for one in which after N moves the position evaluates to within \epsilon of the appropriate handicap value, rather than generating random moves.

I suspect N=6 to N=10 would be the appropriate number of moves to use.

Now, who will implement this in SCID or the like?


3 Responses leave one →
  1. Daniel Lakeland
    September 5, 2014

    Unlike Chess 960, the number of reasonable opening positions is likely to be exponential in N so with only 6 or so initial random moves, you'd probably have billions of possibilities.

    Perhaps this variant should be called (Multivariate Chess Markov Chain Monte Carlo) That's MC-MCMC for you acronym buffs.

  2. Daniel Lakeland
    September 5, 2014

    Another possibility, for efficiency, is to use weaker chess engines to help with the initial randomization. So for example you might do 2 rounds of pure random movements, and then run CuckooChess to choose one of the "Best" next pair of moves, then run 2 more rounds of random movements, another CuckooChess move, and then evaluate the position in Stockfish to decide whether to accept.

    All this is reminiscent of the Markov Chain Monte Carlo literature on efficient sampling, the goal here is to sample from the "score=0 \pm \epsilon" region of a VERY high dimensional parameter space. If you generate PURE random moves, even if you disallow capture, you'll probably be unlikely to be in a "neutral" position.

    • JJH permalink
      December 8, 2014

      It seems like it depends on how much you want it to look like a "real" game when you start.

      An alternative would be to try out various illegal moves/switches and then simulate set of games from that starting point to see whether it is still roughly even. For example, I assume pre-computers many people had tried playing with the pawns on the last row and the other pieces on the second row.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS