Marienbad Help.

The Marienbad game is a variant of the classic Nim game and the application Marienbad is a free implementation of this game for PC. The rules of Marienbad are as follows:

Menu: Game.

New.

Start a new Marienbad game with the options actually selected.

Exit.

Exit the Marienbad application.

Menu: Options.

Game options, in particular if you want to play the Nim or the Misere variant of the game. Note, that new settings in the options menu only become active, after a new game has been started in the New menu.

Game variant.

Select, if you want to play the Nim variant (last match wins) or the Misere variant (last match looses). Default at application startup: Nim.

Computer strength.

Select the strength (level) with which the application should play. Possible options: Beginner, Intermediate, Expert (cf. Computer strength for details). Default at application startup: Intermediate.

First move.

Select who should move first. Possible options: Computer (the program), Player (yourself) and Random (the application randomly chooses if the program or the player plays first). Default at application startup: Computer.

Matches removal.

Select, what happens if you remove a match. If Remove is selected, the match is effectively removed; using this option makes the application look more realistic (as if you played with real matches). If Strike through is selected, the match remains where it was, but is stroked through to mark that it has been removed; using this option, makes it easier to mentally calculate the Nim sums in order to determine the winning move. But, it has another advantage, offering an Undo functionality (cf. Playing the game for details). Default at application startup: Strike through.

Menu: Help.

Help.

Displays usage help for the Marienbad application (this text) in your web browser.

About.

Displays version, author and date-written of the Marienbad application.

Playing the game.

Select the game settings (in particular if you want to play the Nim or the Misere variant) and choose New in the Game menu. If the computer plays first, push the Start button to make the computer make the move. If the player plays first, and after the first computer move, the button is labeled Nim. Click the matches, that you want to remove. If Matches removal is set to Remove, the clicked match is removed, otherwise it is stroked through with a red bar (cf. below). When you are done, push the Nim button. If the last match has been removed, you are told if you win or loose, otherwise the computer (immediately, without any button push) makes the next move. If this removes the last match, you are told who wins, otherwise, it's your turn again.

If Matches removal is set to Strike through, the removed matches remain present, but are stroked through with a colored bar. Matches removed by the computer are marked with a blue bar, matches actually being removed by the player with a red one, matches that have been removed by the player during the previous turns by a black one. The Strike through display includes an Undo functionality: If you click a match actually removed (i.e. marked with a red color bar), the removal is undone, the match being made part of the game again.

Computer strength.

The Nim game in general and the Marienbad game in particular are games where one of the players, when playing without making any mistake, always wins (thus, the other one always looses). For both variants of Marienbad, the player, who starts the game, will always loose, if the other player makes the optimal moves. Marienbad may be mathematically solved and so it is possible to write a winning algorithm, that allows the computer to win all games, where the player makes the first move. To give the player a possibility to win such games, the program must support several game levels, where the computer plays with different strength. Except for the full strength level, the program more or less often makes a mistake, by making a random move instead of making the one, that would win the game.

The Marienbad PC application allows to make the computer play with one of three different strengths:

Contact the author.

For any suggestions or comments, please send me an email. This is in particular true, if you should win a game in the case where the program plays with Expert strength and you made the first move. This should not be possible and if it nevertheless happened, it would mean that there is a bug in my winning algorithm.