Robot learns to dismantle broken machines