As we have already seen, reinforcement learning is an on-the-go learning technique. Let's consider a simple analogy to understand reinforcement learning. Think about a nine-month-old baby trying to get up and walk.
The following diagram represents our analogy:
The first step the baby does is try to get up by pressing their legs toward the ground. Then, they try to balance themselves and try to hold still. If this is successful, you would see a smile on the baby's face. Now, the baby takes one step forward and tries to balance itself again. If, while trying, the baby lost balance and fell down, then there is a chance that the baby might frown or cry. The baby may either give up walking if it doesn't have the motivation to walk or may try once again to get up and walk. If the baby was successful taking two...