Comparison of RL with other ML algorithms

RL involves an environment, which is the problem set to be solved, and an agent, which is simply the AI algorithm. The agent will perform a certain action and the result of the action will be a change in the state of the agent. The change leads to the agent getting a reward, which is a positive reward, or a penalty, which is a negative reward for having performed an incorrect action. By repeating the action and reward process, the agent learns the environment. It understands the various states and the various actions that are desirable and undesirable. This process of performing actions and learning from the rewards is RL. The following diagram is an illustration showing the relationship between the agent and the environment in RL:

Relationship between the agent and environment in RL

RL, deep learning (DL), and ML all support automation in one way or another. All of them involve some kind of learning from the given data. However, what separates RL from the others is that RL learns the right actions by trail and error, whereas the others are focused on learning by finding patterns in the existing data. Another key difference is that for DL and ML algorithms to learn better, we will need to give them large labeled datasets, whereas this is not the case with RL.

Let's understand RL better by taking the analogy of training pets at home. Imagine we are teaching our pet dog, Santy, some new tricks. Santy, unfortunately, does not understand English; therefore, we need to find an alternative way to train him. We emulate a situation, and Santy tries to respond in many different ways. We reward Santy with a bone treat for any desirable responses. What this inculcates in the pet dog is that the next time he encounters a similar situation, he will perform the desired behavior as he knows that there is a reward. So, this is learning from positive responses; if he is treated with negative responses, such as frowning, he will be discouraged from undesirable behavior.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset