As a result, directing an AI to train itself in an artificial environment is, in general, insufficient to produce the best performance. Feedback is required. Providing that feedback is the task of the reward function, indicating to the AI how successful its approach was.