Gradient-free training of recurrent neural networks