Theme

The thread: What a search costs — page 4

A value is worth what it costs to find. These essays price the search rather than quoting the answer: positions visited, states stored, and the size of the board where the counting stops.
A Cram position read as its pieces. A 4 × 5 Cram board after 3 dominoes, its free squares split into 3 pieces worth ∗1, 0, ∗2. The exclusive-or, 3, is the value of the whole board, which a search of all 58,830 reachable positions confirms is how every position adds up. Impartial games

Cram is played in pieces, and the pieces are small

A table of Cram rectangles answers the opening and nothing after it. Of the 58,830 positions reachable on a 4 × 5 board, 86% have already fallen into pieces no domino can cross, and the exclusive-or of the pieces' values is right on every one. The pieces come in 2,304 shapes, thirteen of them rectangles; two in five pieces are worth nothing at all; and no shape of up to eleven squares is worth more than ∗4.

Width against sample size, days three and four. The width of samples of game values at sizes 30, 60, 120 and 240 on log–log axes: day three's random subsets at 8.2, 12.2, 19.7, 28.7, under a ceiling of 86 for the whole day, and day four's corrected samples under two recipes, steeper and pulling away. Sums and comparison

Day four is wider in kind, not in proportion

The largest set of mutually confused values in a sample of 120 grows by half from day three to day four. Measured at 30, 60, 120 and 240 values, the half is not a constant: day four's width is 1.24 times day three's at thirty values and 1.67 times at two hundred and forty, under both recipes, and the gap opens by about a tenth at every doubling. Day three's growth bends towards the 86 its whole day holds; day four's keeps an exponent near 0.7. At 240 values the narrowest day-four sample is wider than the widest day-three one.

The coin's player over whole games. For the day-three values and every position of eight Domineering boards: positions Left wins moving first, how many offer a choice, how many have a wrong first choice by the coin, how many the coin's player loses against the best reply, and how many of those losses come after a correct first choice — none. Where it stops

The coin's mistake comes first

A player who makes the random-turn move at every turn of an alternating game, against an opponent who knows it, loses 957 of 133,502 won positions across the day-three values and eight Domineering boards — and every one of them is lost at the first choice. Not one position is lost by a later move after a correct first one. The errors do not compound; they arrive at once or not at all, and the empty 4 × 4 board is one of the positions where they arrive.

Rules of thumb in the rook ending. Five rules of thumb for king and rook against king and the distance-to-mate table, with how many values each uses, from how many of 175,168 won positions it can be held for ever, and how many of 400 games it mates. The rules can be held from more than 98% of positions; the best mates 241 games. Out in the world

A rule of thumb has to stand still

A number that falls at every move of a won rook ending must take sixteen values, because the longest mate takes sixteen moves — so the distance table is already the smallest progress table there is. Every rule a player is taught is coarser, from six values to 168, and so must sometimes stand still. Used greedily, each of five rules can be held in a loop from more than 98 per cent of the won positions, and the best of them mates 241 games in 400.

The price of the opening tie, against two bounds. On the 263 lines where the combined tie-break first loses value at an opening tie: the second-largest temperature and the hottest follow-up a tied part leaves both bound the price on every line, the smaller of the two equals it on 248, and the follow-up is below the second temperature on 138. What it costs

A tie costs its follow-up

When several parts are equally hot and the cheap rule picks the wrong one, the classical guarantee says the mistake costs at most the second-largest temperature. On all 263 opening ties the combined tie-break gets wrong, a sharper number bounds it: the hottest thing any tied part leaves behind. The smaller of the two equals the price on 248, and on 138 the follow-up is half the classical bound. Of 2,594 costly ties met in play, the follow-up bound fails nineteen times — and in every one the right move was in no tied part at all.

A kept table lifts the curve and does not cross it. For 1000 deep positions of 4 × 5 Domineering, the number each method has proved within budgets from 16 to 8,192 positions expanded. At 128: finishing 991, the window keeping every verdict 884, the window with fresh tables 861, plain deepening keeping exact verdicts 564, plain deepening fresh 478. What it costs

A kept table narrows the tail, not the gap

A certificate by deepening throws its table away at every iteration, and the obvious repair is to keep what earlier iterations proved exactly. On a thousand deep positions of 4 × 5 Domineering it helps: plain deepening's mean cost falls by a fifteenth, and the one-sided window's worst case by two-fifths once its guesses are kept as well. It does not cross the search that finishes at any budget, on any of three boards — and a plain certificate cannot reuse a single guess, because a position one move further from the cut is a different question.

Clauses added to a rule of thumb, and the positions it can still be held in. For king and rook against king, the share of won positions from which the best rule of one to nine clauses can be held in a loop for ever: 98.5% with one clause, 83.6% with four, 69.3% with all nine, against none for the distance table. Out in the world

Nine clauses, and the rook still circles

Give a rule of thumb for king and rook against king one clause at a time — the box, the kings, the black king's room, a safe rook, a guarded one — and recompute after each the positions from which black can keep the game going for ever. Of all 3,609 ordered rules of up to four clauses, the best can still be held from 83.6 per cent of won positions. The best of nine found stops at 69.3 per cent after six, holds from every position thirteen or more moves from mate, and mates fewer games than the two-clause rule it set out to improve.

Three growing octal codes, and where their maxima stall. The running maximum of the Grundy values of the octal games ·6, ·564 and ·007 from 64 to 262,144 heaps, on axes scaled by powers of two. Each rises close to proportionally and then nearly stops just above a power of two: ·6 at 291, ·564 at 1,321, ·007 at 1,064. What it costs

The records land on powers of two

Follow the largest Grundy value of ·6, ·564 and ·007 to 262,144 heaps and the growth has no single shape. Each time the maximum first reaches a power of two it lands on it exactly, which exclusive-or forces. Below that the maximum nearly doubles with every doubling of the heap; above it ·6 and ·564 all but stop, with no record for 70,000 and 113,000 heaps, while ·007 pauses near 800 and then bursts to exactly 1,024. Records come in no fixed ratio and at no steady rate, so the growth is not logarithmic either.

How much memory the rule needs. Games mated out of 400 by the nine-clause rule with memory of the last 1 to 256 positions, and of the whole game, against two black strategies. Short windows barely help; against a loop-keeping black 64 positions mate 247 and 128 mate 334; full memory mates every game. Out in the world

Remembering where it has been

The best rule of thumb nine clauses could make for king and rook against king walks past a mate in two for ever, because it cannot tell a second visit from the first. Give it a memory of the game and let the memory overrule it whenever its move would return somewhere already reached, and every one of 400 games is mated. But a memory of the last 64 positions mates only 247 of them, the whole game has to be kept, and against a black that knows the rule's loops the median mate takes 134 moves where the table needs at most sixteen.

A list of shapes answers the end of the game. For the 5 × 5 Cram board, the share of reachable positions at each number of dominoes placed whose pieces are all in the commonest K shapes, for K = 33, 184, 782 and 3,786. Every list answers nearly every late position and almost no early one; each curve is an S moving left as the list grows. Impartial games

A list of shapes is an endgame table

Two Cram shapes — the lone square and the two-square slot — are half of every piece met on every board from 3 × 6 to 5 × 5, and 184 of 16,457 are nine tenths of them on 5 × 5. But a position is answered only when all its pieces are, and nine positions in ten need 3,786 entries. The list answers the end of the game and almost nothing before it; each domino earlier that it is asked to reach costs a list about six times as long.

Where every growing octal code reaches each power of two. For each of the 66 distinct value sequences among the 178 growing octal codes of up to three digits, the heap at which the largest value first reaches 2, 4, 8 and so on, to 32,768 heaps. Past the first few powers the lines climb more steeply than a doubling of the heap per power of two, mostly less steeply than a quadrupling. What it costs

The ratio belongs to the family, not the game

Every growing octal code of up to three digits reaches each power of two exactly, at some heap — 1,482 crossings over 178 codes, all exact. Read the heaps where they happen and the ratio between successive crossings has a law, but not for any one code. From 64 to 512 the median across the codes sits at 2.6 to 2.7, the middle half between 2.2 and 3.4, and nothing falls below two. A code's own ratio at one power barely predicts its next, and the longest wait in the census ended in a crossing eighty-nine times further on.

Mates by move number, with memory. The number of 400 king-and-rook games mated by each white move, for kings then box and for the best nine-clause rule, both with memory, against a loop-keeping black. By move fifty the first has mated 364 and the second 111. Out in the world

Memory needs a compass, and chess gives it fifty moves

A rule of thumb for the rook ending that remembers the game and refuses to return to a position must eventually mate — but only eventually. Given that memory, 26 of the 81 rules of one or two clauses mate none of 400 games within 2,000 moves, and the 15 that mate all of them every one reads the box or the black king's room. Chess allows fifty moves. Inside that limit the nine-clause rule with memory mates 111 games against a black that knows its loops, and the plain two-clause rule kings-then-box mates 364.

The wait is in the last few values. For 248 crossings of a power of two by growing octal codes, the heap at which a heap's options first came within four, two and one values of covering every value below the power, and the crossing itself, each over the previous crossing's heap. The spread is narrow until the last few values and wide at the crossing. What it costs

The wait is in the last few values

A growing octal code reaches a power of two at the first heap whose options cover every value below it, and the heaps where that happens grow by a ratio that belongs to the family, not the game. Follow the coverage itself and the ratio splits in two. Coming within four values of the power takes 1.6 to 2.6 times the previous crossing for four codes in five; the last four values take the rest, and all of the spread. The longest waits are not one value nobody can make, but dozens of heaps each missing a different one.

The hottest follow-up still bounds the tie. On 17,670 boards of two to four parts at temperature 2 whose follow-ups have follow-ups, no choice among the tied parts costs more than the hottest follow-up. It equals the price on 622 of the 12,120 boards where some choice costs anything. What it costs

A follow-up pays back its own follow-up

Choosing wrongly among equally hot parts was found to cost at most the hottest follow-up any of them leaves, on parts two levels deep. One level deeper the bound survives — on all 17,670 boards tried — but stops being the price: it is met on one costly board in twenty. Beside a plain switch the price is exact and asymmetric. Missing the opponent's follow-up costs its whole temperature; missing one's own costs its temperature less that of the fight it leaves in turn — and four levels deep, the subtraction still stops there.

All themes