Updating gradient agent reward function.