Every value is a number and a set
Assumes: The square that cannot be halved · The strip where every number is a whole one
The square that cannot be halved proved half of a formula for Toads and Frogs without the hop. With the hop removed, pieces never pass each other, so a strip falls apart into components: a block of toads, one contested gap, and a block of frogs. Each empty square in a component is either one player’s alone or split evenly between them. When the contested gap is even, that adds up to a whole number. When the gap is odd, one square is left over, and the component is a switch. That essay showed when two such switches cancel, and it stopped at the step it could not take. A sum of several switches has a canonical form, and nothing so far guaranteed that the form was simply the list of switches.
That step turns out to be short, and the result is a formula for the whole game. A hopless strip is worth its number part plus one switch for each switch size that occurs an odd number of times. Equal switches cancel in pairs, and distinct ones never simplify, so the hot part of every value is a set. The reading uses nothing but the positions of the pieces. Against the solver, it gives the exact canonical form of every strip from two to twelve squares, 797,157 of them, with no exceptions.
The reading
Each step of the reading has already been argued in the essays before this one, so the reading itself fits in a paragraph.
Cut the strip at its walls. A frog standing to the left of a toad, with only empty squares between them, is a wall: the frog moves away to the left, the toad away to the right, and neither will ever cross the gap. What remains between walls are components, each of the form toads, contested gap, frogs. A block with no opponent in its component simply runs to the end of the strip.
Read each component. If its contested gap is even, or it has no contested gap, the component is worth its count of free moves. That count is the integer the strip where every number is a whole one measured and the next essay proved. If the gap is odd, the component holds a toads and b frogs, and it is a switch: a mean μ, which is a half-integer when a + b is odd, plus ±t, where t = (a + b − 2)/2. The size t is set by the piece count alone. One toad facing one frog gives t = 0, and the switch is then the star ∗.
Add the means, and pair off the switches. All the means and all the free-move counts add up to one number, the number part. For the switches, the rule is the one two hot fights that add to a cold number is built on: ±t + ±t = 0 for every t, because each switch is its own negative. So two components whose switches have the same size cancel, whoever moves first and however different their gaps are. After every pair has cancelled, each size is left either once or not at all.
The value is the number part plus one switch of each size left. The first worked example in the hero, TTT.FTT.FT.F, has three odd components of sizes ±1, ±½ and ∗. None of them match, so all three stay: the value is 3/2 + ±1 + ±½ + ∗. The solver writes that as { {3∗ | 2∗} | {1∗ | ∗}}. The second, TT.F.TT.FT..F, has two components of the same size, ±½, and they cancel, leaving the number 1. The third is four copies of T.F, four stars, and it is worth nought.
Exact on every strip to twelve squares
A reading that claims to give the whole value is easy to test, because the solver can compute the whole value directly. The test is not whether the reading gets the right kind of answer, a number when the strip is a number and something hot otherwise. It is whether the canonical form the reading builds is identical to the canonical form the game tree reduces to.
They agree on all 797,157 strips. That comparison is stricter than it may look. A reading could get the switches right and a mean off by a half, or the mean right and one switch a size too small, and in either case the result would be a different canonical form. Over three-quarters of a million strips, any systematic error of that kind would show up many thousands of times. None does.
Twelve squares was chosen for a reason. The earlier essay stopped at nine, where only one strip had three odd components, and noted that ten would be the place to look. Twelve squares is where a strip can first hold three odd components of different sizes. That is the first case in which the reading claims a sum of three distinct switches, and so the first case that tests whether three distinct switches really stay apart. Thirty-six strips of that kind exist at twelve squares, and the reading is right on all of them.
It is worth being clear about what is proved and what is checked. That components add, and that an even component is worth its free-move count, was proved in the square that cannot be halved. That ±t + ±t = 0, and that a sum of switches whose sizes are all different is already canonical, are standard facts about switches. What rests on the sweep rather than on an argument is the switch value of a single odd component that has private gaps inside its blocks. The corridor formula proves it for a component with no private gaps, and here it is checked on every component that occurs up to twelve squares. So the reading is a theorem everywhere except at that one point, and at that point it is a measurement with no counterexample.
Only parity survives
Once switches cancel in pairs, how many survive is a matter of parity, and the census of strips shows that directly.
The 519,593 strips with no odd component are numbers, every one, which is the earlier theorem. The 248,567 with exactly one odd component keep exactly one switch, since a single switch has nothing to cancel with. Of the 28,318 with two, 8,632 keep none and 19,686 keep two. Which way a strip goes depends only on whether its two components have the same number of pieces, the criterion found in the previous essay. Of the 678 strips with three odd components, 642 keep one switch and 36 keep all three. The single strip with four, T.FT.FT.FT.F, keeps none.
The count of switches kept is never more than the number of odd components, and never differs from it by an odd number. That is all parity can say. The switch part of a hopless strip behaves like a Nim position. In Nim, two heaps of the same size cancel and contribute nothing to the nim-sum, and what remains is the exclusive-or of the heap sizes, one binary digit for each power of two. Here, two switches of the same size cancel and what remains is a set of sizes, one bit for each size. The two calculations have the same shape. Each object is its own negative, so a collection of them reduces to the members that occur an odd number of times.
The likeness should not be taken further than it goes. In Nim, a heap of three is the same as heaps of two and one together, because nim-addition mixes the binary digits. Switches do not mix: ±1 + ±½ is not ±3/2 or any other single switch, and the set {1, ½} keeps both members. So the comparison holds for the cancellation, and it stops at the point where Nim’s digits combine and these switches do not.
What pairs off and what is left
The parity table counts strips. The next figure shows the arithmetic directly on strips with three or four odd gaps, where the cancellation has something to do.
T.FT.FT.F is three stars, and three stars are one star. TT.FT.FTT.F has two components of size ±½ with a star between them. The two ±½ cancel, the star stays, and with a number part of 1 the value is 1∗. TTT.FTT.FTTT.F has two of size ±1 that cancel and one of size ±½ that stays. Its number part is 5/2, so the value is {3 | 2}, a switch whose swing comes from the middle component of the strip, although the two outer ones are larger. TT.FTT.FTT.F is three switches of size ±½. Two cancel and one is left, so the value is {2 | 1}.
The gap lengths do not appear in what cancels. They appear only in the number part, through the means and the free moves. That was the main lesson of the earlier essay for two odd gaps, and here it holds for any number. Cancellation depends on piece counts. The board’s spacing moves the value up or down the number line and does not affect how hot it is.
The census of switch sets
So the hot part of every hopless value is a set of switch sizes. Which sets actually occur?
Twenty-four sets occur. The empty set, meaning the strip is a number, accounts for two-thirds of all strips. Each single switch from ∗ up to ±9/2 occurs, with frequency falling as the size grows. A switch of size t needs a component of 2t + 2 pieces, and on twelve squares there is room for only a few of those. Pairs of switches start at ±½ with ∗, in the strip TT.FT.F. The only set of three is {±1, ±½, ∗}, in 36 strips, all twelve squares long.
The first strip for each single switch has a simple shape: a block of toads, one empty square, one frog. TT.F is ±½ about a mean of ½, which is {1 | 0}. TTT.F is {2 | 0}, and TTTT.F is {3 | 0}. The pattern continues to ten toads and a frog, which is {9 | 0}. Each added toad raises the left option by one and leaves the right option at nought. The toads’ side gains a move and the frog’s side gains nothing, because a single frog facing a toads across one square ends the fight in one move whoever takes the square.
The census also shows what the hopless game cannot produce, and that list is long. It has no fractions other than halves, no ups, no tinies, and no switch whose options are themselves hot except through a sum of several plain switches. The game with the hop produces all of those, and the strip nobody has a formula for found integers, stars, switches with eighth-point options and a down within a single two-parameter family. Removing one clause turns a game whose values have no known description into one whose values are all of a single shape: a number and a set.
One value for each reading
The last figure checks something the formula needs if it is to be called the description of the game. Could two different readings ever give the same value? If they could, the reading would be a way to compute values but not a way to name them.
They are equal at every length: 180 values and 180 readings up to nine squares, 276 up to ten, 411 up to eleven, 600 up to twelve. So the pair is more than a way to calculate the value. It is the value, written in different notation. Two strips are worth the same exactly when they have the same number part and keep the same set of switches. It is also why the earlier observation that three strips with the same counts of toads, frogs and empty squares can be worth three different things is not a puzzle any more. Those counts determine neither the number part, which depends on where the empty squares are, nor the set, which depends on how the pieces fall into components.
The growth of the two columns says where the variety comes from. Each extra square triples the number of strips and multiplies the number of values by about one and a half. Most of the new values are new number parts, combined with sets that already existed; the set count gains one to five members a square. The game’s hot part is small and grows slowly. Its cold part, the integer or half-integer the strip sits on, accounts for most of the variety.
What the reading says about play
A value that is a number plus a set of distinct switches tells a player how to play. In a sum of switches of different sizes, the right move is in the largest one: take the larger side of the hottest switch, and the opponent then takes the larger side of the next. That is the rule playing the hottest analyses in general and finds close to optimal but not optimal. For a number plus plain switches of distinct sizes it is the standard optimal play, because each switch’s two options are numbers and nothing in the sum rewards waiting. So a player of the hopless game, given a strip, has a complete procedure. Find the odd components. Pair off those with equal piece counts. Move in the unpaired component with the most pieces, and leave the even components and the paired ones alone, since moving in them only gives up free moves.
The temperature of the strip follows from the same reading. It is the largest surviving t, half of the largest unpaired piece count less two. A strip with five toads facing a frog across an odd gap is at temperature 2. If the strip also holds a second component with six pieces and an odd gap, the two cancel and the strip is cold. That consequence follows from the standard result about sums of switches and is not separately checked here, but it shows how much the reading contains. Temperature, the best move and the canonical form can all be read from the pieces without building any game tree.
The convention named
Toads and Frogs on a strip of squares, without the hop: Left’s toads move one square right into an empty square, Right’s frogs one square left, and no piece may jump. Normal play, the last player to move wins. Values are canonical forms, and two strips are worth the same when their canonical forms are identical. A component is the stretch between two walls, a wall being a frog to the left of a toad with only empty squares between; a contested gap is the run of empty squares between the last toad and the first frog of a component. A switch ±t is {t | −t}, with ±0 written ∗. Every strip of every length from two to twelve squares is included, with all three symbols allowed in every square.
What the reading cannot show
Strips past twelve squares. The reading rests on one claim that is checked rather than proved: the switch value of an odd component with gaps inside its blocks. A component of that kind which behaves differently would first appear on a longer strip. The other parts of the reading are theorems and cannot fail.
The game with the hop. None of this survives the hop. Walls are permanent only because pieces cannot pass, and with the hop restored a toad can leave its block and land beyond a frog, so the components are no longer independent. The reading is a statement about Elephants and Rhinos, and the contrast with Toads and Frogs is the point, not a limitation to be fixed.
Why a lone component’s switch has the size it does. The size t = (a + b − 2)/2 is measured and fits every case. What it amounts to is that whoever takes the odd square gains a move for each piece behind it, less one at each end. That is a description rather than a proof for components with private gaps.
Still open: which hopping strips are still a number and a set
The hopless game is now solved in the strongest sense available: every value, its temperature and its best move can be read from the board. The full game is not, and the open question is where between the two the description stops working. Some Toads and Frogs strips never use the hop, because no piece ever stands next to an opposing piece with an empty square beyond it. On those strips the two games are the same game, so the reading applies. Others use it once, early, after which the position is hopless. A census of which hopping strips are still worth a number and a set, and how far into play the hop’s influence lasts, would mark the boundary of the solved region inside the unsolved game. It would also show whether the eighth-point switches and the down that the strip nobody has a formula for found are produced only by repeated hops or can come from a single one.
Two other essays are close relatives of this one. Nothing worth fighting over is Shove, a game whose values are all numbers and in which a reading of the board fails, which is the opposite outcome to this one. And the same fight, eight times over looks at sums of many copies of one game. For a plain switch that is the pairing here taken to its limit: an even number of copies of ±t is worth nothing and an odd number is worth ±t, so the mean is exact and the error never exceeds the temperature.
Part 6 of 6
One argument about Toads and Frogs. The parts either side of it:
The objects named here
The third axis, after the field and the series: the games, values and theorems themselves, and every essay that touches each one.
Canonical formClosed formComponentDisjunctive sumExhaustive searchNim-sumParitySwitchTemperatureToads and Frogs
- Amazons on one line canonical form, disjunctive sum, exhaustive search, switch, temperature
- Every group must keep breathing component, disjunctive sum, exhaustive search, switch, temperature
- The parts say who wins, not how long component, disjunctive sum, exhaustive search, nim-sum, parity
- What is left when the copies pair off canonical form, disjunctive sum, exhaustive search, switch, temperature
- A board that is a sum of its regions canonical form, disjunctive sum, exhaustive search, switch
- A follow-up pays back its own follow-up disjunctive sum, exhaustive search, switch, temperature