The images below show some snapshots from an emulation of the "yellow tube" experiment described in Revelations. It is written in the Starlogo language.
The screen shows two open glass trays. In the right-hand one is a yellow plastic tube open at both ends. In the left-hand one is a single Locust (centre). There is also a pile of material suitable for the construction of new Locusts (orange) and a pile of material suitable for building a bridge (blue). The program instructs each Locust to wander at random. If it encounters some Locust-building material then it makes a new Locust. If it encounters some bridge-building material then it moves the material towards the right. Once some material is piled against the right-hand side it can be added to the bridge (a new bridge is started if one does not already exist). Once the bridge is complete, the Locusts can cross it. If they enter the yellow tube then they halt. The emulation ends when all the Locusts are in the tube.
Here all the Locust-building material has been converted to Locusts.
Now the Locusts are moving the bridge-building material to the edge of the tray.
Now the bridge has been constructed and the Locusts can begin to cross.
Finally all the Locusts are in the yellow tube. In this case, they are all piled up in one place.
Of course, this emulation does not demonstrate emergent behaviour – just the reverse. However, it looks as if it does. What is of interest is that all the Locusts are working to the same set of rules, which consists of only around 100 lines of StarLogo.