Robots that refuse to fail: AI evolves ‘legged metamachines’ that reassemble and withstand injury