Who knows whom, cheaply

Every relationship is one number in a capped per-person map, written at midnight from the day's company: an evening at the same table, a shift at the same bench, a pew, a basket at the door, a fist. None of it is ever sent over the wire.

A social graph over four hundred people is a hundred and sixty thousand potential edges. Storing that per-person and streaming it would dominate both the memory and the frame, for information almost nobody looks at.

The cheap version

  • One number per pair, not an object.
  • A capped map per person, so a villager remembers the people who matter and forgets the rest, which is also true of villagers.
  • Written once at midnight from the day's company, not on every interaction.
  • Never sent in frames. The sheet endpoint labels a person's ties when you open them, and only then.
  • Kin and spouses are not in it at all. Those come from the lineage, which is authoritative.

What the numbers buy

Strangers have no entry, and that absence is load-bearing. One evening in five a person calls on a friend's hearth instead of the inn, help goes to friends first, and courtship prefers people you already know. A person's sheet reads their circle back as words: spouse, kin, sweetheart, friend, colleague, acquaintance, bad blood, enemy.

It is also how a childhood scrap turns into a grudge two decades later without anyone modelling grudges.

The general point

Social memory is the part of an agent simulation that looks like it needs a database and does not. A capped integer map, written on a schedule and queried on demand, gets you nearly all of the behaviour for nearly none of the cost.

Read next

More on the village