Added cumulative reward code snippet for convergence