The RL algorithm
The steps involved in a typical RL algorithm are as follows:
- First, the agent interacts with the environment by performing an action.
- By performing an action, the agent moves from one state to another.
- Then the agent will receive a reward based on the action it performed.
- Based on the reward, the agent will understand whether the action is good or bad.
- If the action was good, that is, if the agent received a positive reward, then the agent will prefer performing that action, else the agent will try performing other actions in search of a positive reward.
RL is basically a trial and error learning process. Now, let's revisit our chess game example. The agent (software program) is the chess player. So, the agent interacts with the environment (chessboard) by performing an action (moves). If the agent gets a positive reward for an action, then it will prefer performing that action; else it will find a different action...