'In addition to returning the action, also returns the reward that the
agent receives.'

def take_action(self, current_node_ids, action, step_number):

    goal_number = (step_number / self.task_params.num_steps)
    new_node_ids = GridWorld.take_action(self, current_node_ids, action)
    rewards = []
    for (i, n) in enumerate(new_node_ids):
        reward = 0
        if (n == self.episode.goal_node_ids[goal_number][i]):
            reward = self.task_params.reward_at_goal
        reward = (reward - self.task_params.reward_time_penalty)
        rewards.append(reward)
    return (new_node_ids, rewards)
