  A metamorphic robotic system (MRS) is composed of anonymous, memoryless, and
autonomous modules that execute an identical distributed algorithm to move
while keeping the connectivity of the modules. For an MRS, the number of
modules required to solve a given task is an important complexity measure.
Here, we consider evacuation from a finite two-dimensional square grid field by
an MRS. This study aims to establish the minimum number of modules required to
solve the evacuation problem under several conditions. We consider a
rectangular field surrounded by walls with at least one exit. Our results show
that two modules are necessary and sufficient for evacuation from any
rectangular field if equipped with a global compass, which provides the modules
with a common sense of direction. After that, we focus on the case of modules
without a global compass and show that four (resp. seven) modules are necessary
and sufficient for restricted (resp. any) initial shapes of an MRS. We also
show that two modules are sufficient when an MRS is touching a wall in an
initial configuration. Then, we clarify the condition to stop an MRS after
evacuation of a rectangular field. Finally, we extend these results to mazes
and convex fields.
