HOW WANDER IS BUILT · LAYER 1 OF 7
The ruler sequence and the run ladder.
Everything in Wander starts from one integer: the column number g. The ruler sequence gives every column a rank, v2(g+1), the number of times two divides g+1. A column of rank k comes every 2^k columns, so rank 4 is common, rank 12 is one in 4,096, and rank 24 happens once in sixteen million. The run ladder CUM[k] turns a rank into a height: it is the number of bits of rule 30's edge whose period divides 2^k, and it climbs 0, 1, 2, 3, 4, 5, 6, 12, 13, 21, … A hill, a city, a station, a prize: each stands on a column because of its rank, and each is as tall as the ladder says. Nothing is searched for. The next column of rank 9 after g is a rounding: ceil((g+1)/512)·512 − 1.
const R = RulerLand; // ../../../sitoolz/js/rulerland.js (rangeblends.js before it)
const g0 = 2600000;
for (let g = g0; g < g0 + 64; g++){
const k = R.v2(g + 1); // the rank of the column
const hill = R.hillAt(g); // null unless the rank is 4 or more: {g, k, h, r}
console.log(g, "rank", k, "ladder", R.CUM[Math.min(k, R.VMAX)], hill ? `hill ${hill.h} blocks, radius ${hill.r}` : "");
}
console.log("next rank-9 column:", Math.ceil((g0 + 1)/512)*512 - 1); // found by rounding, not by lookingThe Ruler Land page shows the same thing as ground: wander/land.html. The law is on cards/rulerland.md and the fixture fixtures/ruler-land.json checks 5,081 of its values between Python and JavaScript.
How Wander is built · by Lars Rocha · every layer stands on a law in sitoolz, written twice and checked against one fixture.