I wrote the code for this very quickly because I wanted to get it done before I forgot how the game was played. Initially, the computer just made completely random moves and was very easy to beat. I changed the computer's algorithm so it at least tried to do well. Finally, I changed the algorithm for an exhaustive greedy algorithm. The computer will always attempt to get the highest number of stones per turn - even if that leaves you with a good layout. The next step is to make the best move which gives you the worst move. I hope that, as I've worked on this, I got the bugs out.
GoalThe goal of Serendipity is to capture 11 stones before your opponent captures 11 stones.
TurnsPlayers take turns. A player's turn has three steps: (1) Pick a stone and move it one square diagonally. (2) Pick a different stone and move it one square diagonally. (3) Pick a stone not picked in step 1 or 2 and jump over stones diagonally. Every stone that is jumped is removed from the board and is captured. The goal is to capture 11 stones.
If a player cannot (or does not want to) complete a step, the player can end the turn and the opponent's turn will begin. Player's cannot skip step 2 and move to step 3. In other words, the player must move two different stones before the player can make a jump. In the case that both players skip their complete turn (all three steps), the player with the most stones wins. If both players have the same number of stones, the game is a draw.
Pay attention to the rule about moving 'different' stones. The stone moved in step 1 cannot be used to move in step 2 or jump in step 3. You can jump over it and capture it in step 3, but it cannot be used as the jumper. The stone moved in step 2 cannot be used to jump in step 3. You can jump over it and capture it in step 3, but it cannot be used as the jumper.
MovingStones are moved diagonally. A stone cannot move onto a square occupied by another stone. A stone cannot move off the board.
JumpingAs with moving, stones jump diagonally. To jump, the diagonally adjacent square must have a stone. The next square in that direction must be empty. The stone that is jumped is removed from the board and a captured by the player. After a jump is complete, it is allowed to continue jumping with the same stone. When making more than one jump with a stone, the jumps do not have to be in the same direction. For example, you can jump a stone in a northwest direction and then jump another stone in a northeast direction.
WinningAs soon as a player captures 11 stones, the game is over and the player wins. If it is impossible for either player to capture 11 stones, the game is a draw. Similar to the game Go, if players are stuck moving the same stones back and forth, consider the player with the most stones to be the winner (or a draw if both players have the same number of stones).
I learned to play this game in a dream. My wife and I were in a building called Serendipity Labs. We wanted to play a game, but all they had was checkers and all the chips were white. I set it up, thinking that we might remember which chips were supposed to be red and which were supposed to be black. My wife suggested we play Serendipity instead. She taught me the rules and we played until my alarm went off and woke me up. I quickly wrote the rules down so I could play the game again.
I assume that I must have seen a game similar to this at some point in my life, but I have no memory of it. So, I am calling this game Serendipity, as my wife did in my dream. I think that the rules work and that a player can usually win. If you find problems with the rules, try to fix them. I'm not sure I remembered all of the rules or if my wife told them all to me. I asked her about it when she was awake and she's never seen a game like it, so the rules I remember are all I have.
After learning some strategies for the game, it ends up a draw most of the time. Once one player has 11 or 12 stones captured, either that player will win or it will become a draw. It almost always becomes a draw. So, I changed the rules. Instead of requiring 13 stones to win, only 11 stones are required.
Now, I'm checking to see how often the winner is the person who goes first. If that is always the case, new rules will be needed.
ContactIf you have any suggestions for this game (or if you know the rules for whatever game my dream was trying to remember), please contact me: cs@kainaw.com