Has anyone played and figured out this game?
Isn't the game just Nim? (Spoilers.)

Wow, that's cool how elegant that solution is.

After generating the networks of various game states, I was just starting to look the patterns of why certain moves led to the indefensible positions. I had no idea that people had already analyzed the same game before. Thanks very much for linking that solution, now I know how to search for other literature on the game ("Nim").

From that link I find it cool that finding the next "safe" state from a given game state can be done in O(n) time (where n is the number of rows in the game state), even though the number of game states grows exponentially with n.

This semi-log plot shows that exponential growth. This plot is generated under the premise that the first row contains 3 pearls and every added row contains one additional pearl. Note that n = 3 is the case for the first "Pearls or Swine" game and n = 4 is the case for the one linked above. "Losers" are those states that are indefensible, while "Totals" are the total number of states.






(The asymtotic growth of number of unique game states is still exponential if the additional rows are of a constant size, the above graph is just chosen to match the pearls of swine problem. Below is the exponential growth when each row is of constant size (5). Not that this is not a semi-log plot like above.)




I'll be interested to read more about this problem later, but ironically I need to get ready for a class in algorithm analysis in a few mins.

John
_________________________
1998 BMW ///M3 30 GB Mk2a, Tuner, and 10 GB backup