Most readers have probably heard of AI learning to play computer games on their own, a very popular example being DeepMind. The DeepMind team was in the international news in 2016 when their AlphaGo program defeated the South Korean Go world champion. Likewise, there have been many successful attempts in the past to develop software agents with the intent of playing Atari games like Breakout, Pong, and Space Invaders.
Each of these programs follows a ML paradigm known as reinforcement learning (RL). The following is a straightforward analogy for how RL works.