Generator

What a witness costs, against how rare one is

A generator in the flat-folding library, called 103 times across 27 essays. Below: what it draws at its defaults and at the arguments the essays give it, what it checked while drawing, and everywhere it is used.

lettering-search is one function. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and when the generator changes, this page changes with it.

At its defaults

What a witness costs, against how rare one is5 tessellation patches. The bar is how many nodes a search visits before returning a lettering whose arcs have no loop in them; the note beside it is how many of 200 letterings drawn at random from the same pattern turn out to agree with themselves. 2 of them were never given one by the draws.the bar is how many nodes the search visited before it found onethe note is how many of the same pattern's random letterings agree with themselvesthe square patch2649 panels · 26 of 200 drawn letterings agreethe elongated patch3562 panels · 5 of 200 drawn letterings agreethe hexagonal patch4177 panels · 2 of 200 drawn letterings agreethe triangular patch4783 panels · 0 of 200 drawn letterings agreethe rhombille patch561157 panels · 0 of 200 drawn letterings agreea search that stops at the first witness; nothing here counts how many there are

view: "populations", draws: 200

Four populations with nothing to separateThe four standing populations of crease patterns in this collection, each member sampled forty times for a lettering that agrees with itself and then searched for one. Every member is given one by the sampler and every member is given one by the search, so nothing in any of these populations distinguishes the two methods.the bar is how many patterns the population holdseach one sampled forty times and then searched, to see whether the two methods ever disagreethe printed patterns80 never lettered by 40 draws · all 8 settled by search · worst 60 nodestwist tessellations70 never lettered by 40 draws · all 7 settled by search · worst 19 nodesquadrilateral meshes60 never lettered by 40 draws · all 6 settled by search · worst 6 nodesfold-and-cut patterns70 never lettered by 40 draws · all 7 settled by search · worst 14 nodesthey never do here — the patterns that separate them are not in any of these four

view: "luby", show: "sequences", kind: "rhombille", seeds: 120, budget: 20000

A restart rule is a list written in advanceFive rules for choosing the next restart cutoff from the failures so far, with the cutoffs each chooses for its first twelve attempts. Because a failure carries only the fact of failing, each list is the same whatever happens, so every rule that learns from its own failures is a fixed schedule in disguise.each rule's cutoffs for its first twelve attempts, written down before any attempt is madea failed attempt costs its cutoff and says only that the run needed more, so nothing else could set the next onedouble after every failure1 2 4 8 16 32 64 128 256 512 1024 2048double after every failure, from sixteen16 32 64 128 256 512 1024 2048 4096 8192 16384 32768grow by half after each failure1 2 3 4 6 8 12 18 26 39 58 87universal, unit of one1 1 2 1 1 2 4 1 1 2 1 1universal, unit from other patches53 53 106 53 53 106 212 53 53 106 53 53the same twelve numbers come out whichever runs fail, which is what makes each rule a fixed sequence

view: "luby", show: "learn", kind: "rhombille", seeds: 120, budget: 20000

Learning from failures, and from other patternsThe expected cost of finding a lettering under several rules that choose each restart cutoff from the failures so far, against the best fixed cutoff read off the runs and against the universal schedule given a unit taken from other patches' searches. Only the borrowed unit comes near the hindsight cutoff.the expected cost of the whole job under rules that learn from their own failures, in nodeson the rhombille patch, over the same 120 measured runs; the dark bar borrows its unit from other patchesbest fixed, 100512chosen after seeing the runsdouble after every failure1820at least 3.56 times the best fixeddouble after every failure, from sixteen1805at least 3.53 times the best fixedgrow by half after each failure1204at least 2.35 times the best fixeduniversal, unit of one32226.30 times the best fixeduniversal, unit from other patches8721.70 times the best fixeda rule that reads only its own failures cannot beat the best fixed cutoff, and cannot know which that is

What it checked while it drew

Collected by running this generator with a listener on the assertions, not written here. The count is how many separate times this build put that claim to the test.

Where it is called

Changing this generator changes every figure on this list, which is what makes the list worth publishing rather than keeping in a check script.

A crumple has no tail

The least structured crease pattern this collection can produce is a sheet folded at random and flattened. Its consistent letterings get rarer as it deepens — thirty-four of forty down to eleven — and finding one costs one step per panel from beginning to end, with no wrong guess anywhere. Disorder and difficulty turn out to be unrelated quantities.

A failure teaches a schedule nothing

The universal restart schedule costs 6.3 times the cutoff chosen by hindsight on the one folding search with a heavy tail, and the obvious repair is a schedule that learns its scale from the attempts it has already made. It cannot. A failed attempt costs exactly its cutoff and reports only that the run needed more, so every rule that chooses the next cutoff from its own failures writes down the same list whatever happens — a fixed schedule in disguise. On the measured runs, doubling after every failure costs at least 3.6 times the hindsight, and growing by half at least 2.4. What does come near is information from outside the run: the universal schedule given the longest search on four other patches as its unit costs 1.7 times the hindsight. The field that supplied the schedule reached the same conclusion, and answered it by watching runs from the inside.

A population nobody chose

Five crease patterns were measured over and over because somebody had drawn five. Ninety-six drawn from a stated grid of tiling, turn and pleat width say something the five could not: nine of them have no consistent lettering at all, and the phenomenon the collection had spent so long measuring belongs to the one tiling the grid leaves out.

A region with no lettering

One turn angle at which a tessellation patch has no consistent lettering was found by sweeping a dial. Sweeping two dials finds nine patches with none, across three tilings, filling a corner of the parameter space — and never touching the square tiling, whose sectors have no sixty degrees to cross.

A search with nothing to reorder

One search on a crease pattern costs eighty steps or fifteen thousand depending on the order it takes its decisions in. The other search on the same crease pattern costs 1,188,571 steps whatever order it is given — twelve permutations of the panels, twelve identical counts. The difference between them is one line of code that neither has and one has.

Every move leaves the verdict

The only change a folder can make to a lettering without breaking it is to push one vertex through, flipping two creases at once. Try every such move on five tessellation patches, from two different letterings each: nineteen of two thousand nine hundred and sixty-four survive the conditions, and not one of the nineteen turns a lettering that agrees with itself into one that does not, or the other way about.

Four easy patches and one that is not

Run the same search a hundred and twenty times on each of five tessellation patches, changing nothing but the order the letters are tried in. Four of them answer in between twenty-five and fifty-three steps every single time. The fifth answers in eighty-four steps at best, a hundred and sixty-six in the middle, and does not answer at all in forty-eight runs of the hundred and twenty.

Four populations with nothing to separate

This collection keeps four standing populations of crease patterns to test its machinery against. Twenty-eight patterns, sampled forty times each for a lettering that agrees with itself and then searched for one — and on every single member the two methods return the same verdict in the same breath. The patterns that separate them are in none of the four, and the reason they are not is what the populations are for.

Ninety-nine in a hundred pass

A designer checks a box-pleated pattern the way every text teaches: vertex by vertex, counting mountains and valleys, watching the smallest sector. At sixteen divisions that check passes a hundred letterings in a hundred, and one of them folds. The check that separates them costs a single sweep over the crease list and is in no recipe anywhere.

One solution of a search nobody ran

A crease pattern arrives with its letters already on it, and they look like part of the drawing. They are not. Every construction here ends in a propagation, a propagation ends wherever its first guess took it, and the lettering that comes out differs from the one a search finds on between a half and three-fifths of the creases — on patterns whose own letters are perfectly good.

One witness or forty

Taking the randomness out of a search made it three orders of magnitude cheaper in the worst case and cost it thirty-nine of its forty answers. The compromise everybody reaches for — randomise only the choices that cannot matter — recovers four of the forty on two patches and none on the other three, because the diversity was never where it looked.

Rare is not hard

Crumple a sheet deeper and the share of its labellings that agree with themselves falls from thirty-four in forty to eleven. The number of steps a search needs to find one of them does not move at all: it stays at about one per panel, with no backtracking, the whole way down. How often an answer turns up at random and how much work it takes to find one are different quantities, and a crumpled sheet is where they come apart.

Refused at one lettering

Four of six quadrilateral meshes here have no arrangement of their nine panels — established by searching every ordering, at the labelling each mesh arrived with. Enumerate every labelling instead and two of the four fold perfectly well at a different one. What was reported as a fact about four meshes is a fact about two meshes and two labellings.

Restarting what cannot be restarted

Stopping a search early and starting it again with a fresh seed costs five hundred and twelve steps in expectation against sixteen thousand for patience. Every number in that is right. The distribution it is right about was made by the search's own coin, and taking the coin out costs eighty — with nothing left to reseed.

Stopping is cheaper than finishing

A search whose cost varies by a factor of two hundred with nothing but the order of its guesses should not be waited out. Give up after a hundred steps, reseed and start again, and the whole job costs five hundred and twelve steps in expectation; run each attempt to twenty thousand and it costs sixteen thousand two hundred and ninety-one. Patience is thirty-two times more expensive than impatience.

The difficulty was in the coin

One tessellation patch, one search, one test at every node — and a cost that runs from eighty-six steps to fifteen thousand depending on nothing but the starting seed. The heavy tail is real, it was measured carefully, and it was made by a single line of the search that nobody had thought of as a choice at all.

The lettering nobody could draw

Two hundred letterings drawn at random from the rhombille tessellation patch, and not one of them agrees with itself. Two thousand, and still not one. The patch was left as an open question — and it has an answer, found in five hundred and sixty-one steps by a search that tests the arcs while it is choosing the letters instead of after it has chosen them all.

The order that is its own mirror

Trying a mountain first and trying a valley first are two different searches, and on a hundred and forty-two crease patterns they cost the same number of steps — not on average, not nearly, but identically, pattern for pattern. The reason is a symmetry of every condition the subject has, and it is four lines long.

The order that proves nothing exists

Twelve crease patterns with no consistent lettering at all. Proving it takes fifteen steps under one rule and half a million under another — and on three of the twelve the two rules swap places, so neither is the good one. The cost of a negative is two to the power of how many free choices sit above the contradiction.

The tail was named somewhere else

The search for a mountain-valley labelling of a tessellation patch costs eighty-four steps at best and does not finish at all two runs in five, and the cure is to stop and start again rather than to wait. None of that was discovered here. The distribution was described in the study of satisfiability solvers in the nineteen-nineties, the restart arithmetic is older still, and what a crease pattern contributes is one more instance.

The test that never fires on a map

The cheapest refusal this collection has reads a crease list once and reports that no arrangement of the layers exists. Enumerate every labelling of every map from two panels to nine and it fires on four of the four hundred and fifty-four — all four on the largest map, none at all below it. On the oldest open problem in the subject, the cheap test has essentially nothing to say.

Twelve creases a micrometre long

A patch this collection has drawn for a long time carries a hundred and forty-two creases and a hundred and thirty arcs, and nobody had asked what the other twelve were. They are fragments left where the clip caught a pleat almost exactly at a corner — between one and nine micrometres long on a printed sheet, at one turn angle out of four, and it is the turn the collection prints.

What a grid costs in circuits

Box-pleating puts every crease on a square grid, and a square grid is the shape with the most short circuits per panel that this collection draws. On the sixteen-by-sixteen grid a designer actually works on, one mountain-valley labelling in a hundred agrees with itself. A search still finds one in two hundred and sixty-one steps.

What the hindsight was worth

The best restart cutoff for the one tessellation search with a heavy tail was read off a hundred and twenty measured runs, which nobody running the search could have done in advance. The universal schedule needs no such knowledge, and on the same runs it costs 3,222 nodes in expectation against 512 for the cutoff chosen by looking — a factor of 6.3, which is close to the base-two logarithm of that cutoff, as the theory of the schedule says it should be. A larger unit brings the schedule within a few per cent of the hindsight, and choosing the unit is choosing the scale the schedule was meant not to need.

Where a sector crosses sixty

Turn the twist polygons of a tessellation patch a hundredth of a radian further and the pattern goes from having no mountain-valley labelling at all to having one immediately. Nothing about its graph changes across the transition — the same eighty-three panels, the same hundred and forty-two creases, the same four labellings at every one of its sixty vertices. What changes is which sector at a vertex is the smallest one.

Which choice the cost lives in

A backtracking search takes two decisions at every step — which thing to decide, and what to decide about it. The literature is almost entirely about the first. On these crease patterns the whole of the cost was in the second, and the structural improvement everybody reaches for first makes matters worse on fifty-two patterns out of eighty-seven.

Which condition does the refusing

A search for a lettering carries five conditions: developability, Kawasaki, Maekawa, the big-little-big lemma, and the demand that the arcs the letters force have no circle in them. Run it on five tessellation patches and count what makes it take a letter back. The four everybody checks refuse nothing at all. Every single backtrack is the fifth.

Every generator · The flat-folding field · The patterns a reader can fold