# How do Nanites receive, store, and execute instructions?

## How do we develop & send instructions to nanites and how do they receive, store, and execute those instructions?

Just like in biological organisms, some instructions need to be included for how nanites should reproduce including how many should be reproduced and then conditional instructions need to be provided based upon where in the nanite construction area any particular nanite is located.

Nanites need to be able to signal something (other nanites, the control cpu, etc.) information based upon their location, environmental conditions, how many nanites are in the vacinity, what sort of resources are available, what they still need etc.

Biological microorganism don't really operate based upon cooperative goals, so I imagine there should be some differences on how they get, store, and execute those instructions. Perhaps looking at the mechanisms used by cells to cooperate in building multi-cellular organisms would be closer to what we need.

I was thinking about this weeks ago and the idea that kept coming to me was that from a macroscopic view, the nanite army would like look a bacterial or other microbial attack. It'd need the same things (energy, resources, waste removal, instructions, etc.). They'd probably need some sort of nanite - nanite signalling and unless we made different batches of nanites for different jobs, then we'd need a way to send instructions to them to coordinate their behavior.

This is next in my series of questions about how nanites might work.

### Background

There have been two prior questions already asked that flesh in the background for this question:

1. How do nanites get the resources that they need to do their work?
2. How do you power all the nanobots? (thank you Daniel M. for asking the initial question).

My summary of the answers so far: Although certain exotic possibilities are possible, in many ways nanites will behave very like microscopic organisms do now. Energy could be provided by induction or beaming, however, a more viable short term possibility is simple chemical energy (aka food) that is oxidized.

Any "construction" material and/or waster products need to moved into and out of the nanite construction area just like the mechanisms used by living microorganisms (e.g. by circulation).

### From previous answers on how to get resources to nanite

• How much memory are you envisaging these nanites having? – Joe Bloggs Mar 21 '16 at 17:07
• I'm not really sure. I was thinking about this weeks ago and the idea that kept coming to me was that from a macroscopic view, the nanite army would like look a bacterial or other microbial attack. It'd need the same things (energy, resources, waste removal, instructions, etc.). They'd probably need some sort of nanite - nanite signalling and unless we made different batches of nanites for different jobs, then we'd need a way to send instructions to them and coordinate their behavior. – Jim2B Mar 21 '16 at 17:12
• how did i not see this question before? – Serban Tanasa Mar 25 '16 at 0:39
• Hey, I want to thank everyone who answered. I like all the answers and each one leads to some interesting thoughts. However, I have to pick just one answer for the bounty and one for the Accepted Answer. – Jim2B Mar 29 '16 at 13:36
• Because the points will mean more to him and for his runner up answer, I'm going to award the bounty to @Nolo . – Jim2B Mar 29 '16 at 13:36

Cells are limited to communicating in a lossy, low-bandwidth manner across chemical gradients and other enzymatic on-off pathways, but we can do better.

1. Micro Radio Frequency pulses from multiple control beacons placed around the perimeter while the stuff cooks allow each nanite to "know" its exact position via a very simple signal comparison, using triangulation algorithms similar to the Fourier-style calculations done in 2016 for MRI imaging. The nanites use miniaturized zero-power receivers, where the received pulse actually provides at the very least the power to run the receiver itself. Even if we were to assume absent a complex computer on board, the behavior of the nanites can be hardwired to respond in specific ways to specific types of pulse, position and time. The pulses can perhaps also be used to power the nanite, depending on the beacon power output levels the energy intensity of the task at hand and the desired speed of completion. Indeed, the output of beacons can be modulated to activate nanites in certain areas more strongly, making them work faster on more power.

2. As stated in the previous point, nanites can function without an onboard computer, if we're willing to transmit trillions of instructions every milisecond. Each nanite can have its own code, and instructions could be prefixed with that code. However, nanites would be far more efficient with computation on board, which is what we'll look at next. Nanite computation is done via mechanical computing, using molecular size mechanical computing units using rod logic, described quite well in the answer to this question. Moving molecular rods in a solid matrix to perform logical operations by the expedient of the rods having side groups opening or closing channels. It can be implemented from the macroscopic scale (with Lego as one example) to the atomic scale. If successfully miniaturized to the nano-scale, this would easily allow extremely complicated programs to be written, stored and implemented by the machine, as well as allowing it to react real time to the local conditions. The decision on whether to store a full blueprint on each nanite would depend on the specifics of the design.

3. Nanite-to-nanite communication. Ultra-low power signaling using extraordinarily weak electric or magnetic fields, with effective ranges no longer than a few hundred molecules, using millions of times less power than 2016-issue network adapters, would allow individual nanites to maintain constant situational awareness with regards to nearby available resources and active nearby nanites, as well as being able to signal when in need of repair or, in the case of a serious malfunction, deactivation. This enables 4:

4. Multi-nanite scaffolding. Some structures will be impossible to craft using individual nanites, they may be too long, too delicate or to intricate for the capabilities of a single nanite's manipulators. In that case, nanites can use digital communication via the same ultra-weak fields that enable their situational awareness to execute complex choreographed dances with atomic-level precision across macro-molecular distances.

• Since your answer is based on radio signals rather than exchange of molecules as messages, you might consider adding a link like this one showing how radio reception on nanoscales could work. – Hypnosifl Mar 29 '16 at 12:47

Well, the most difficult part of this is designing the nanites. Considering that we are getting very good at building very complex and sophisticated computer hardware and software systems, but we haven't built many very complicated nanites yet, why not rely on what we know and push that as far as we can take it?

First let's assume that our nanites are nothing more than simple state machines that can do nothing but take a single instruction at a time and respond to that instruction. This relieves us of the very hard work of engineering complicated nanites to do very much on their own (and it's safer for us that way). When they have a signal, they are doing something with it, when they don't have a signal they are stuck waiting for the next instruction - only complex enough to do as we wish, but no more than that.

What this means is that we have several problems to solve in the way of controlling billions of nanites simultaneously and effectively.

1. We need a broadcasting system that can multiplex billions of signals simultaneously

2. We need a molecular backbone design for a radio receiver that can be permuted into billions of arbitrary configurations - doesn't matter which configuration as long as each configuration is listening to one of the slices of the broadcast signal

3. The states that can be achieved by processing the received signal need to be planned, but it could be as few as a handful of states - such as moving forward, actuating to some other direction, opening or closing some other actuator, etc, but basically all ON/OFF kinds of signals

4. Maybe the only thing that should be automated is when we are not sending a signal the nanites should "take a break" and find food, tend to whatever nanites do, etc*.

5. Knowing whether an instruction was received and locating each nanite (together this can be referred to as "tracking") can be accomplished as simply as how RFID tags work**. Similar to our molecular antennae, we could incorporate a kind of RFID like molecule which resonates at a configurable frequency (perhaps the antennae and the RFID-like device could be one and the same). Then listen for the echo of the sent signal and if it is heard, it can be assumed that the instruction was received. The same echo can be used to triangulate the nanite's position. If no echo is heard, then that nanite can be considered "lost" until a signature for it is found again.

Finally, we will need to have sophisticated software to coordinate nanite activity and the responsibility of doing so will rest solely upon that software. We are getting to a point where massive parallel processing is becoming affordable so that will not be a big issue. With deep learning techniques it will be possible to simply experiment with swarms of nanites in the many thousands or even billions, try to accomplish tasks with them and have software learn effective patterns of activity for quickly and or thoroughly accomplishing given tasks. This way we will have a set of tools that we know apply broadly to certain task and a system of organizing at a micro-management level.

*If we simply run them until they have no more chemical reserves they will break and perhaps die. Maybe this is what we want, maybe not, but running them out seems expensive and wasteful, however, perhaps there are other states ("developmental"/"off-duty", etc.) to discuss that are outside of the scope of this answer.

**For a more robust tracking system capable of ascertaining operational status of the nanite, it may be possible to create such a resonator which can shape shift slightly in order to modulate within the carrier signal and have internal signalling connect from the state processes inside the nanite back to the specific configurations of the resonator so as to "reflect" back some information about the nantites internal state. This will of course add complexity to the system and may or may not be useful considering that we are already somehow producing such devices in the billions and they are quite disposable.

Now as indicated in the above proposed input mechanism, we have a system for receiving instructions and we do not need internal storage since all activity is managed by an external resource.

As for how to execute those instructions, it would not be much different (and intentionally so) from how a cell already receives signals and performs basic functions. For example, Euglena species have already developed a system that causes the organism to swim toward a light signal - that could be modified minimally and utilized to design the entire navigation system for our device. The only things that we would have to focus specifically on is what modification is necessary to bridge our radio signal to the Euglena's optical sensory apparatus and how to transfer the incoming signal to that bridge - so it's basically logistical and hooking up a few circuits, not really any radical design decisions need to be made. The hard part is tracking down and controlling the genetics and other factors that produce these structures.

Other actuators could be controlled with a similar apparatus.

Emergent behaviour is probably your best bet. In essence each nanite is extremely simple, designed to respond in only a few very specific ways to a few very specific stimuli (for example high O2 concentration plus high instance of cancer markers = go forwards). Each nanite is unbelievably dumb, however a set of nanites, each capable of leaving behind 'breadcrumbs' that other nanites can follow, can be very smart indeed. Controlling these nanites is a matter of cleverly creating the nanites in the first place (potentially using computer aided design to simulate the 'instruction set' encoded in the nanites and run backwards from the result wanted to the initial designs needed. Changing the programming becomes a matter of introducing new nanites, carrying a new 'instruction set' and a series of markers that cause earlier nanites to destroy themselves and reconfigure to the new instructions.

The issue with this process is that the results won't necessarily be immediately recognisable. As the nanite swarm grows and multiplies, becoming more capable, it might have to go through a variety of intermediate stages (much like Langton's ant in the chaotic period before it starts building highways). This could be categorised as Not Good if you're in a biological system. it could also be viewed as Good if you're in a biological system, as your nanites will display a remarkable resilience to unexpected circumstances even though they're dumb. Uncovered ants will drag their larvae back into the shade and close up the nest, restoring the integrity of their workings even when the catastrophic happens.

Obviously the more information your nanites can hold the more complex their individual behaviours can be, but the essence of controlling them will remain the same (sorry it's taken so long to get to the actual answer!)

The entire control mechanism is a huge game of Chinese whispers Nanites pass messages to nanites in the form of chemical, electrical and physical stimuli. The exact nature of the stimulus varies depending on location and purpose, but the aim remains the same: use nanites to control nanites, and controlling those nanites using their environment.

If you put a sugarcube near an ants nest eventually they'll wear a road in the sand.

• Interesting. If you considered a nanite swarm as responsible for some portion of the project, the swarm could include a special nanite with the ability to send/receive instructions with a CPU outside the swarm (say your laptop). Instructions received by this special "Queen" could be distributed ala emergent behavior. Then you could benefit from the properties of both swarm behavior and central planning. – Jim2B Mar 21 '16 at 17:39
• @Jim2B: Heck, have an entire hierarchical structure with a Queen external CPU, Lords that relay messages to sections, drones that relay messages down to individual sub-sections and workers that execute the commands. – Joe Bloggs Mar 21 '16 at 19:09

One thing which trends to get overlooked is that nanotechnology is engineered, and can overcome the limitations of biological systems.

K Eric Drexler, the father of modern nanotechnology, delivered a paper in 1989: MOLECULAR MANIPULATION and MOLECULAR COMPUTATION (http://www.halcyon.com/nanojbl/NanoConProc/nanocon2.html) which talks about "rod logic" nanocomputers, a topic which was also expanded upon in the book "Engines of Creation".

Without going into a huge data dump (interested readers can go to the link or read Drexler's book), he is discussion bacterium sized "mechanical computers", much like shrunken down Babbage machines, capable of operating with the sorts of speed and power we associate with supercomputers today.

The method of providing instructions seems a bit weird; essentially an atomic level analogue of a paper tape, where the computer "reads" instructions by measuring the passage of "bumps" in the tape made by larger molecules as the "ones" while the smooth spots would be the "zeros". The "tapes" would obviously be made at some sort of device in the programming facility, and then introduced to the suspended nano computers and machines (in my conception, they are in a tank of some sort of fluid which provides the ability to move in 3 dimensions, provides a sink for waste heat and a means of introducing "food" and raw materials for projects, and the elimination of waste products). "Tapes" are introduced into the liquid bath, and the computers "ingest" the tapes and read the instructions. Tapes should be made so they can only "feed" in one direction (perhaps a special "header" section), and of course there will be checksums built into the program and on the tape itself, so the computer can read the tape and determine if there was a break in the tape or some sort of programming or read error (resulting in a null field or nonsense answer where the checksum should be).

An alternative method is described in this paper: http://www.csc.villanova.edu/~tway/publications/wayCDES07.pdf, where acoustic waves are sent through the liquid and the nanomachines receive the instructions through a series of transducers built into the surface of the machine.

One simple way to me sure the "output" is to simply look inside the tank and see what the machines are actually doing. If your large programming computer had given then a design for a rocket motor and they are building a clock instead, then you will be very sure something has gone wrong.

Drexler himself is a bit unclear on how the rod logic computers communicate with us, although perhaps a simple method is they create data tapes of their own the get sucked out of the tank and read by progressively larger machines until we can read the output.

At any rate, because nanomachines are engineered structures, then they can be given engineering solutions for programming, read/write operations and so on.

• I don't think his question concerns how a single nanite's computer works. Rather, how do they signal each other in situ? To that end, this does not addresd the question at all. – JDługosz Mar 25 '16 at 6:13
• I'm actually interested in all aspects of the question. Such as how do we write a program on a conventional computer, get that information into the nanites, have the nanites store the parts that are only important to each individual, and how does each nanite know where it is and what it's supposed to be doing. On most of these, nanites face the same hurdles as biological cells in multicellular organisms. I assumed that some sort of storage like that described here would be necessary because the nanites must also be able to convert instructions into actions. – Jim2B Mar 25 '16 at 6:21

My first thought when I saw this question was to mimic bees.

Some bees use the “waggle dance”, a series of complicated movements and signals, to communicate important information. They can pass on a variety of information that is analogous or even identical to the information your nanites will need to pass on:

• Dangers.
• Resources.
• Good places to shelter.

There is controversy over whether or not the movement of the bees is the important mechanism, or whether other things, such as chemicals, play a role (see The Honey Bee Dance Language). I dislike the idea of using chemicals for nanites because that would involve

1. Releasing potentially harmful chemicals into a person’s bloodstream.
2. Resupplying those chemicals, which is annoying.

Because of this, I’d rather go with movements as signals, rather than chemicals.

The first thing to do when trying to apply this to nanites is to go over how the waggle dance works. The waggle dance communicates two main things: direction and distance to the source (see the previously linked pdf for more information.

• Direction. The bee’s body is the important mechanism for communicating the direction of the proposed target. The angle of the bee’s body during the dance relative to some fixed axis shows where the target is.

All images from The Honey Bee Dance Language.

• Distance. The way to communicate a longer distance is simply the extend the dance for longer. There is a linear relationship between dance time and distance.

You will have to create a start signal and an end signal, because it is important to repeat the message.

Now, there are some problems with my proposal. The first is that fixed reference points will be tough to find. For bees, there’s always one good one, which is straight up and down. In the bloodstream and other environments inside the body, though, this will be tough, because the body is generally moving, which changes the orientation of parts of it relative to the ground. You would need to choose local orientation points that would somehow be static.

The second problem is that of staying still in the bloodstream. Blood moves quite quickly; in major blood vessels, it can reach dozens of centimeters per second. I’m worried about maneuvering for even the simplest of tasks for small nanites, though larger nanites with better steering and propulsion systems might have no problems. Maintaining orientation, though, will still likely be hard.