The Hydra is a rooted tree. The object of the game is to chop off all its heads (the blue
disks). At step n
, when you cut a head, the Hydra will grow n
new copies of the tree
growing from the neck at which the head was cut.
A theorem by Paris and Kirby [1] states that you always win, no matter how you chop the heads, but it takes a rather long time to chop down a hydra. Paris and Kirby also showed that Peano arithmetic does not prove that hydra always loses.
The Hydra game is implemented in Java. I have released the source code into the public domain. Please send me any enhancements you implement on top of my code.
You may run the program in several ways:
-
Run the game as an applet in your browser (you may have to convince the brower that this is not a secuirty risk).
-
Download the JAR file
hydra.jar
and run it on your computer by double-clicking on it or from the command linejava -jar hydra.jar
-
Run
HydraWindow
from your IDE if you know what that means -
Change to the repository directory, compile the program
javac -d bin -sourcepath src src/hydra/HydraWindow.java
and run it with
CLASSPATH=bin java hydra.HydraWindow
[1] Laurie Kirby and Jeff Paris: Accessible Independence Results for Peano Arithmetic. Bull. London Math. Soc. 1982; 14: 285-293.