Try to defeat the hydra!

The hydra currently has: segments, heads, and depth . Hercules has cut heads so far.

Click on a head () to chop it off. When a neck segment () is cut off, the grandfather node of the severed head, if any, can afterward grow back as many copies as the hydra wishes of the entire subtree from which the head was cut off (i.e., the father node of the severed head and all its descendants).

Nodes which have just grown back are shown slightly blueish ().

Mathematical fact: no matter what you do and no matter how much the hydra chooses to replicate when you cut off its heads, the hydra will always be defeated in a finite amount of time. (Of course, in this particular JavaScript implementation, the hydra is very tame, and only actually grows parts back when it won't clutter the display too much. So it's really very easy to defeat the hydra.) Metamathematical fact: the previous mathematical fact (suitably formalized) cannot be proven in Peano arithmetic (essentially, because it requires a transfinite induction on ε 0 and this is the proof ordinal of Peano arithmetic).

Restart with a new hydra.

Undo previous move (only one level of undo).

Start auto play or stop auto play.