Human: Why do we need to use a reward function in Reinforcement Learning? Assistant: 
The reward function is used to give the agent a reason to act. Without a reward function, the agent will not know what it is doing. For example, if the agent is trying to learn how to play a game, the reward function could be a score. The agent will try to maximize the score.