A team of researchers has developed a control algorithm that allows a reconfigurable soft robot to autonomously learn how to complete complex tasks by changing its shape. The algorithm outperformed other methods and could lead to the development of general-purpose robots that can adapt to different tasks.