Part 23 of 39

Not Just Counting

By Madhav Kaushish · Ages 10+

The pilgrimage to Brvjanka was behind him. The rule system was revised. The priority levels and exclusive groups were in place. But the storm that had triggered the cascade in Part 22 had also exposed a deeper problem — one that had nothing to do with rules and everything to do with what the records actually contained.

The Insurance Claim

After the storm scattered Location 2's herd, Glagalbagal filed a claim with the regional livestock insurance collective — a consortium of shepherds who pooled resources to cover catastrophic losses. The claim required Glagalbagal to list exactly what had been lost: how many sheep, how many cattle, how many dinosaurs, and the age category of each.

Glagalbagal went to his records. Location 2's monthly count from before the storm read: one hundred and thirty-seven.

One hundred and thirty-seven what?

The pebble arrangement said one hundred and thirty-seven. It did not say one hundred and thirty-seven sheep, or eighty-two sheep and forty cattle and fifteen dinosaurs, or any other breakdown. The counting system Glagalbagal had built — the baskets, the binary encodings, the structured records — tracked quantities. It did not track categories. An animal was an animal was an animal. The pebble in the basket did not know whether it represented a sheep worth three trade-units or a breeding dinosaur worth sixty.

Blortz: You have been counting heads. The insurance collective wants to know what is attached to the heads.

Glagalbagal: I know what is at each location. Location 2 has mostly sheep, some cattle, a few—

Blortz: You know. Your records do not. And your records are what the insurance collective will examine.

The Coloured Pebble Attempt

Glagalbagal's first idea was simple: use different coloured pebbles for different animal types. White pebbles for sheep, brown for cattle, green for dinosaurs. A basket with three white pebbles and two brown pebbles would mean three sheep and two cattle.

He tried this for half a day before abandoning it. The binary system — the one that had eliminated counting errors in Part 15 — used baskets that contained either one pebble or no pebble. Introducing coloured pebbles would mean each basket could now be in one of four states (empty, white, brown, or green) instead of two. The entire system's reliability depended on the simplicity of two states. Adding colours would reintroduce exactly the kind of ambiguity that binary had been designed to eliminate.

Blortz: A velociraptor cannot reliably distinguish brown from dark green in poor cave lighting. We have been over this.

The Code

The solution came from an unexpected direction. Glagalbagal had already used pebble arrangements to represent quantities — the number forty-six was a specific pattern of pebbles in baskets. What if he used pebble arrangements to represent categories as well? Not by the colour of the pebble, but by the pattern.

He assigned a code to each animal type:

Pattern 001: Sheep. Pattern 010: Cattle. Pattern 011: Dinosaur (herbivore). Pattern 100: Dinosaur (carnivore).

Each code was a three-basket binary arrangement. A velociraptor reading the code did not need to distinguish colours or interpret anything subjective — it simply read the pattern of pebble/no-pebble across three baskets and consulted a lookup tablet that mapped each pattern to an animal type.

A complete record for a single group of animals now looked like this: a sequence of basket arrangements, each representing a different piece of information.

Positions 1-4: Location code (which location). Positions 5-8: Date code (which month). Positions 9-11: Animal type code (what kind). Positions 12-19: Count (how many). Positions 20-22: Health status code (healthy, sick, quarantined).

A stone shelf showing a record as a long row of baskets, with colored markers above groups of baskets indicating which section represents location, date, animal type, count, and health status

The same physical medium — pebbles in baskets — now represented fundamentally different kinds of information depending on where in the sequence it appeared. Positions 12-19 were a quantity. Positions 9-11 were a category. Both were binary patterns. The difference was entirely in how they were interpreted.

The Lookup Tablet

The codes were arbitrary. There was no inherent reason why 001 meant sheep rather than cattle. The assignment was a convention — a rule that everyone agreed to follow. Glagalbagal carved the convention on a lookup tablet mounted at the recording station:

Animal Type Codes: 001 = Sheep 010 = Cattle 011 = Herbivore dinosaur 100 = Carnivore dinosaur 101 = Goat 110 = Fowl

He left 000 and 111 unassigned, noting that they might be useful later. Blortz suggested reserving 000 for "unknown" — a category for animals that had not yet been classified, which happened more often than Glagalbagal liked to admit, particularly with the juvenile dinosaurs whose species was unclear until they grew larger.

Blortz: Every coding scheme needs a value for "I do not know." Otherwise the velociraptor recording the data must choose a category even when the category is genuinely uncertain. And a wrong category is worse than an admitted gap.

Glagalbagal agreed. Pattern 000 became "unclassified."

The Insurance Claim, Revisited

With the new encoding system, Glagalbagal reconstructed Location 2's records. The pre-storm count broke down as: eighty-two sheep (001), thirty-nine cattle (010), twelve herbivore dinosaurs (011), and four carnivore dinosaurs (100). Total: one hundred and thirty-seven. The sum matched the old count, but now each entry carried its type.

The insurance claim was filed with full detail. The collective paid out based on the type-specific values — sheep at three trade-units each, cattle at eight, herbivore dinosaurs at twenty-five, carnivore dinosaurs at sixty. The total compensation was dramatically higher than what a flat "one hundred and thirty-seven animals" claim would have yielded, since the collective's default valuation for untyped animals was the lowest category.

Glagalbagal: We have been leaving value on the table for years.

Blortz: We have been leaving information on the table for years. The value follows from the information.

The Expanding Codes

Over the following months, Glagalbagal added codes for other properties. Age category: 00 for juvenile, 01 for adult, 10 for elderly. Sex: 0 for female, 1 for male. Breeding status: 00 for not breeding, 01 for breeding, 10 for pregnant, 11 for nursing.

Each record grew longer. What had been a simple count — eight baskets representing a number — was now a sequence of thirty or more baskets representing a structured description of a group of animals: where they were, when the record was made, what they were, how many, how old, what sex, what breeding status, and whether they were healthy.

The records were more informative. They were also more complex. A velociraptor reading a record needed to know not just how to read binary, but which positions meant what. Position 9 was the first basket of the animal type code. Position 20 was the first basket of the health status code. Confusing the two would mean reading a health status as an animal type, or vice versa.

This confusion, as it turned out, was not hypothetical.