TD function

Temporal Differences Model