Recurrent artificial neural network