SMS: Control adaptive of nonlinear systems using a recurrent neural network