The battle of numbers
Rithmomachia (also spelled Rithmomachy or Rithmomachia) is an ancient European board game, popular from the 11th to the 16th century. Sometimes called the “Philosopher’s Game,” it combines chess-like strategy with medieval number theory.
A Brief History
The game was beloved by medieval scholars, monks, and Renaissance mathematicians. It was designed not just for fun but to teach mathematics (then teachers believed in the harmony of numbers, reflecting Pythagorean ideas, and that geometry was sacred with spiritual significance).
The Board and Pieces
Rithmomachia is played on a rectangular board, typically 8 rows by 16 columns. Each player has pieces shaped as circles, triangles, squares, and pyramids. Each piece is labeled with a number called its value.
The game is won by capturing the opponent’s pieces using clever numerical relationships: arithmetic, geometric, or harmonic progressions, or by arranging surviving pieces in a winning pattern.
Basic Rules
- Players move pieces according to their shape but capture according to their number.
- Captures occur by forming valid numerical sequences with enemy pieces.
- The game ends when a victory condition is met — e.g., capturing all opponents’ pieces or arranging one’s own in specific patterns.
Play it online
After you learn how the game works, you can play it online (free):
to play rithmomachia, click here!
If you have any comments or suggestions, please let me know!
The GitHub Project
To make learning and playing Rithmomachia easier, check out my Python module and documentation hosted on GitHub:
👉 View the Rithmomachia Code on GitHub
What’s in the Repository?
rithmo.py— The core Python file that implements the board, pieces, and movement rules.prof-pyramid-blender_lesson1.py, … – all the blender python scripts for the youtube tutorials on rithmomachia.docs/— A folder for additional instructions, including a 2-page reference card and booklet with history and rules of the game.README.md— Quick overview and usage instructions.
How to Use It
- Clone or download the repository from GitHub.
- Run
rithmo.pyusing Python 3. - Follow the in-terminal prompts or explore the code to see how moves and captures are handled.
If you love ancient games or recreational math, feel free to fork the repository, report issues, or contribute improvements!
More information
- The rithmomachia page is here: Rithmomchia. It’s still under construction and doesn’t (yet?) have it’s own domain name but if it did, it would be a copy of this one.
- In case you don’t want to print out the free pdf of the above-mentioned booklet, it can be bought at amazon in book form: Rithmomchia is recreational artithmetic.
- The fine folks at the Grockle Shop make rithmomachia sets (their site doesn’t list their rithmomachia sets as of June 2025). Contact them for more information.
- Here a picture of a set I made by hand,

It was made with pre-cut wooden pieces, a leather board cut to size, and some paint markers. - Some youtube tutorials on rithmomachia (animated using Blender): rules for piece movement, rules for piece captures, on the pyramid piece, on piece progressions, and more.
Check out these recent posts:
- Rithmomachia: initial setup,
- A few animated rithmomachia games (with more animations on the works!).
- A cool post from Bruce Rawles of geometrycode.com (and who, by the way, is my cousin and who long ago got me interested in mathematics as a teenager). He also has a fascination with spiritual matters and sacred geometry and runs his own site geometrycode.com. Check out his post on the Rithmomachia Game!
- Rithmomachia is the topic of an AMS blog post: The Battle of Numbers.
- The SUNY-Onenega library site also has a rithmomachia blog post: Rithmo-mania.
- Don’t forget to check out rithmomachia.hendi.ca, from our rithmomachia colleagues to the north. They have t-shirts for sale!
