It's the closest thing we've seen to real-life Transformers: robotic blocks that can travel independently, attach themselves to each other in predefined structures, follow paths and light sources, and more.

MIT researchers just released video footage of these new M-Blocks 2.0 cubes in action, and we can't stop watching. They can shuffle themselves into order, climb up on top of each other, spin in mid-air, and engage in several more types of hive-like behaviour.

This swarming coordination is the big step forward in this latest batch of bots. Each cube houses a flywheel spinning at 20,000 revolutions per minute, while on the outside are barcodes and magnets to help the cubes recognise and attach to each other.

Pre-programmed algorithms tell the blocks what they're supposed to do and how they should be interacting with each other.

"M stands for motion, magnet, and magic," says computer scientist Daniela Rus, director of the Computer Science and Artificial Intelligence Laboratory (CSAIL) at MIT.

"'Motion', because the cubes can move by jumping. 'Magnet', because the cubes can connect to other cubes using magnets, and once connected they can move together and connect to assemble structures. 'Magic', because we don't see any moving parts, and the cube appears to be driven by magic."

While the M-Blocks 2.0 might remind us of the Transformer movies, these cubes could actually have some seriously useful applications – building bridges and staircases to rescue stranded people after natural disasters hit.

According to the researchers, scaling up the number of cubes should be relatively straightforward, too.

A paper on the M-Blocks 2.0 cubes is being presented at the IEEE International Conference on Intelligent Robots and Systems in November in Macau.