I've seen a question similar to the one I'm about to ask, but it does not quite address what I want to know, so here goes.
I want to create an organism in which sentient individuals are actually swarms of eusocial creatures. I already know several things about this organism, but there are three important and interconnected details that I'm trying to nail down.
Things I know
- Importantly, the reason the previous question does not answer what I want to know is that an individual swarm is NOT physically contiguous: the units of the swarm do stay near each other, but they cannot communicate chemically because they are all flying about in an amorphous swarm in the air (the total biomass of the swarm is about human, but I'm split on whether I want swarms of ~100 units that add up to that size or if I want a swarm of ~a million units where those units are roughly bee sized, though I'm leaning towards the latter).
- The legal individual is defined as a swarm, and for good reason: a swarm can think on par with a human being (with similar variability in intelligence), while a unit of a swarm cannot do so any more than one of our cells or organs.
- In my ideal setup, there's no single "brain" organism for a swarm. I'm willing to bend on this if I need to, but I would like the intelligence of the swarm to be highly delocalized and an emergent property of the dumb units communicating which makes a sentient individual capable of abstraction, problem solving behavior, and critical thought emerge.
- Swarms can collaborate with each other on the same scale as humans can do so with each other; i.e. there isn't an automatic fight if two swarms are in the same place (like I think I remember happens for some other eusocial organisms if they're encroaching on territory). Swarms can form friendships and collaborations as well as enmity and scorn in the same way humans do, and are intelligent enough to have formed spacefaring.
- Unit reproduction occurs when drones and queens from a single swarm mate. This is equivalent to human development and healing: if a swarm is selfing, it's either growing up or restoring itself after sustaining injury. There are special units in a swarm which either incubate more eggs or actually carry "pregnancies" to term, depending on what I decide. Either way, restoration is pretty fast, maybe on the order of hours or days. Units are small enough that I expect most or all of them are going to be replaced regularly. Losing a single unit should be about as significant as something between human cells undergoing apoptosis and a human being getting a paper cut.
- Units of a swarm are almost certainly genetically distinct, and are unconsciously assigned castes upon creation in the same way our cells differentiate as different types of cells are needed. However, in the event of scarcity of an individual caste inside of a swarm, units can signal each other to take on different roles. In other words, every unit has the genetic material to assume any role, but one is picked epigenetically and can change.
- Swarm reproduction requires two different swarms to swap genetic material between their queens and drones and together produce a "superegg", which may or may not actually be a single physically contiguous object. This superegg "hatches" after some time (it can be a while, probably on par with a human pregnancy) to produce a small swarm of roughly 20000-40000 units, which is a newborn. This newborn develops intelligence precisely on par with human time scale, and is considered an adult after roughly six hundred million seconds (or about two decades: in this world, units are all expressed in SI units for complicated worldbuilding reasons I won't go into. The swarms probably have their own customary units, but I haven't bothered figuring that out). Swarms have a concept of marriage and co-parent.
- Swarms age and eventually die in a way analogous to humans: their self renewal ability gradually dims over time until they become vulnerable to disease.
- Interswarm communication happens through language: native swarm languages revolve around using many bodies to form complex sounds and/or signs. Since they became spacefaring, swarms have adopted the standard interspecies languages (there's a specific spoken and a specific sign language adopted as intergalactic standard) by simply using their bodies to approximate hands or make unified sounds, since the other sentient species don't have millions of bodies to produce the phonemes that swarm languages consider standard.
- The strongest limit on what swarms can do is that they are not only biological, they are biological in the same way as we are. This universe operates on panspermia, so while different sentient species evolved on different planets with different evolutionary pressures, swarms still use DNA and RNA and protein, and all life in the universe has a single common ancestor. Furthermore, the evolutionary ancestor of all sentient life, including the swarms, was a eukaryote, so the cells of units have histones, nuclei, and mitochondria evolved in the same way eukaryotes on earth. This universe DOES have magic, but it cannot be essential to the way swarms work, since interacting with magic requires a sentient intellect, so the swarms would need to evolve biological sentience as a prerequisite and so cannot rely on magic in any way before evolving critical thinking.
What I'm trying to figure out
How do the units of an individual swarm communicate with themselves? This needs to resolve how the swarm can maintain itself unconsciously, critically think using its units, and maintain memory even as individual units are replaced and replaced frequently.
How do swarm units BETWEEN individuals not confound signals between swarm units OF individuals? If Swarm Alice's units bumps into the space of Swarm Bob's units, how do Swarm Alice's units' communications with each other avoid interfering with Swarm Bob's units' communications with each other?
Ideally, this communication would NOT be electromagnetic in nature or at least would have some way of protecting itself from interference: I want swarms to be able to use NMR machines and/or powerful magnetic fields without scrambling themselves to death.
EDIT: I'm pretty certain that, whatever solution I go with, their units all use some kind of signal which is in some sense encrypted. Not in a way they would consciously recognize (it's something they would have to do science on to realize it exists), but Swarm Alice's units use a different encryption key than Swarm Bob's. It would be complex enough to be more unique than fingerprints and probably the major reason that supereggs are physically contiguous as units for an incipient swarm converge on a signal. Nobody would have conscious awareness of the key their units use to encrypt communication: it would have be tested, and is probably the equivalent of taking fingerprints in the culture. Knowing someone else's key is personal information, of course, but it's hard to do something super nefarious with it: you can use it to send general biological signals if you know how to take the key and turn it into biology (e.g. tell drones and queens to make more units), but it's very hard to effect a change in a swarm's thinking with that key, because the signals used in thinking are unique, and emerge from an individual's personal experience. A single signal's purpose can be understood, a small signal cluster's purpose can be vaguely grasped, but the whole is beyond. Nonetheless, it works. Each unit can only understand signals with this key and filtration happens automatically. This solves problem 2 very neatly, suggests general ideas for getting around problem 1, and prevents problems from whatever type of signal used between units happening to be native in the environment or spread ambiently around by other swarms interfering with swarms in ways biological creatures would logically evolve to avoid.