Advertisement
Data Processing

The Colour Twin: Fifteen Pool Balls Wear Eight Colours, So "Yellow" Names Two Balls and Only Black Stands Alone (SmartDataAI)

Fifteen balls, eight colours, one ball identifiable by colour alone. A standard pool set numbers its balls 1 to 15 but colours them in a pattern that...

Fifteen balls, eight colours, one ball identifiable by colour alone. A standard pool set numbers its balls 1 to 15 but colours them in a pattern that repeats: balls 1 to 7 are solid yellow, blue, red, purple, orange, green and maroon; ball 8 is solid black; balls 9 to 15 wear the same seven colours again as stripes. Every colour except black therefore names two different balls, and a catalogue keyed by colour has a twin problem built into the product itself. This batch's harness registered all fifteen balls with their colours and patterns and read five spellings of each back: 750 rows, of which 310 resolved exactly, 380 merged and 60 were refused — the highest merge count of any group in this batch, produced not by bad data but by a correct colour recorded without its pattern (Source: SD measurement group AN205, this batch's harness register, evidence/sd-results-batch62.json). This piece is the migration plan for switching a product feed from colour-keyed to colour-and-pattern-keyed records: the audit, the mapping, the cutover and the verification.

What The Colour Twin means

The Colour Twin is a register in which one attribute value names two distinct objects that differ only in a second attribute, so the first attribute — recorded alone, accurately — cannot identify its object even inside its own system. The nearest prior concept in this series is The Parallel Names (AN115), two complete registries for the same objects "whose entries correspond one-to-one" — a battery is AA in one registry and LR6 in another, and the failure there was crossing between registries without a lookup table. The pool register fails without any crossing at all. There is one registry, one naming authority, one product — and inside it, "yellow" is the correct, complete, insufficient name of two balls. Parallel names need a table between systems. A colour twin needs a second field within the system, and a catalogue that lacks the field does not have a translation problem; it has a missing column.

The Colour Twin: Fifteen Pool Balls Wear Eight Colours, So

The register: what the five spellings scored

Ground truth for each ball is the pair (colour, pattern). The ball number resolved 150 of 150 rows exactly — the number is the register's true key. Colour and pattern together ("yellow stripe") also resolved 150 of 150: the pair is a complete natural key, which is what the migration will store. Colour alone resolved 10 of 150 — the black ball's ten rows — and merged 140: every colour spelling returned its solid and its stripe together. Pattern alone merged all 150 rows, solids into a set of eight and stripes into a set of seven; it is a category, not a name. The fifth spelling crossed games: the snooker value of the ball's colour — red is worth 1 in snooker, yellow 2, green 3, blue 5, black 7 — read back as a pool ball number. It resolved exactly zero rows. Ninety rows merged onto the wrong ball (yellow's value, 2, lands on the blue ball; black's value, 7, lands on the maroon), and sixty were refused outright: purple, orange and maroon do not exist in snooker, whose palette runs red, yellow, green, brown, blue, pink, black — brown and pink, in turn, have no pool ball. Two games share a table, a cue and five colour names, and their numbering of those colours agrees on none of them.

Migration stage one: audit the colour-keyed records

Count the exposure before touching the schema. In a colour-keyed feed, every record except black's is a twin record: fourteen of the fifteen products, 93 percent of the catalogue, are identified by a value that names two objects. The audit question is which records carry a disambiguator somewhere else — a photograph, a title suffix, a weight or price difference — and which carry none. In this register the twins differ in nothing the harness records except pattern: the 9-ball and the 1-ball are the same colour, the same size, the same price class. A feed that sells them as one "yellow ball" record is not misdescribing them; it is undercounting its own catalogue by seven products, the seven stripes folded silently into their solids.

Migration stage two: build the mapping from the pair, not the colour

The mapping table has fifteen rows, not eight: one per (colour, pattern) pair, each mapped to its ball number. The construction rule is the harness's own scoring — a mapping key is acceptable only if it resolves exactly, and the pair resolves 150 of 150 while the colour resolves 10 of 150. Legacy records that carry colour alone cannot be mapped by rule; they must be resolved against evidence outside the colour field (the photograph, the supplier code) or carried into the new schema flagged as unresolved twins, one legacy record pointing at two new ones. What the migration must not do is assign colour-only records to the solid by default: in this register that guess is right for the solids and wrong for every stripe, a coin flip dressed as a convention — seven of the fourteen twin records would be misfiled by it.

Migration stage three: cut over, then verify against the register

Cut the feed over to (colour, pattern) as the key, with ball number stored alongside as the register's own key. Verification replays the harness's five spellings against the migrated data: number and pair must resolve 100 percent; colour alone must now be a search facet, never a key, and any query path still joining on colour alone is a defect the verification exists to catch. The snooker spelling is the regression test for a subtler failure — a well-meaning enrichment that adds "game value" from the wrong game. If a future feed imports snooker values as ball identifiers, the verification's expected result is known in advance: zero exact, ninety merged, sixty refused, and the import should fail its gate on exactly those numbers.

Worked example: the yellow pair, end to end

A sports retailer's feed holds one record: "Pool ball — yellow". Its warehouse holds two products: the solid 1-ball and the striped 9-ball, stocked in a 3:2 ratio. Sales history under the merged record shows 500 units; the audit cannot say how many were which ball, and neither can the returns data, in which "wrong colour pattern" appears as a recurring complaint the merged record makes unmeasurable. The migration splits the record into "yellow solid" (ball 1) and "yellow stripe" (ball 9), maps future orders by the pair, and flags the historical 500 as an unresolved twin aggregate — reported as a range (the solids sold somewhere between 0 and 500, the stripes the remainder) rather than a fabricated split. Three months after cutover, the pair-level data shows the stripe outselling the solid two to one: a fact about the catalogue that the colour key had made permanently invisible, recovered not by new data but by a key that can hold the answer.

How the measurement was run

The register, spelling functions and parsers live in this batch's harness (evidence/sd-harness-batch62.py); every count above is its output (evidence/sd-results-batch62.json), with each item-by-form combination generated ten times. The snooker values used are the standard colour values of that game — red 1, yellow 2, green 3, brown 4, blue 5, pink 6, black 7 — of which brown and pink have no counterpart in the pool register. Re-running the harness must reproduce the results file byte for byte; the check runs at this batch's delivery gate.

FAQ

Why is black the only colour that resolves? Because it is the only colour worn by exactly one ball — the solid 8. Every other colour appears twice, once solid and once striped, so the colour spelling returns a pair and scores as merged.

Is the pattern the only difference between twins? In this register, yes: ground truth is the pair (colour, pattern), and twins share the colour and differ only in the pattern. That is what makes the missing field so easy to overlook — everything else about the records is identical.

Why does the snooker spelling merge instead of simply failing? Because snooker's colour values are numbers, and numbers parse. Yellow's value 2 is a valid pool ball number — the blue ball — so the spelling returns a confident, wrong, single answer. The sixty refusals are the honest failures; the ninety merges are the dangerous ones.

Could colour plus price identify the balls? Not in this register, which records no price difference between twins. A key must be built from attributes the register actually holds; here only the pair and the number qualify.

The conclusion, with its condition

A colour is a description, not a name — as long as a catalogue's objects come in twins, any key built on a single shared attribute will merge them, and the fix is never a better guess but a second field: keep the pair, or keep the number, and let colour go back to being what it is — a way to find the ball, not a way to be it.

Know someone who needs this? Share it.

Advertisement