A robot hand has taught itself how to grab items like a human would.