ELI5: Explain Like I'm 5

State–action–reward–state–action

State–action–reward–state–action is a way of teaching computers how to complete tasks. It is used in an artificial intelligence (AI) program called reinforcement learning.

In this method, the computer is given a starting "state," which is a description of the world it is in. For example, if the AI program is trying to teach a robot to navigate a maze, the starting state might be the room the robot is in.

Then, the computer is given a "action" to take in this state. This action could be to take a step forward, turn left, or turn right.

The computer then receives a "reward" based on how well the action it took worked. For example, in the maze example, if the robot takes a step forward, it could receive a reward if it is closer to the end of the maze than it was before.

Then, the computer is put into a new "state," which is the world the robot is in after taking the action. This new state could be the same as before or it could be different.

Finally, the computer is given a new action to take in this state. The process continues until the computer is able to complete the task.