Values

Depth multiplies what width costs

Reducing a form to canonical form expands far more positions than deciding who wins it, and the excess grows with the number of options. Hold the width fixed and let the options come from day one, day two and day three: at four options the reduction costs 3.7, 9.7 and 29 times what deciding costs. Each day deeper multiplies the ratio by about three at every width, and divided by its own one-option value each day's ratio grows with width almost alike. The two growths multiply, as predicted.

Assumes: A factor, and not an overhead · Comparing two positions means playing a third

A factor, and not an overhead priced the two halves of knowing a game. Deciding who wins a form expands the form’s own tree, once, with memory. Reducing it to canonical form — deleting dominated options, bypassing reversible ones — expands a difference game for every comparison the reduction makes, and a difference game is a sum of two trees. Over a census of 256 small forms the reduction expanded 5.46 times as many positions as deciding, and the ratio grew with the form’s width, from about a half at one option to nearly ten at eight. A factor, then, that grows with the width.

That census held its forms shallow — every option a game of at most a move or two — and it named the experiment that was missing. Width multiplies the number of comparisons; depth should multiply the size of each one. If the two growths multiply, a form four options wide and three moves deep should be far dearer to reduce than either alone suggests. The prediction was stated, and the census was said to be one line away.

It was more than one line, for a reason worth recording below, but the prediction holds. At a fixed width, each day of depth multiplies the reduction’s price by about three, and the multiplication is close to independent of the width.

Width held still, depth let go

To see depth alone, the forms here all have one shape: at most two options a side, so one to four options in all. Only the pool the options come from changes. Day one supplies the four games born by day one — 0, ∗\ast, 1 and −1 — and every form of that shape built from them: 121 forms. Day two supplies all twenty-two values born by day two: 64,516 forms, every one. Day three supplies 1,474 values, too many for every form, so 4,000 are drawn with a fixed seed, about a thousand of each width.

Reducing against deciding, by width and depth. The ratio of positions a reduction to canonical form expands to positions deciding the outcome expands, for forms of one to four options with options born by day one, two or three. At four options it is 3.69, 9.68 and 29.14: depth multiplies the ratio at every width.
Fig. 1 Positions a reduction expands per position deciding the outcome expands, for forms of one to four options with options born by day one, two or three. Reading across a row holds the width fixed and changes only the depth: at four options the ratio is 3.69, 9.68 and 29.14. Each day deeper multiplies it by between two and a half and three and a half, at every width.

The table is the whole result in one picture. Down each column the ratio rises with width, as the earlier census found: more options mean more ordered pairs to compare and more answers to test. Across each row it rises with depth, and steeply. At one option the ratio is 0.55, 1.63 and 5.12; at four it is 3.69, 9.68 and 29.14. A form of four options whose options are born by day three costs about eight times as much, relative to deciding, as a form of four options born by day one.

The one-option row repays a second look, because it is where the earlier census found reduction cheaper than deciding — a ratio below one. A form with one option has nothing to dominate, so the only comparisons are the reversibility tests, one per answer of the option. With day-one options there is at most one answer and its difference is tiny, so the reduction expands fewer positions than the form’s tree. With day-three options the single option has several answers, each tested against the whole form, and each difference is a sum of two trees several moves deep; the reduction expands five times the form’s tree. Even the cheapest shape of form is dear once its options are deep.

Two factors, both growing

The ratio is a product of three things, and splitting it shows which ones depth moves.

Two factors that both grow with depth. For forms of four options with options from day one, two or three: comparisons per form, positions per comparison, positions deciding the outcome, and the ratio they make. Comparisons rise from about six to twelve and positions per comparison from under three to over forty, while deciding rises from four to seventeen.
Fig. 2 At four options: comparisons a form makes, positions each comparison’s difference game expands, and positions deciding the outcome expands, for options from each day. Both factors on top grow with depth — deeper options have more answers to test for reversibility, and every difference is a sum of two deeper trees — while deciding grows far more slowly.

The positions a reduction expands are the number of comparisons times the positions per comparison, and the ratio divides that by the positions deciding expands. At four options, comparisons per form rise from 6.0 with day-one options to 8.0 with day two and 11.6 with day three. Positions per comparison rise far faster: from 2.6 to 9.4 to 42.5. Deciding grows from 4.3 to 7.7 to 16.9.

The first factor grows with depth for a reason the earlier census could not see. With day-one options, the number of comparisons is set almost entirely by the width — the ordered pairs on each side, for domination — because a day-one option has at most one answer to test for reversibility. Deeper options have more answers: a day-two option such as {1∣0}\{1 \mid 0\} has a Right answer to test, {1∣0,∗}\{1 \mid 0, \ast\} has two. So depth adds comparisons, not only bigger ones, and the earlier essay’s “quadratic count of comparisons” is quadratic in the width with a coefficient that depth raises.

The second factor is the one the prediction was about. A comparison of two options searches their difference, which is a sum, and the positions of a sum are roughly the products of positions of the two trees. Deepen both trees by a day and the product grows by the square of the growth of each, while deciding grows only as fast as one tree. That is the mechanism the price of a single comparison already measured, applied here inside a reduction that makes many of them.

A sum’s tree is a product

The reason a comparison’s price grows so much faster than a form’s own tree can be seen on a single pair. Compare {1∣0}\{1 \mid 0\} with ↑\uparrow, which a reduction does whenever both appear as Left options of one form. Each has three positions in its tree: {1∣0}\{1 \mid 0\}, 1 and 0 for the first; ↑\uparrow, 0 and ∗\ast for the second. Deciding either expands three positions. The comparison searches {1∣0}−↑\{1 \mid 0\} - \uparrow, a sum of the first with the negative of the second, and a position of that sum is a position of the first beside a position of the second: three times three, nine positions, every one of them distinct.

One day deeper, {1∣0,∗}\{1 \mid 0, \ast\} against {1∣∗}\{1 \mid \ast\} — two day-two values with four positions each — gives a difference of fifteen positions; the product would be sixteen, and only one pair coincides. The form’s own tree grows by adding its options’ trees, so deepening the options by a day roughly doubles it. The difference grows by multiplying them, so the same deepening roughly squares the factor. That is the second factor in the split above, read off two small pairs: deciding adds trees and comparing multiplies them, and depth makes every tree larger.

The arithmetic also says where the factor will stop growing so fast, which is when a difference collapses. {2∣1}\{2 \mid 1\} against {1∣0}\{1 \mid 0\} is a difference of twelve positions whose value is exactly 1 — the two are the same switch, shifted — and a comparison of related options is often cheaper in value than in search. The search still expands all twelve: a comparison does not know in advance that the answer is simple, which is the whole difference between knowing a value and computing one.

Do width and depth multiply?

The prediction had a precise form: the ratio is a factor set by width times a factor set by depth. If that is so, dividing each day’s ratios by its own one-option ratio should leave the same curve for every day.

Width and depth multiply. The ratio of reducing to deciding for forms of one to four options, each day's values divided by that day's value at one option. The three curves nearly coincide: the cost of width is the same multiple whatever the depth, so the two growths multiply.
Fig. 3 Each day’s ratio divided by that day’s ratio at one option, for one to four options. If width and depth contributed independent factors the three curves would coincide. They nearly do: four options cost 6.77, 5.96 and 5.69 times one option on days one, two and three.

They nearly do. Divided by its one-option value, each day’s ratio at four options is 6.77, 5.96 and 5.69 — within twenty per cent of each other — and the curves at two and three options lie closer still. To a first approximation the ratio is a width factor times a depth factor: going from one option to four multiplies it by about six whatever the options are, and going from day one to day three multiplies it by about eight whatever the width.

The approximation is not exact, and the way it fails is informative. The day-one curve rises fastest. With options of a move or two, the cost of a comparison is almost constant — the largest difference game any day-one comparison searches has five positions — so width works on the reduction purely through the number of comparisons, and the number of comparisons is what grows fastest with width. With deeper options, part of the reduction’s cost is a few very large comparisons whose size does not depend on how many other options the form has, and that dilutes the width’s effect a little. The two growths multiply, and depth slightly blunts width, which is the opposite of the prediction’s hope that the two would compound.

How the two costs diverge

The ratio hides that both costs grow. Read separately, they grow at very different rates.

Deciding and reducing, a day apart. For forms of four options with options born by day one, two and three, the positions deciding the outcome expands and the positions reducing to canonical form expands, with each day's growth over the previous. Deciding roughly doubles a day; reducing grows five- to sevenfold.
Fig. 4 For forms of four options, the positions deciding the outcome expands and the positions reducing to canonical form expands, with options from each day, and each day’s growth over the one before. A day deeper roughly doubles what deciding costs and multiplies what reducing costs by about five and about seven.

Deciding a form of four options expands 4.3 positions with day-one options, 7.7 with day two and 16.9 with day three — a factor of 1.8 and then 2.2. Reducing it expands 15.7, 74.9 and 492.8 — a factor of 4.8 and then 6.6. The gap therefore widens by a factor of about three a day, and the factor itself is rising: from day two to day three the reduction’s cost grows faster than from day one to day two.

That rising factor is what deserves attention for anyone writing a solver, and it sits uneasily with the way the subject’s tables are built. Every census of values in these essays — the birthday is a floor on day three, the reduction that puts options back on the forms that grow — reduces every form it meets, and the cost of doing so is what decides how far such a census can be pushed. Values born on day four number in the trillions and nobody enumerates them, but a solver meets day-four positions every time it reduces something four moves deep, and the trend says each day of depth costs more than the last. A reduction is not a constant multiple of deciding at any depth worth working at. It is a multiple that grows with depth, at a rate that itself grows.

The largest single comparison

Averages hide the comparisons that dominate. The largest difference game any comparison in the census searches is a direct measure of how bad a single step of the reduction can be.

The largest comparison. The largest difference game searched by any comparison in the reduction of a form, by the form's width and the day its options are born. With day-one options no difference exceeds five positions; with day-three options the largest reach the high eighties.
Fig. 5 The largest difference game any comparison searches, in positions, by the form’s width and the day its options are born. With day-one options no comparison searches more than five positions; with day-three options the largest reach the high eighties — five times the form’s own tree.

With day-one options no comparison in any reduction searches a difference of more than five positions, however wide the form. With day-two options the largest is seventeen. With day-three options it is eighty-five in the sample, against an average form tree of seventeen positions at four options. One comparison in the reduction of a day-three form can search five times as many positions as deciding the whole form does.

These are counts of distinct positions in one difference game, and they are what makes reduction slow in practice. A solver can cache outcomes across a search, as the tree and the graph measures, and a reduction can cache comparisons across forms; neither changes the fact that each new pair of deep options brings a new sum to search.

The census the earlier essay ran

There is one correction to make before the result can be set beside the earlier one, and it is the reason the census was more than one line away. The earlier essay describes its 256 forms as built from “the four day-one games”, and the forms are in fact built from 0, 1, −1 and −2: the pool was chosen as the four smallest values by tree size, which takes −2, born a day later, and leaves out ∗\ast.

Two pools of four. The ratio of reducing to deciding over every form built from subsets of four games: 5.46 with 0, −1, −2 and 1, and 4.04 with 0, ∗, 1 and −1, the games born by day one. The one game a day deeper accounts for the difference.
Fig. 6 The census of every form whose options are any subsets of four games, up to four options a side, on two pools: the four smallest games by tree size, which take −2 and leave out ∗, and the four games born by day one. With the games born by day one the ratio is 4.04 rather than 5.46, and it stops rising at seven options.

Rerun on the four games actually born by day one, the same census of 256 forms reduces at 4.04 times the cost of deciding, not 5.46. Its ratio rises from 0.55 at one option to 6.00 at seven and falls back to 5.00 at eight. The one game a day deeper accounts for the whole difference — which is this essay’s result showing up inside the earlier one. A pool with a single deeper game in it is dearer, by about a third, than one without.

Nothing in the earlier essay’s argument depends on which pool it used: the ratio is a factor rather than an overhead and it grows with width on both. What changes is the number quoted, and the claim that its forms were all built from day one. The forms in two hundred and fifty-six ways to write twenty-two things are built from 0, ∗\ast, 1 and −1, as described there.

The counts and the convention

Normal play throughout: the canonical form is the reduction that preserves value under the disjunctive sum, and both of its operations are defined in terms of normal-play comparison. A form is a game written with its options as given, each option being a canonical value from the pool. Deciding counts the distinct positions in the form’s own tree, which is what a memoised outcome computation expands. Reducing counts the distinct positions of every distinct difference game the reduction searches: every ordered pair of options on a side, for domination, and every answer of every option against the whole form, for reversibility. Differences repeated within one form are counted once; nothing is cached across forms, which is generous to neither cost. The unit is a position expanded, not a unit of time.

The pools are the values born by day one, by day two and by day three, in canonical form. The day-three census is a sample of 4,000 forms drawn with a fixed seed, an equal number from each pairing of side sizes; a second seed gives the same ratios to within one per cent.

What the census cannot settle

Day four. The growth factor of the reduction’s cost rose from 4.8 to 6.6 between successive days, and two steps do not make a trend. A census with day-four options would need a sample of a population nobody can list, drawn by building forms from day-three values, and it was not attempted.

Wider forms at depth. The width was capped at two options a side to keep the day-two census exhaustive. The separability measured here covers widths one to four; the earlier census reached eight options with shallow options, and whether the width factor at eight options is still the same multiple at day three is untested.

Depth apart from the options’ own width. A day-three value is not only deeper than a day-two value; it typically has more options of its own, and its options have more. The census changes the day the options are born, which moves depth and the options’ width together, and the split figure shows both at work — more answers to test is the options’ width, larger differences is mostly their depth. Separating them would need pools matched in one and differing in the other, such as day-three values with exactly one option a side against day-two values with the same, and that was not done. So “depth” here means “the day the options were born”, which is the quantity a solver actually faces, and not a pure measure of how many moves deep a tree runs.

A real solver. A program that reduces many forms keeps comparisons in a table across all of them, and on a population of related forms most differences recur. The counts here are per form and say what one reduction costs from cold.

Still open: the reduction’s own shortcuts

A reduction does not have to make every comparison. A dominated option found early removes the need to test it for reversibility; an option already known to be canonical need not have its own answers re-examined; and how wide a form can get showed that bypassing a reversible option can widen a form, which can make the remaining comparisons more numerous. The census here counts the comparisons a naive reduction makes, in a fixed order. The measurement that would say how much of the depth factor is avoidable is the same census with the reduction’s comparisons made in the cheapest order — dominations first, reversibility only for survivors — and its counts set beside these. If the depth factor shrinks to near the depth factor of a single comparison, then the extra comparisons that deep options bring are mostly wasted ones, and a reduction’s price at depth is the price of comparison and nothing more.

Part 4 of 4

One argument about Canonical form. 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.

Born on dayCanonical formComparisonDay threeDifferenceDominated optionExhaustive searchNormal playReversible option