Reinforcement Learning is a slightly different learning model than the other techniques that we have discussed previously. Therefore, I wouldn’t be able to explain the same using the fruit basket example that we have been using all this while. Let’s replace apples and oranges with self-driving cars!
Suppose that you are at Google or Tesla and are trying to train a car to drive by itself! How would you go about that? Driving requires the knowledge of much more than turning the ignition on and steering the wheel. You should know to keep the side of the road, to stop at the red signal, or to keep off the footpath, for instance.
You decide not to overwhelm the poor machine by laying out all the rules at once. Instead, you take an “on the fly” approach, by letting the car take decisions in a real-time manner, and by giving feedback on the merit of the decision taken.
If the car stops at a red light, you reward it by giving positive feedback. If the car sways off the road and runs over people sleeping on the footpath, you punish it by giving it negative feedback. The car learns by repeating the decisions that gave it positive feedback and avoiding the decisions that gave it negative feedback.
Now, for the real world story. My mother - a brown-skinned Indian - used to be teased by some of her brown-skinned relatives, for being dark-skinned. As a result, she grew up with the notion that dark-skinned was bad (negative feedback). Whenever she used to try out a bright colored outfit, they would chide her by saying that the bright colors did not compliment her complexion. The repeated feedback reinforced this belief in her mind, and she resorted to wearing pale-colored clothes during the colorful years of her youth. It took her years of unlearning to realize that dark colors did in fact suited her well.
Not just her relatives, but the teachers at her school, who are supposed to be implanting progressive thoughts in young minds, were guilty of reinforcing regressive ideas. She used to recall accounts of the nuns who ran the Convent School she was a student of slut-shaming students for coming to school with a bright bindi on their forehead. Sweet Jesus!