Allow 'loss' to return a tuple
At the moment we implicitly assume that the loss is a real number. This coincides with the wikipedia definition, but if we allow the loss to be a tuple we can express a wider variety of algorithms just by changing the loss function.
For example, in order to first prioritise subdomains with large area, and only then concentrate on those where the function to be learned is nonlinear, we could define a loss like:
(area > 0.1, deviation)
This would require some work (but not an inordinate amount) to rewrite the 1D, 2D and integrator learners to use this (they use numpy functions on the loss and assume that it is a real number)