Part 22 of 39

The Conflicting Rules

By Madhav Kaushish · Ages 10+

Glagalbagal left for the Temple of Brvjanka on a Tuesday — Grjepdag again, which was becoming a pattern — with seventy-four rule tablets neatly organized on a dedicated shelf, a stack of truth tables for verification, and Tablet Zero as the fallback. Blortz remained behind to handle the bookkeeping. The velociraptors had their instructions.

The pilgrimage took eight weeks. During the first six, everything ran smoothly. The rule tablets fired correctly. Feed was ordered when reserves dropped. A predator sighting at Location 3 triggered the relocation protocol without incident. Two pterodactyls arrived at the Temple bearing routine reports. Glagalbagal, for the first time in his professional life, relaxed — though "relaxed" may be too strong a word for someone sleeping on the stone floor of a desert temple while subsisting on fermented yak milk.

Then week seven happened.

The Cascade

The trouble started with a storm. A severe one — three days of continuous rain that flooded the river near Location 2, destroyed the feed storage shed, and scattered the herd across the surrounding hills. The velociraptors at Location 2 assessed the situation and began checking rule tablets.

Tablet 1 (count drop): The herd count had dropped from one hundred and thirty-seven to ninety-one — a decrease of forty-six. The condition "ten or more fewer" was met. It was not lambing season. Action: send a pterodactyl to Glagalbagal.

Tablet 2 (feed reserve): The feed storage was destroyed. Reserve was effectively zero, well below twenty units. Action: order additional feed from the Thjervak supplier.

Tablet 14 (property damage): The feed shed was destroyed. This was a loss of critical supplies. No other rule specifically addressed it — but the count drop and feed rules both applied independently. (Tablet Zero would have applied if the others had not.)

Tablet 8 (emergency relocation): If animal losses at any location exceed thirty in a single month, relocate the remaining herd to the nearest location with spare grazing capacity. The loss of forty-six exceeded thirty. Action: move the remaining ninety-one animals to Location 1.

Each rule, evaluated independently, was correct. Each action, considered in isolation, was reasonable. But the velociraptors executed all of them simultaneously.

The Mess

The feed order went to the Thjervak supplier, who delivered thirty units of feed to Location 2 — which was now empty because the herd had been relocated to Location 1. The feed sat in the open air (the storage shed was destroyed) and rotted within a week.

The relocation to Location 1 overwhelmed that location's grazing capacity. Location 1 already had one hundred and twelve animals. Adding ninety-one brought the total to two hundred and three, far beyond what the land could sustain. The Location 1 velociraptors, now facing an overpopulation problem, checked their own rule tablets. Tablet 9 (overpopulation): If the count at any location exceeds one hundred and eighty, sell surplus animals at the regional market. They sold twenty-three animals at whatever price they could get — roughly half the market value, since they were dumping stock in a hurry.

Meanwhile, the carrier pterodactyl dispatched under Tablet 1 reached the Temple of Brvjanka and delivered its message: "Location 2 count dropped by forty-six." Glagalbagal, alarmed, sent back instructions: "Do NOT sell any animals. I will handle it when I return." His pterodactyl arrived at Location 2, which was empty. It found no one to deliver the message to. The pterodactyl, following its own protocols, flew to Location 1, where it arrived two days after the velociraptors had already sold the twenty-three animals.

A chaotic scene: feed rotting in an empty field at one location, an overcrowded herd at another location, a pterodactyl carrying a message arriving too late, and velociraptors calmly checking rule tablets amid the chaos

Glagalbagal returned from pilgrimage to find: forty-six animals scattered by the storm (some later recovered), twenty-three animals sold at a loss, thirty units of feed wasted, Location 2 empty, Location 1 overburdened, and a pterodactyl sitting on a rock at Location 1, still holding his undelivered countermand.

Glagalbagal: Every rule worked correctly.

Blortz: Every rule worked correctly. Together, they were a disaster.

The Diagnosis

The problem was not that the individual rules were wrong. Each rule, tested in isolation against its truth table, produced the correct action. The problem was that the rules had been designed independently but executed in a world where they interacted.

Tablet 8 (relocate if losses exceed thirty) did not know about Tablet 2 (order feed). So it relocated the herd, making the feed delivery useless.

Tablet 9 (sell if count exceeds one hundred and eighty) did not know that the overcrowding was temporary, caused by Tablet 8's relocation. It treated the high count as a permanent problem and sold animals.

Tablet 1 (send pterodactyl) did not know that the message would arrive too late to prevent the other actions from firing.

Each tablet was a self-contained rule that checked its own conditions and took its own action. No tablet was aware of what other tablets had decided. The system had no mechanism for rules to coordinate.

The Priority System

Glagalbagal's first fix was to assign a priority to each rule tablet. Some actions were more consequential than others. Selling animals was harder to reverse than ordering feed. Relocating a herd was harder to reverse than sending a message.

He carved a number on the corner of each tablet:

Priority 1 (highest): Rules that send messages. Low cost, easily reversed. Priority 2: Rules that order supplies. Moderate cost. Priority 3: Rules that move animals. High cost, operationally disruptive. Priority 4 (lowest): Rules that sell or acquire animals. Permanent, expensive.

The new procedure was: when the monthly evaluation triggers multiple rules, execute them in priority order — messages first, supply orders second, relocations third, sales last. Critically, after each priority level, re-evaluate all remaining rules. The conditions might have changed.

In the storm scenario, this would have meant: first, send the pterodactyl (Priority 1). Then, order feed (Priority 2). Then, before relocating (Priority 3), re-evaluate — is the count still below the threshold? If forty-six animals are scattered but potentially recoverable, the relocation might not be necessary. And the sale (Priority 4) would only be evaluated after all higher-priority actions had been executed and conditions re-checked.

The Mutex

But priority alone did not solve the deeper problem. Even with ordered execution, two rules at the same priority level could still conflict. Blortz identified a specific case: Tablet 3 ("move herd to backup area if predator sighted") and Tablet 8 ("relocate herd to nearest location if losses exceed thirty") both involved moving the herd, but to different destinations. If a predator caused the losses, both rules would fire, and the velociraptors would attempt to move the herd in two directions simultaneously.

Glagalbagal introduced what he called exclusive groups. Rules that affected the same resource — in this case, the herd's location — were grouped together. Within an exclusive group, only one rule could fire. If multiple rules in the same group evaluated to black, the one with the higher priority won. The others were suppressed.

Blortz: You are building a system to prevent your rules from fighting each other.

Glagalbagal: I am building a system to ensure that correct rules, applied to the same situation, produce a coherent outcome rather than chaos.

Blortz: That is a more diplomatic way of saying the same thing.

The Lesson

The revised system worked. Glagalbagal tested it against the storm scenario: the pterodactyl would be sent, feed would be ordered, and then — at the relocation step — the system would check whether the herd needed to be moved or whether the scattered animals could be recovered. The sale would only happen after all other options were exhausted and conditions re-evaluated.

It was not perfect. The re-evaluation step added time. The exclusive groups required Glagalbagal to anticipate which rules might conflict — and he could not anticipate everything. But the system was far better than the alternative, which was seventy-four independent rules operating as if they were alone in the world.

The general principle, Glagalbagal noted on a tablet he mounted above the rule shelf, was this: A rule that is correct in isolation may be harmful in combination. The system's behavior is not the sum of its rules but the interaction of its rules.

He would carry this principle forward. It would matter again when the rules became more complex, when the actions involved communication between locations, and when the decisions had consequences that could not be reversed by a sheepish pterodactyl arriving two days late.