The rules of the game are as follows:
- There are two players.
- The game starts with N number of game pieces arranged side by side in a row.
- Taking turns, each player removes one game piece.
- A piece can only be removed if there is another piece immediately to its right.
- A player loses if they cannot remove a piece.
For instance, if the current game-state is XOOXXX, where X denotes a game piece and O an empty space, only the pieces on the 4th and 5th spaces can be removed. The pieces on the 1st and 6th spaces do not have another piece immediately to their right. If the piece on the 5th space is removed, the game-state becomes XOOXOX. There are now no removable pieces, and the player whose turn it is to remove a piece loses.
I have not been able to deduce an optimal strategy for this game, but here are some of the thoughts I have had (which might not be of interest):
There are essentially two types of moves, one where one piece is removed OXX --> OOX, and one where one piece is removed and another is left unremovable XXX --> XOX (the leftmost piece can no longer be removed). Since the second type is essentially removing two pieces from the pool of removable pieces, I was thinking it should be possible to do something with parity, e. g. always make sure there are an odd number of removable pieces, but I haven't gotten anywhere with this.
As the game progresses, the pieces are split into smaller and smaller groups of adjacent pieces, so another idea I had was to treat every group as its own subgame, but I think this is a dead end as the same player can make several moves in a group if the other player leaves it alone.
I was also thinking it might be possible to apply some kind of induction or dynamic programming logic, but I'm not very good at that.
Any input on the matter is greatly appreciated :)