Cubes made from colourful ‘hydrogels’ are joined together to make a miniature model of the classic puzzle.

Scientists have sculpted squishy materials into a ‘Rubik’s Cube’ with sections that can be twisted and rotated — just like the real thing.

To solve the Rubik’s Cube, that maddening 1980s puzzle, users rotate a collection of variously coloured blocks until each of the cube’s six sides features one solid colour.

Ben Zhong Tang at the Hong Kong University of Science and Technology, Jonathan Sessler at the University of Texas at Austin and their colleagues constructed a small model of the Rubik’s Cube from foam-and-water concoctions called hydrogels. The researchers laced hydrogels with fluorescent particles in one of six colours. They pressed squares of these coloured hydrogels onto the sides of hydrogel cubes, then stuck 27 such cubes together, forming a larger cube with nine squares on each face whose sections could be rotated.

This version of the Rubik’s Cube allows a player to ‘cheat’ by lifting out an individual cube and reorienting it, or by adding a chemical to change the colour. The researchers say that soft robots could use patterns of hydrogel cubes to encode information.