Adarsh Thoduvakkal
homeexperiencepersonalthoughts

with love from 🍁 © 2026

<- back to thoughts

Bots that build a shape

Log #2. Recreating Harvard's 2014 Kilobot self-assembly.

october 2026 • swarms, robotics, self-assembly • 1 min read

project logMicrobots: programmable matteron /projectsentry 3 of 7
  1. 1Programmable Matteroctober 2026
  2. 2Dots and a flockoctober 2026
  3. 3Bots that build a shapeyou're here
  4. 4Going 3D: bots that never let gooctober 2026
  5. 51,000 bots in the browseroctober 2026
  6. 6From hand-written rules to a trained modeloctober 2026
  7. 7Making it local, and catching broken botsoctober 2026

In 2014, Harvard's Kilobot project got 1,024 real robots to arrange themselves into shapes with no central control. I recreated the algorithm with 150 simulated bots.

150 bots assembling into a star

Each bot gets a map of the shape and can measure how far away its neighbours are. From that, a few rules:

  • Seeds: four bots sit where the shape starts and know their positions. Everyone else starts out not knowing where they are.
  • A gradient: every bot takes one more than the smallest number it hears from the bots touching it, so each one knows roughly how many hops it is from the seeds.
  • Working out where it is: from the distances to neighbours that already know their positions, a bot can calculate its own (trilateration).
  • Edge-following: bots on the outside of the group travel round its edge, one at a time.
  • Stopping: a bot stops when its next step would take it out of the shape, or when it touches a bot that has already joined and is no closer to the seeds than it is.

150 bots assembling into the letter K

Wall, star and the letter K all assemble. It's slow, because only the bots on the edge move, but it works for any shape you can draw, which is exactly the property I want to keep as the bots get more complicated.

previous entry

Dots and a flock

october 2026

next entry

Going 3D: bots that never let go

october 2026

<- back to all essays