Genetic algorithm for LSTM optimization