The device, billed as the world’s smallest robot able to make decisions for itself, represents a major step toward a goal once rooted in science fiction.