# Stochasticity of Genetic Algorithm

I have a set of observations of real data, and a set of Random Variables I produce my self. The goal is to generated Random Variables with the same Distribution as the real data. To investigate the simliarity the two distributions, I use the Kullback-Leibler Divergence. Now with the genetic algorithm of Matlab, I try to find the best parameters for my generator, the thing only is that genetic algorithm is stochastic and so I have no consistent results for the Kullback Leibler Divergence. One idea would be though to run my generator say a thousand times then chosse the minimum Kullback-Leibler Divergence and reproduce the result with this: http://www.mathworks.ch/ch/help/gads/reproducing-your-results-1.html Would that work? The idea would be to get a continuous fitness function...

• To clarify what you do: There is a observation variable $X$ and you want to find some $Y_\theta$ with minimal KLDiv. You start a genetic algorithm 1000 times with the same $\theta_0$ and get a $\theta_i$ each time along with an (estimated) KLDiv$(X,Y_{\theta_i})$? As a result you have some $f(\theta_i)=$KLDiv$(\dots)$ which you use to estimate a continuous version (by kernel density estimation or similar)? – frafl Mar 13 '13 at 15:05
• yes, that is exactly true – guestrest Mar 18 '13 at 14:05