The robot learned how to play the sport using the AI method known as reinforcement learning.