
Reinforcement is being right.
— B.F. Skinner
How do you learn?
How do you teach your dog or your children? Normally, you ask them to do a certain task, and if they succeed to do that task, you give them a treat. If they failed to do that task, you wouldn’t give them a treat or even punish them. If you think about it, you also teach yourself this way. For example, if you were trying to learn chess or try to be good at it, you learn it by playing them. You could lose or win, and you will learn from that. This way of learning is called reinforcement learning. Then, can we teach computer to do things by applying reinforcement learning?

Developed by Google’s Deepmind
Error-driven learning
The basic computational model of reinforcement learning is Q-learning. Q-learning is a simple algorithm with agent who does the action and ‘Q’ who gives a response to agent’s action. At the beginning, agent will be provided with certain environment environment and few options to act. Then, after agent does certain action, agent will ask ‘Q’ about “What happened?”. Q will give agent a reward and situation of the current state(how the environment changed after the action) according to his action. This reward can be compared with dopamine in human brain.

Source http://incompleteideas.net/book/bookdraft2017nov5.pdf
Agent will learn which is the right action by trying all the actions until agent gets the biggest reward from ‘Q’. This simple algorithm can be upgraded by adding punishment, random noise or building a network based on Q-learning.
However, how human and animal’s reinforcement learning work is not that simple. For example, the same action can arise from different psychological pathways. It could be goal directed or it could be habitual. Beside this, motivation can affect our decision and every action has costs and latency along with rewards. To make computational reinforcement learning better there are much more to consider, but it is amazing that we could imitate how people and animal learn and apply it to computer program to teach them.