Toads and Frogs

From HandWiki
Short description: Combinatorial game with jumping pieces
An example of the combinatorial game Toads And Frogs

The combinatorial game Toads and Frogs is a partisan game invented by Richard Guy. This mathematical game was used as an introductory game in the book Winning Ways for your Mathematical Plays.[1]

Known for its simplicity and the elegance of its rules, Toads-and-Frogs is useful to illustrate the main concepts of combinatorial game theory. In particular, it is not difficult to evaluate simple games involving only one toad and one frog, by constructing the game tree of the starting position.[1] However, the general case of evaluating an arbitrary position is known to be NP-hard. There are some open conjectures on the value of some remarkable positions.

A one-player puzzle version of the game has also been considered.

Rules

Toads and Frogs is played on a 1 × n strip of squares. At any time, each square is either empty or occupied by a single toad or frog. Although the game may start at any configuration, it is customary to begin with toads occupying consecutive squares on the leftmost end and frogs occupying consecutive squares on the rightmost end of the strip.

When it is the Left player's turn to move, they may either move a toad one square to the right, into an empty square, or "hop" a toad two squares to the right, over a frog, into an empty square. Hops over an empty square, a toad, or more than one square are not allowed. Analogous rules apply for Right: on a turn, the Right player may move a frog left into a neighboring empty space, or hop a frog over a single toad into an empty square immediately to the toad's left. Under the normal play rule conventional for combinatorial game theory, the first player to be unable to move on their turn loses.

Notation

A position of Toads-and-Frogs may be represented with a string of three characters : [math]\displaystyle{ T }[/math] for a toad, [math]\displaystyle{ F }[/math] for a frog, and [math]\displaystyle{ \square }[/math] for an empty space. For example, the string [math]\displaystyle{ T \square \square F }[/math] represents a strip of four squares with a toad on the first one, and a frog on the last one.

In combinatorial game theory, a position can be described recursively in terms of its options, i.e. the positions that the Left player and the Right player can move to. If Left can move from a position [math]\displaystyle{ P }[/math] to the positions [math]\displaystyle{ L_1 }[/math], [math]\displaystyle{ L_2 }[/math], ... and Right to the positions [math]\displaystyle{ R_1 }[/math], [math]\displaystyle{ R_2 }[/math], ..., then the position [math]\displaystyle{ P }[/math] is written conventionally [math]\displaystyle{ P = \{L_1,L_2,\dots | R_1, R_2,\dots\}. }[/math]

In this notation, for example, [math]\displaystyle{ T \square \square F = \{\square T \square F | T \square F \square\} }[/math]. This means that Left can move a toad one square to the right, and Right can move a frog one square to the left.

Game-theoretic values

Most of the research around Toads-and-Frogs has been around determining the game-theoretic values of some particular Toads-and-Frogs positions, or determining whether some particular values can arise in the game.

Winning Ways for your Mathematical Plays showed first numerous possible values. For example, :

[math]\displaystyle{ T \square \square F = 0 }[/math]
[math]\displaystyle{ T F \square \square = 1 }[/math]
[math]\displaystyle{ T \square F \square = \frac 12 }[/math]
[math]\displaystyle{ T F T \square F = \{0 | 0\} = \star }[/math]
[math]\displaystyle{ T \square T F F = \{0 | \star\} = \uparrow }[/math]

In 1996, Jeff Erickson proved that for any dyadic rational number q (which are the only numbers that can arise in finite games), there exists a Toads-and-Frogs positions with value q. He also found an explicit formula for some remarkable positions, like [math]\displaystyle{ T^a \square^b F }[/math], and formulated six conjectures on the values of other positions and the hardness of the game.[2]

These conjectures fueled further research. Jesse Hull proved conjecture 6 in 2000,[3] which states that determining the value of an arbitrary Toads-and-Frogs position is NP-hard. Doron Zeilberger and Thotsaporn Aek Thanatipanonda proved conjecture 1, 2 and 3 and found a counter-example to conjecture 4 in 2008.[4] Conjecture 5, the last one still open, states that [math]\displaystyle{ T^a \square^b F^a }[/math] is an infinitesimal value, for all (a, b) except (3, 2).

Single-player puzzle

Solution timelines to the single-player toads and frogs problems with 1, 2 and 3 of each amphibian, with the vertical axis denoting time

It is possible for a game of Toads and Frogs to end early. A one-player puzzle version of the Toads and Frogs game, published in 1883 by Édouard Lucas, asks for a sequence of moves beginning in the standard starting position that lasts as long as possible, ending with all of the toads on the right and all of the frogs on the left. The moves are not required to alternate between toads and frogs.[5]

References

  1. 1.0 1.1 "Toads-and-Frogs", Winning Ways for your Mathematical Plays, 1 (2nd ed.), A K Peters, 2001, pp. 12–13 
  2. Erickson, Jeff (1996), "New Toads and Frogs results", in Nowakowski, Richard J., Games of No Chance, Mathematical Sciences Research Institute Publications, 29, Cambridge University Press, pp. 299–310, http://jeffe.cs.illinois.edu/pubs/toads.html 
  3. As mentioned both by Erickson on his website and Thanatipanonda in his paper.
  4. Thanatipanonda, Thotsaporn (2011), "Further hopping with Toads and Frogs", Electronic Journal of Combinatorics 18 (1): P67:1–P67:12, doi:10.37236/554 
  5. Levitin, Anany (2011). "Toads and Frogs". Algorithmic Puzzles. Oxford University Press. p. 53.