Here's an example of a swarm-robotic construction process you can play with at your desk, to get a better idea of the ideas and challenges behind the TERMES system, as described in this O'Reilly post.

Gather a set of tokens (coins, square LEGO bricks, etc.) to represent the robots and blocks. You'll need 40 blocks, and any number of robots.

The robots' goal will be to build this structure:

Example target structure to be built

Remember that with this kind of swarm system, the robots all act independently, and the system has to be able to handle unpredictable variability in things like the number of robots and the order and timing of their actions. You'll provide that variability, in this physical simulation, by acting for the robots and deciding freely which robot gets to do what and when.

Robots are capable of only a few simple actions: they're able to move on level surfaces or climb up or down a height of at most one step, and they can put down a block on a surface next to them if that surface is at the same height as they are. They can't climb or descend a step of two or more blocks, or force a block into a space directly between two others (similar to the way bricklayers don't normally try to put a brick into the middle of a row—that's a high-precision operation).

At each step, choose any robot and move it based on the following rules:

Traffic laws

This map shows the workspace the robots are building in:

Workspace blueprint annotated with traffic laws

Robots enter the workspace from below the bottom-middle space (row 5, column 3), where the arrow points in. They can move one square at a time, along a row or column, not diagonally. From any square, they can move in the direction of any outgoing blue arrow. They keep a distance of at least two spaces between them at all times—if robot A wants to move into a space that would let it reach robot B's position with one more step, it first waits for robot B to move on. If a robot leaves the workspace via one of the outgoing arrows around the edges, it circles back around to the bottom-middle space and waits to reenter.

(How do robots know their location in the workspace, without GPS or anything similar? The single arrow pointing inward means that they know their starting position when they enter (in the videos of the TERMES system, you can see this landmark as a white line drawn on the ground). After that, the structure they're building physically acts as a coordinate system. As robots move from one block to another, they can keep track of their movement and hence their position.)

If the space where a robot is standing has a stack of blocks that's shorter than the number marked there, then that space is a candidate for adding a block. First, though, the robot has to make sure certain conditions are satisfied:

Safety checks

  1. For every space with an arrow pointing from it into this one, either (a) the stack in that space must be taller than the stack at this one, or (b) the stack in that space must have the same height as the number marked there.
  2. For every space with an arrow pointing into it from this one, either (a) the stack in that space must be the same height as the stack in this one, or (b) the numbers marked in the two spaces must have a difference greater than 1.

If those conditions are satisfied, then the robot may move to any adjacent space along an outgoing blue arrow, and add a block to the stack in the space where it had just been standing.

You can trace through the construction process however you like, with any number of robots (in fact, you can add or remove robots at any time during the process) and for any choice of which robot to move when and which arrows to follow. Depending on what choices you make, the structure can grow in many possible different ways, all ending up with the same final result. As long as the robots follow the above rules, you should be able to verify that the goal structure always gets built correctly, and the robots never try to do something they're not physically capable of. You can also experiment to see how breaking any of the rules can lead to problems later on. Finally, it should be clear that the only information robots need is the state of their local neighborhood (which they can get by looking right around themselves), the traffic-laws map (which they're given in advance and which never changes during construction), and their current location in the map (which they can get by keeping track of the steps they take as they move through the workspace); they don't need broader, nonlocal information like what other robots are doing elsewhere or the current state of the structure beyond their immediate neighborhood.