1. A method for determining parameters of a sample by X-ray scattering, the method comprising the steps of: a) exposing the sample to X-rays and measuring scattered X-ray intensity; b) generating a parameterized model of the sample which is used for numerical simulation of scattered X-ray intensity on a basis of a physical scattering theory; c) comparing experimental and simulated X-ray scattering data to generate an error value; d) modifying parameters of the model by means of a genetic algorithm involving a number of individuals each having an equal number N of encoded parameters and forming a generation, and applying the genetic operators of “selection”, “crossover” and “mutation” to compose successive generations of evolving individuals, wherein a “movement” genetic operator is applied from one generation to the next which moves at least some of the encoded parameters of at least some of the individuals towards respective encoded parameters of an individual having a smallest error value.