Artificial muscles have been taught to work like real ones