Meet the ElectroVoxel: a reconfigurable cube-based robot that uses an electromagnet-based actuation mechanism to reconfigure in 3D dimensions. As the researchers explain:
we use an actuation mechanism based on electromagnets embedded into the edges of each cube to interchangeably create identically or oppositely polarized electromagnet pairs, resulting in repulsive or attractive forces, respectively. By leveraging attraction for hinge formation, and repulsion to drive pivoting maneuvers, we can reconfigure the robot by voxelising it and actuating its constituent modules via electromagnetically actuated pivoting.
As the above video shows, this robot can reconfigure itself in a microgravity environment.