
Launch Rhythmomachia 2via Webstart 
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 works correctly, you should see the board game displayed above. Otherwise, you can run Rhythmomachia 2 Webstart or 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. Note that I implemented Rhythmomachia when I was in high school before I knew anything about computer science. I hope you find it interesting.
See David Dyers' recent Rhythmomachia
The Rules of the Game
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:
 An Infantry man, represented by a circle, moves exactly two fields in horizontal or vertical direction.
 A Cavalier, represented by a triangle, moves exactly three fields in diagonal direction.
 A Chariot, represented by a square, moves exactly four fields in any direction including diagonal.
 The Pyramid, represented by a pyramidal tower, contains six or less units and can choose like which of those it wants to move, 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.

Note: 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 strange calculation is important for attacks.  Each figure has a rating that determines its combat values, whereas hardly any two figures have the same ratings.
Though, if a tower looses one of its components and there is an identical duplicate of the same league, the player can choose to swap them. The figure in the tower which was lost is removed and the duplicate takes its place in the tower, 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 the move. Each figure can attack as many times as possible and even one attack can be lead by as many figures as necessary. To attack an opponent's figure successfully, one must reduce its rating exactly to zero (each figure that still has a negative or positive rating at the end of the opponents turn, will regenerate to its full rating). Since the ratings vary that much, it is rather difficult to attack another figure successfully.
Various possibilities for a single attack of a figure do exist, each with the goal of reducing the target's rating to 0:
 Direct confrontation is used if a movement of a figure would lead exactly onto the target figure and the ratings are equal. This attack can only be lead by a single figure at once.
 Combat formation in joint attack
 Ambuscade is used if multiple figures could move directly to the target and their respective ratings add up to the target rating. This is an optional attack generalising "Direct Confrontation". You can enable it in the options dialog.
 Seige captures pieces that are fully surrounded by enemies (optional).
 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 attack any number of different figures each turn.
 the distances are calculated like for moves (including the starting and ending position).
The Winning Orders
A player can win if he has arranged his figures in a distinct shape and a distinct order (according to their ratings). Such an arrangement must fully be located on the opposite yard (the half the board where the opposite player starts). The figures playing a role in such an arrangement must be located in a regular mathematical shape like:
a regular triangle, with three figures, one placed at (ij) and one at (i+nj) and one at (ij+m), with m,n being integers.
So place these figures in a rightangled triangle. Advanced Players even allow winning orders to be rotated triangles. 
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 figures on one vertical or horizontal line. Advanced Players even allow winning orders to be placed on diagonal lines.

Arithmetic order applies if the figures fit with an arithmetic
sequence (a_{n})
with a_{n} := b + c*n. Then it is a_{i}  a_{i1} = 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 (g_{n})
with g_{n} := c*q^{n}. Then it is g_{i} / g_{i1} = const.
Such as: {4,16,64}.
The name is derived from the geometric series b+c*q^{i}. 
Harmonic order applies if the figures fit with a harmonic sequence (h_{n})
with h_{n} := 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.
 figures that play a role in such an arrangement need not necessarily be own figures. But at least one must belong to the winners league.
Download Rhythmomachia
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. There are improvements yet to come. But still the 2 stable preview release is recommended over Rhythmomachia 1. Rhythmomachia 2 is not yet available as an applet, though, but has to be downloaded. Also, it only supports Java Virtual Machine 1.4+, currently.Comments & Puzzles
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) }
 {2, 4, 6, 9, 15, 25}
 {7, 49, 56, 64, 120, 225}
What figures are the most effective ones? Which can attack the most opponents and which can be attacked by the least? Which figures can be used best for winning orders? What value do these figures 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 9780671060305
 [Illmer et al., 1987]
 Illmer, Detlef & Gädeke, Nora, & Henge, Elisabeth & Pfeiffer, Helene & SpicklerBeck, Monika. Rhythmomachia. Hugendubel Verlag, 1987, ISBN 38803431945 (in German)
 [Borst, 1986]
 Borst, Arno. Das mittelalterliche Zahlenkampfspiel.  Heidelberg : Winter, 1986.  553 S. : Ill. (Supplemente zu den Sitzungsberichten der Heidelberger Akademie der Wissenschaften, PhilosophischHistorische Klasse ; 5) Literaturverz. S. 495  498 ISBN 3533037509 ISBN 3533037517 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 15381589.)
 [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).