Task-independent Spiking Central Pattern Generator: a Learning-based Approach