# Rhythmomachia: The Philosopher's Game

Rhythmomachia 2

### A Strategy Game of High Mathematical Precision

To enjoy the full depth of Rhythmomachia, we recommend to read the rules on this page incrementally, and instantly try a few moves on the board. When you take a little time to discover its value, Rhythmomachia really is just an incredible game!

Be sure to click the End Turn button at the end of each turn.

If your browser does not support applets, download and start `java -jar Rhythmomachia2.jar`

If your web browser does not display the board game above, download Rhythmomachia. Look at the button descriptions and further help if you are unsure what the buttons do. If the whole applet does not show, make sure you have enabled Java support for your browser. A new implementation, Rhythmomachia 2, with much more features is available as a separate application for download or as Rhythmomachia 2 Webstart.

P.S. I implemented Rhythmomachia when I was in high school before I knew anything about computer science. But you may enjoy this fun game as much as I did back then.

### The Rules of the Game

Startup position of game board

Rhythmomachia is a complex strategic game played on a board similar to a chessboard. It is an old game supposedly invented in the Middle Ages, and has several mathematical roots. Rhythmomachia is played by two players. The program is based on a historical reconstruction.

Early, there were some theoretical and mathematical examinations. Some concerning the best strategies, and some analyzing how far Rhythmomachia's tactics might relate to ancient warfare. Though some of these examinations might be mainly unproved or even mere fiction conserved over the centuries, one cannot doubt that Rhythmomachia makes use of certain mathematical connections known in number theory.

Rhythmomachia is played by two players. Who wins and when? The player whose figures (pieces) are arranged in a regular mathematical order on the opposite yard, or has captured all opposite figures. Who starts? The blue one does the first move. Then the two players alternate by turn.

### The Moves

For making a move, use your mouse to drag pieces to their new position according to the following moves:

1. Infantry, represented by a circle, moves exactly 2 fields in horizontal or vertical direction.
2. Cavalier, represented by a triangle, moves exactly 3 fields in diagonal direction.
3. Chariot, represented by a square, moves exactly 4 fields in any direction, horizontally, vertically, or diagonally.
4. The Pyramid, represented by a pyramidal tower, contains six or less units and can choose like which of its pieces it wants to move or attack, every time. If a figure contained in the pyramidal tower is attacked successfully, then it is removed and cannot be used for moving, any more.
• Important: The number of fields moved includes the starting and ending position! So a Cavalier has moved three fields if it has simply stepped over one empty field in between. This unusual calculation is important for attacks.
• Each figure has a rating that determines its combat values, whereas hardly any two figures have the same ratings.

If a pyramid looses one of its components and an identical duplicate of the same league is still in play, the player can choose to swap them out. The figure in the pyramid which was lost is removed and the duplicate takes its place in the pyramid, instead.

### The Attacking Options

Though every player can only do a single move per turn, each can attack as many times as possible, before and/or after their move. Each figure can attack as many times as possible and attacks can be lead by as many figures as necessary. To attack an opponent's figure successfully, you must reduce its rating exactly to 0 (each figure that still has a negative or positive rating at the end of the opponents turn, will regenerate to its full rating).

Various possibilities for a single attack of a figure do exist, each with the goal of reducing the target's rating to 0. They can be combined freely:

1. Direct confrontation is used if a movement of a figure would lead exactly onto the target figure and the ratings are equal.
2. Combat formation in joint attack
• Choose the kind of attack:
• Destroying Attack uses reduction/subtraction for altering. A figure's combat value will be subtracted from the target's rating.
• Reinforcement Attack uses addition for altering. A figure's combat value will be added to the target's rating.
• Choose combat value for an attack:
• Assault or Multiplying Attack alters the target's rating by multiplication. The combat value of a figure that uses this attack will be ```ownRating * distance```.
• Infiltration Attack or Division Attack alters the target's rating by division. The combat value of a figure that uses this attack will be ```ownRating / distance```.
3. Ambuscade also allows multiple figures in a joint attack to contribute by Direct Confrontation if they could move directly to the target and their respective ratings add up to the target rating. Enable this option via direct configuration->also joint.
4. Seige captures pieces that are fully surrounded by enemies (optional).
When attacking, you must respect that:
• a figure can only lead an attack into those directions that it can move to. So for example, a Cavalier can only attack in diagonal directions.
• a figure can attack one distinct figure only once, even though it may take part in attacks of any number of different figures each turn.
• the distances are calculated like for moves (including the starting and ending position).
Options capturing->False will also disable capture of pieces and remove pieces off the board after a successful attack instead.

### The Winning Harmonies

A player can win if he has arranged three piecesin a distinct shape and a distinct order (according to their ratings). Such an arrangement must be located entirely on the opponent's yard (the half the board where the opposite player starts). At most one of the three pieces can be an opponent's piece. The figures playing a role in such an arrangement must be located in a regular mathematical shape without other pieces in between like:
•  a regular triangle, with three figures, one placed at (i|j) and one at (i+n|j) and one at (i|j+m), with m,n being integers. Place these figures in a right-angled triangle. Rotated triangles are allowed.
•  a line, with three figures, one placed at one field and the other two figures placed with a distance of exactly n fields each, on the same vertical column or horizontal row, with n being an integer. So place these piece on one vertical or horizontal line. Diagonal are allowed.
The ratings of these figures must be in a regular order like:
• Arithmetic order applies if the figures fit with an arithmetic sequence (an)

with an := b + c*n. Then it is ai - ai-1 = const.
Such as: {3,5,7}, {3,9,15}, {4,8,12} or {30,36,42}.
The name is derived from the arithmetic series b+c*1.

• Geometric order applies if the figures fit with a geometric sequence (gn)

with gn := c*qn. Then it is gi / gi-1 = const.
Such as: {4,16,64}.
The name is derived from the geometric series b+c*qi.

• Harmonic order applies if the figures fit with a harmonic sequence (hn)

with hn := c / n.
Such as: {12,6,4}.
The name is derived from the harmonic series b+c*i-r where mostly it is r=1.

• At most one piece in a winning harmony can belong to the opponent.
Note the winning harmonies are not checked in the Java implementation, but you can still celebrate if you win.

If you liked this game, you can also download it. Rhythmomachia 2 is very much like Rhythmomachia 1, but supports more rules (for example full pyramid support) and is customizable for several rule variants at least to some extent. It has been rewritten completely, in order to flexibilize the rules and make use of more Java features than the original version for Java Virtual Machine 1.0 supports. This allowed beautifying the user interface. Also thanks to the integration in our game library, we can now start to implement a computer player. Some rudimentary steps have already been taken into this direction, but the overall player performance is still much worse than that for the Seti game. The version 2 is recommended instead of Rhythmomachia 1. Rhythmomachia 2 is not available as a Java applet, though, but has to be downloaded and can be run using Java Virtual Machine 1.4+.

If you have found out any mathematical properties concerning Rhythmomachia, or know any alternative rules then please tell me. Also if you know about additional sources on the web, I can include a link to them.

Some hints if try to solve some puzzles: a simple mathematical connection in Rhythmomachia concerns the starting arrangements of the figures. Some of the pieces' ratings follow up a sequence like:

• {n, n*n, n*(n+1), (n+1)*(n+1), (n+1)*(2n+1), (2n+1)*(2n+1) }
for example in
• {2, 4, 6, 9, 15, 25}
• {7, 49, 56, 64, 120, 225}
Can you find out further connections?

What pieces are the most effective ones? Which can attack the most opponents and which can be attacked by the least? Which pieces can be used best for winning harmonies? What ratings do these pieces have then?

Can you compute a list of all possible combinations for winning orders? My computer printed out this list of winning orders.

### References

There are quite a few books and descriptions on the deeper aspects, philosophy and strategy of Rhythmomachia play. Some of them further contain interesting historical motivations.
[Bell, 1983]
Bell, Robert Charles. The Boardgame Book. Bookthrift, 1983. ISBN 978-0671060305
[Illmer et al., 1987]
Illmer, Detlef & Gädeke, Nora, & Henge, Elisabeth & Pfeiffer, Helene & Spickler-Beck, Monika. Rhythmomachia. Hugendubel Verlag, 1987, ISBN 3-88034-3194-5 (in German)
[Borst, 1986]
Borst, Arno. Das mittelalterliche Zahlenkampfspiel. - Heidelberg : Winter, 1986. - 553 S. : Ill. (Supplemente zu den Sitzungsberichten der Heidelberger Akademie der Wissenschaften, Philosophisch-Historische Klasse ; 5) Literaturverz. S. 495 - 498 ISBN 3-533-03750-9 ISBN 3-533-03751-7 SW: Zahlenkampfspiel ; Geschichte (in German)
[Barozzi, 1572]
Barozzi, Francesco (1538?-1587?) Il nobilissimo et antiqvissimo givoco Pythagoreo nominato rythmomachia cioe battablia de consonantie de nvmeri, ritrouato per vtilita & solazzo delli stidiosi, et al presente in lingua volgare in modo di paraphrasi composto. Venetia, G. Perchacino, 1572 (in Italian)
[Fulke, 1563]
1563 translation by William Fulke of Boissiere's 1554/56 description of Rythmomachy. It is entry 15542a in the Short Title Catalog of Pollard and Redgrave, and on Reel 806 of the corresponding microfilm collection. (The sources disagree, on whether the name is Fulke or Fulwood. He lived 1538-1589.)
[Moyer, 2001]
Moyer, Ann E. The Philosophers' Game: Rithmomachia in Medieval and Renaissance Europe. University of Michigan Press, 2001.
Description
Rithmomachia, the Philosophers' Game: A Mediaeval Battle of Numbers
Beschreibung
Rhythmomachia - das Philosophenspiel: Ein mittelalterlicher Zahlenkampf
Bibliographie
More bibliography on Rhythmomachia (in French).