Adjust reward function.