Motivation: I could not find an easy-to-understand post that described exactly how Temporal Difference learning worked along with a functional implementation for a particular scenario.