Cross-entropy method: Difference between revisions

Content deleted Content added
Numerous punctuation corrections required by WP:MOS
Same order of logical expression in code and in comment
Line 47:
1. mu:=-6; sigma2:=100; t:=0; maxits=100; // Initialize parameters
2. N:=100; Ne:=10; //
3. while t < maxits and sigma2 > epsilon // While maxits not convergedexceeded and maxits not exceededconverged
4. X = SampleGaussian(mu,sigma2,N); // Obtain N samples from current sampling distribution
5. S = exp(-(X-2)^2) + 0.8 exp(-(X+2)^2); // Evaluate objective function at sampled points