Adaptivity and self-repair in robot self-assembly