The problem of beam dynamics optimization in linear accelerator is reduced to finding the global minimum of the quality functional in multidimensional parameter space. To solve the problem, the genetic stochastic algorithm is used, based on modeling a multivariate normal distribution with adaptation of the covariance matrix, while the calculation of the matrix is not required. The modification of the algorithm is population mutation, which allows to provide a sufficient number of samples both near the “best” point and at a distance from it and to avoid the rapid contraction of the sample to the local extremum point. The application of this method to particle dynamics optimization problem provided a significant improvement of beam characteristics.