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.
16 min read 7 figures It has to endWhat a search costs

Assumes: A rule of thumb has to stand still · A win is not a way of winning

A rule of thumb has to stand still scored the rules a chess player is taught for king and rook against king — shrink the box, bring the kings together, drive the black king to the edge — as progress measures: numbers that white, choosing among the moves that keep the win, can make smaller at every turn until mate. It found a floor no rule of thumb can get under. The longest mate in the ending is sixteen moves, so a number that falls at every move needs sixteen values, and every rule coarser than that must sometimes stand still. Where it stands still it can be held. From more than 98 per cent of the 175,168 won positions, black could keep each of the five rules going round a loop for ever.

The essay closed with a constructive question. Players do not use one rule; they use a rule and a list of exceptions — keep the rook out of the king’s reach, keep it between the kings, move the king when the rook is safe. So add clauses one at a time and recompute, after each, the positions from which black can still hold the loop. If that set empties after two or three clauses, progress in the rook ending fits in a sentence a person can remember. If it does not empty until the clauses describe the whole table, then the information that drives a mate does not compress.

It does not empty. Nine clauses, combined in every order of up to four and in the best order a search could find of all nine, never take it below two thirds of the won positions — and the ones they do take are the ones nearest mate.

Nine things a player reads off the board

A clause here is a small whole number read off the squares of the three pieces after white’s move, where smaller is better. Nine were chosen to cover what a player is taught.

Nine clauses for the rook ending. Nine numbers a player reads off a rook ending — the box, king distance, king walk, the black king's room, whether the rook is safe and guarded, whether it stands between the kings, the edge and opposition — with the share of won positions from which each, used alone, can be held for ever. Every one exceeds 98%.
Fig. 1 The nine clauses, each read on the position white’s move leads to. Used alone — white plays a won-keeping move that makes the number smallest, and takes any mate in one — every clause can be held for ever from more than 98 per cent of won positions.

Box is the rule from the earlier essay: the number of squares in the rectangle the rook’s file and rank confine the black king to. Kings is the number of king steps between the two kings and walk the number of files plus ranks, a finer version of the same idea. Room counts the black king’s legal moves, the measure a player has in mind when told to take squares away. Safe is one when the rook stands within two steps of the black king with no white king beside it — the position from which the black king can attack it next move — and nought otherwise. Guard is the distance from the white king to its rook. Between is nought when the rook’s file or rank lies strictly between the two kings, cutting one off from the other. Edge is how far the black king stands from its two nearest edges, and opposition is nought when the kings face each other two squares apart on a file or rank.

Each, alone, is worse than useless as a guarantee. The best single clause, walk, can be held from 98.5 per cent of the won positions; safe and edge can be held from every won position that does not offer a mate in one. A white who reads only whether the rook is in danger, or only how near the black king is to the edge, has nothing that drives the game forward at all.

A rule is an ordered list of distinct clauses read lexicographically: the first decides, the second breaks the first’s ties, and so on. Room, then box means: among the won-keeping moves, keep those that leave the black king fewest squares; among those, keep the ones with the smallest box; play any of what remains. That is how a player actually uses advice — the first principle settles most moves and the later ones only settle what it leaves open — and it is exactly how the two combined rules of the earlier essay were built.

The held set of a rule is computed exactly. Start with every won position in which white has no mate in one. Remove a position if every one of the rule’s best moves from it leads to a position from which every black reply lands outside the set. Repeat until nothing changes. What survives is the set of positions from which black, choosing its replies, and white’s ties going against white, can keep the game going round a loop for ever — the kind of position loopy games are about, where a line that never ends is a legitimate outcome. A rule with an empty held set mates from every won position however its ties are broken. The distance table has an empty held set; the question is how close a rule of clauses can get.

Every rule of up to four clauses

With nine clauses there are 9 rules of one clause, 72 ordered pairs, 504 ordered triples and 3,024 ordered quadruples — 3,609 rules, few enough to score every one.

Every rule of up to four clauses. All 3,609 ordered rules of one to four clauses for king and rook against king, with the best, median and worst share of won positions they can be held in. The best four-clause rule is held from 83.6%; the median of every length from more than 98%.
Fig. 2 All 3,609 ordered rules of one to four clauses. The best four-clause rule — room, kings, walk, box — can be held from 83.6 per cent of won positions; the median rule of every length from more than 98 per cent, as a single clause is.

The best rule improves with each clause, but slowly: 98.5 per cent for one clause, 97.3 for two, 94.1 for three, 83.6 for four. And the best is an outlier. The median rule of every length is held from between 98.5 and 98.8 per cent, no better than a single clause, and the worst from 99.1 per cent. Adding a clause to a rule usually changes almost nothing, because the first clause settles most moves outright and the later clauses are consulted only where it ties.

The best orderings have a recognisable shape. All three of the best rules of length two, three and four start with room — take squares from the black king first — and all end with box. The best four is room, kings, walk, box: squeeze the king’s room, bring the white king closer by both measures, and only then shrink the rectangle. It is not far from what a teacher would say, and it still leaves black a way out from five positions in every six.

That is the first answer to the question as posed, and it is no. No rule of up to four of these clauses, in any order, comes near emptying the held set. A rule a player can say in a breath is held from most of the board.

Past four clauses, the search runs out of choices

Beyond four clauses the orderings are too many to score one by one — there are 362,880 orderings of all nine — so the rules past four were found by a search that keeps the twelve best rules of each length and tries every extension of them by one more clause. That is not exhaustive, and better rules of five to nine clauses may exist. What the search finds is still informative, because of what it finds at six.

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.
Fig. 3 The best rule of each length and the share of won positions from which black can hold it for ever. To four clauses the rule is the best of every ordering; past four, the best found by the search. After six clauses the share stops at 69.3 per cent, and the distance table, for comparison, is held nowhere.

The held share falls to 75.4 per cent at five clauses — room, walk, safe, kings, box — and to 69.3 per cent at six, when guard is added. Then it stops. Seven clauses, eight and all nine leave exactly the same 121,396 positions held. Between, edge and opposition change nothing at all when they come last.

The reason is not that those three clauses are worthless. It is that by six clauses there is almost nothing left for them to decide.

Ties left by the best rule of each length. For the best rule of one to nine clauses in king and rook against king, the number of positions where two or more moves still score alike, and the share of won positions the rule can be held in. Ties fall from tens of thousands to under seven hundred by six clauses, and the held share stops moving there.
Fig. 4 For the best rule of each length, how many won positions still leave white two or more moves that score alike on every clause. Ties fall from tens of thousands to 664 by six clauses and 624 after nine, and the held share stops moving where the ties run out.

A tie is a won position where two or more of white’s moves score the same on every clause the rule reads. The best single clause leaves ties in 25,192 of the 173,656 positions without a mate in one; the best six-clause rule leaves them in 664. A seventh clause can only act where there is a tie to break, so once the ties are gone, nothing that comes after them can matter. The last three clauses are the ones a reader would expect to be needed at the very end — the opposition, the edge, the rook between the kings — and the rule never gets to consult them.

So what remains held is held against a rule that has made up its mind. At six clauses, white’s choice is almost always a single move, and the 69.3 per cent is not a matter of ties breaking badly. It is the set of positions from which black, against a fully determined white, can keep the game going for ever. A clause that would get that set down cannot be one more tie-break. It would have to override a clause earlier in the list.

A loop through a mate in two

The search can also report where a rule is held, and the shortest loop for the best nine-clause rule is two moves long.

A nine-clause rule held in a cycle through a mate in two. Two chessboards of king and rook against king, rook f7. In one the position is mate in 2; the nine-clause rule moves the white king away, black steps back, the position is mate in 13, and the rule returns the king. The cycle never ends.
Fig. 5 The best nine-clause rule held in a two-move cycle. With the white king on c2, the black king on e1 and the rook on f7, white mates in two with the king to d3; the rule prefers the king to c1, since both leave the black king one square and c1 is the shorter walk to it. Black steps to e2, the position is mate in 13, the rule brings the king back to c2, and black returns to e1.

The position on the right is mate in two. White plays the king to d3; the black king, on e1 with the rook covering the f-file, has only d1 to go to; and the rook mates on f1. The rule never plays it. Its first clause is room, and the king to d3 leaves the black king one square — but so does the king to c1, and so do five rook moves along the f-file. Room ties seven moves. The second clause is walk: from c1 to e1 is two, from d3 is three. The rule plays the king to c1.

Black then steps to e2, and the position on the left is thirteen moves from mate. The rule brings the king back to c2, black returns to e1, and the mate in two is on the board again. It will be on the board for ever, every second move, and the rule will walk away from it every time.

There is nothing exotic here. A player would see the mate, and so would a rule with mate in two as its first clause. That is the point: the repair is not a better ordering of the nine, it is a tenth clause that looks ahead, and every such clause added at the top of the list puts the rule a step nearer to being the table. Looking one reply ahead made the best two-clause rule worse; looking two ahead from the right positions would help here, and help is what the distance table already gives in full.

The clauses buy the last few moves

Where does the reduction from 98 to 69 per cent come from? Sort the won positions by their distance to mate, and the answer is unambiguous.

Where the nine-clause rule can be held, by distance to mate. For the best nine-clause rule in king and rook against king, the share of won positions at each distance to mate from which black can hold it for ever: 13.5% at two moves, rising to every position at sixteen.
Fig. 6 For the best nine-clause rule, the share of won positions at each distance to mate from which black can hold it for ever. A mate in one is always taken. Of positions two moves from mate, 13.5 per cent are held; the share rises with depth, and every position thirteen or more moves from mate is held.

Near mate the clauses do real work. Of the 4,676 positions two moves from mate, only 632 — 13.5 per cent — can be held; at three moves 20 per cent, at four 37 per cent. The clauses describe what a mating net looks like, and close to the net they recognise it. Then the held share climbs, through a half at eight moves and three quarters at eleven, to every single position thirteen, fourteen, fifteen and sixteen moves from mate. All 40,120 of them are held.

That is a sharper result than the 69.3 per cent suggests. The positions where a rule of thumb is wanted are the deep ones — the start of the ending, where the black king is in the middle of the board and the white pieces are scattered. Those are exactly the positions where nine clauses give white no guarantee whatever. The clauses compress the end of the mate and leave its beginning untouched.

And this is what the paper was about how long would predict if the length of a mate were incompressible information. The last few moves of a mate are a pattern; the first ten are a route, and a route is not a property of the squares the pieces stand on.

Fewer positions held, fewer games won

The held set is the worst case — black resisting and white’s ties chosen against it. The earlier essay also played the rules out: 400 games from positions at least ten moves from mate, white’s ties at random, black resisting by the table. There the two-clause rule kings, then box was the best of five, mating 241 games.

Held positions and games mated. Four rules for king and rook against king: kings then box, and the best rules of four, six and nine clauses, with the share of positions each can be held in and how many of 400 games it mates. The nine-clause rule is held from 69.3% and mates 205; kings-then-box is held from 98.5% and mates 241.
Fig. 7 Four rules in 400 play-outs from positions ten or more moves from mate. Kings then box, held from 98.5 per cent of won positions, mates 241 games. The best rules of four, six and nine clauses are held from far fewer positions and mate 173, 205 and 205.

The best rules found here do worse. The best four-clause rule mates 173 games, and the best six and nine mate 205 each, with a median of fifteen moves for the games they win. The rule held from the fewest positions mates fewer games than the one held from nearly all of them.

That is not a contradiction once the two measures are read for what they are. The held share counts positions, most of them near mate, where black has an escape against the rule’s worst tie-breaking. The play-out counts games from deep positions under random tie-breaking. A rule with many ties gets many chances, in a play-out, to stumble out of a loop by accident; kings-then-box leaves 127,584 positions with a tie, and random choice among them is a kind of search. The nine-clause rule has removed nearly all its ties, so it has removed its luck, and where it is held — which, from deep positions, is everywhere — it stays held.

So determinism is a cost here as well as a virtue. A rule of thumb that has been sharpened until it always names one move is a rule that will name the same wrong move every time it comes back to the same position, and in an ending whose won positions are almost all loopable, it comes back.

A clause list is a termination proof that does not close

The floor from the earlier essay explains the shape of the whole result. A progress measure for the rook ending needs sixteen classes. A lexicographic rule of nine clauses has far more than sixteen distinct score lists — the box alone takes 28 values — so there is no shortage of values. What it lacks is the property that matters: that from every won position some move makes the score fall. The clauses rank positions by features a player can see, and a ranking by features is a different thing from a ranking by distance, however fine it is.

That is the same distinction which games end at which level draws between a game that ends and a proof that it does. Every won position in this ending ends in mate with correct play, in at most sixteen moves. A proof of that, in the form of a number that falls, has to be the distance or something that computes it. It ends, and nothing says when shows a game where the proof needs ordinals; here it needs only small integers, and still nothing simpler than the table supplies them.

A win is not a way of winning showed that knowing which positions are won does not give a way to win. The clauses are an attempt at a middle road, a little knowledge of the board in place of all of it, and in the rook ending, on this evidence, the middle road leads round in circles from every position more than twelve moves out.

The ending is solved by backward labelling with no fifty-move rule and no repetition rule: white forces mate or does not, and a black capture of the rook ends white’s hopes. A rule is applied to the position black faces after white’s move; white keeps the win, takes a mate in one whenever there is one, and otherwise plays a move whose clause list is least in lexicographic order. The held set is the greatest set of positions without a mate in one from which some best move has some black reply staying in the set; it is computed by removing positions that have lost every such move until none is left to remove, which is exact. Percentages are of all 175,168 won positions with white to move.

Every ordered rule of one to four distinct clauses was scored. Rules of five to nine clauses were found by keeping the twelve best of each length and scoring every one-clause extension of them, so the figures past four are the best found, not the best there is. The two rules from the earlier essay, the box alone and kings then box, give the same held counts and the same 241 games here as there, which is a check that the two computations agree.

The play-outs start from 400 positions drawn with a fixed seed from those at least ten moves from mate; black plays the reply with the longest resistance by the table, white’s ties are broken at random, and a game not mated in 2,000 moves counts as not mated.

What nine clauses cannot show

That no short rule works. The nine clauses are a choice. A clause no one here thought of — a measure of the rook’s distance from the black king’s file, a count of the squares the black king can reach in two moves — might do what these cannot, and the result is a statement about these nine and their orderings, not about every sentence a player could be taught.

That lexicographic order is how a rule must be read. A weighted sum of the same clauses is a different kind of rule, and the weights were not the argument found, for Hex, that tuning weights and finding the right structure are different problems. Weighted rules were not tried here.

Anything about a person using these rules. A player who has been told to take squares from the king does not apply it as a clause list; they also see the mate in two. The held set measures a rule read literally, which is the only way a rule can be scored.

And whether the textbook procedures are progress measures. The usual method for this ending is a few sentences with conditions in them — when the rook is safe, when the kings stand in opposition — and none was encoded as such. Some of its sentences are among the nine clauses; its conditions are not.

Still open: what a rule must remember

Every rule here reads only the position in front of it. The cycle through the mate in two works because the rule cannot tell the second visit from the first — a white who remembered having stood on c2 a move ago would try something else. A rule allowed one bit of memory, or allowed to compare the position with the one two moves earlier and refuse to repeat it, is no longer a function of the squares, and it falls outside the floor’s argument, which was about numbers on positions. The measurement is to give the best clause rule a no-repeat condition — never return to a position already visited in this game — and recompute both the play-outs and the positions from which black can still avoid mate for ever. If the held set empties, progress in the rook ending is cheap to state as long as it can remember where it has been; and a repetition rule, which chess already has for its own reasons — the fifty-move rule was shown to take wins away — would turn out to be doing the work a progress measure does.

Part 7 of 9

One argument about Chess. The parts either side of it:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

What this makes readable

Essays that declare this one a prerequisite.

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.

ChessDistance to mateEndgameExhaustive searchHeuristicLoopyPosition graphTermination