Marienbad origin

Marienbad is a strategy game that is part of the Nim games. Nim games are games of ancient origin. The general principle is to have a number of heaps with objects, and both players take turns removing one or more objects from a heap, until all heaps are empty. You can decide that the one which will remove the last object will be the loser or the winner.

These games have been the object of many theoretical studies to find winning strategies and prove it.

You may find very simple Nim game with only one heap where you can remove a limited number of objects in each stroke. The interest is limited because the winning strategy is too simple.

Marienbad is a medium complexity Nim game with four heaps. This requires more thought, but you can find winning strategies with simple calculations that with a little practice you can do mentally in a few seconds.

Its name comes from the movies "Last Year at Marienbad" who popularized it in 1961. The movies hero played very often this game and always won (Marienbad is a small Czech thermal city where there was not many things to do ...).

I played this game when I was a student, and when I fetched an idea for a first Android program I thought to this game that seemed an ideal subject to explore different aspects of Android.

But why play this game with a phone when it is so easy to play with matches? (or other kinds of objects, I remember having played at the end of a meal with cutlery and glasses ...). I think there are 3 important aspects:

    • mobility: with physical objects you're nailed to a table, with your phone you can play in the bus or subway, recreation and even during the courses ...
  • the ability to play alone if you do not have a partner, the phone replace him,
  • the phone keeps an exact memory of strokes, and you can go back or forward to reviewing the situation, analyze the mistakes ...
    • I hope this game will entertain you by making your brain work a little (as we say in french "travailler les meninges").