New backprop function: use Maybe to ignore some outputs.
Add core TD learning function and some helper functions.