These are optional readings if you want to go deeper.
To dive deeper into Monte Carlo and Temporal Difference Learning: