Action gradients for motor learning in neuroscience and artificial intelligence