Very interesting post, I had never heard of this game! I like your
description of the second player's "mirroring" strategy... which
raises a question: you indicate that the first player is prohibited
from playing in the center on the *first* turn, but can he play there
*after* the first turn (in which case presumably the second player
would have a winning strategy, since he can't continue to mirror at
that point)? The implementation suggests that this center move is
*always* prohibited, is that right?
To help clarify, here's a scan of the original rules:
https://images-na.ssl-images-amazon.com/images/I/81F-UCwOiYL._SX569_.jpg> but can he play there *after* the first turn (in which case presumably > the second player would have a winning strategy, since he can't > continue to mirror at that point)?
Yes, the center rule only applies to the first player's first turn. The
first player is free to play in the center on his second turn. The rule
never applies to the second player. The ternary expression in my
"valid()" function checks if it's the first turn and, if so, permits
play anywhere except the center. On any other turn it consults the
If the first player plays one of the four tie openers, then the second
player is blocked from the center by the adjacency rule. If the second
player mirrors this move, then the first player is likewise locked out
of the center. With the center off-limits to both players, the second
player can always mirror and force a tie.