Every ending with four men

A complete retrograde solution of every pawnless position with four men that this engine models: a king and two pieces from {Q, R, B, N} against a lone king, on boards from 3x3 to 8x8, fourteen classes in all. The headline is KBBK on the chessboard itself: 16515072 position-side pairs, solved to the fixpoint twice, once as one piece of work and once in eight segments, with the results required to agree. Below, a small ending you can play right now, then the full run, then every check running in front of you.

The instrument

This is KQK on the 3x3 board, solved in your browser by the slow reference implementation in a few milliseconds, before anything heavy starts. You are looking at the deepest position in the whole space. Play either side: click a piece of the side to move, then a highlighted square. Or let it play itself out.

 

 

The run

The full-size subject: class 7, KBBK, on the 8x8 board, with the invariant audit on. The engine walks the retrograde ladder level by level; a single solve is inherently sequential, so the workers below parallelise the independent runs (battery rows and the two decomposition arms), not the inside of one solve.

idle
Rounds done
0
Deepest mate distance reached
0 plies
Engine operation count (its own counter)
0
Elapsed
0.0 s
Workers in use
0

The checks

Battery: engine against reference, row by row

A battery of 11 rows, both implementations, identical fingerprints required on every row and distinct fingerprints across rows.

RowEngine fingerprintReference fingerprint
running...

The control

Press to break the reference on purpose: a second reference compiled with a genuinely wrong rule (every no-move position treated as mate, whether or not it is check). The battery is run against it and at least one row must go red. A check that has never failed is a claim about the code, not evidence about it.

not run

The full-size decomposition

Runs with the full run above: the same KBBK solve, monolithically and in eight segments, every semantic field required to agree.

Binary and build

hash pending...

Each solve emits a 640-byte record beginning with the magic 0x41573034. The reproducible-build check is offline in your browser: the browser has no C compiler. It runs in research/every-ending-with-four-men/verify-every-ending-with-four-men.mjs, which rebuilds engine.c and compares bytes when the pinned clang is available, and honestly prints SKIP otherwise. The same offline check also asserts that the identical-pair index packing is bijective: decode then re-encode is the identity, and no two indices decode to the same position.

This piece uses no floating point, so the committed transcendental library and its bit-for-bit guarantees do not arise here.

The rules this page models. The fifty-move rule is not applied. The dead-position rule is applied for KBK and KNK only. Castling placements are valued as if castling were unavailable, the standard tablebase convention, and en passant cannot arise with no pawns on the board. Every count and distance here is a distance under those rules, checked entirely on this page, and is not comparable to published tablebase numbers that score differently.
What none of this rules out. Two decompositions agreeing rules out boundary and segmentation errors and very little else: both arms run the same engine, so a shared misreading of the movement or mating rules would pass every check on this page. The independent reference covers the rules only on the small battery, and the audit covers only the invariants it was written to test.

The cost

Operations performed (counted by the engine, not estimated)
0
Wall time, all runs
0.0 s
Workers
0

Not measured yet. The measurement solves KBBK on the 5x5 board with both implementations and reports the ratio, with the slice fraction printed next to it, because it is an extrapolation.

Everything on this page is computed in front of you from engine.wasm, plan.js and reference.js; no figure is recalled from anywhere. The offline gate for this piece is research/every-ending-with-four-men/verify-every-ending-with-four-men.mjs.