Hi, David,
I'm happy to hear you're interested in genetic algoriths, and per you request I'll try to give you some initial feedback here, on what I did and how it compares with other software.
First off, I'm comparing IMD 5.01 with GenX 2.0b.
My system: Si sub / Ru / RuOx / RuOx
Aim: extract thickness of Ru and both RuOx layers, and some hint about densities and roughnesses would also be nice :)
Problem: Ru thickness and RuO2 thicknesses are largely "exchangeable", i.e. classic gradient method can easily go in wrong direction... Basically, 12 parameters, several strongly correlated...
Solution: Genetic algoriths :)
I'm using same population size (~300 members, optimized from many GenX runs).
First thing I noticed was the slower calculation time of IMD per generation, factor 10 slower compared to GenX Disabled parallelism in GenX, with parallel computing, the difference is even larger!...
Both simulations on same "experimental data grid" ( and done without convolution for instrumental resolution for fair comparison)
(both fits use what I guess is the same chi^2 for both GenX and IMD, i..e chi^2/errorbar^2
Note that the new IMD is actually much faster than the old one for specific cases (multilayer GIXR simulations 10.000 data points), but apparently things could be further optimized? Is IDL using multicore? (my PC runs at 50% CPU load, suggesting it does not :)
The final solution was a bit "worse" fit than with GenX, but I guess I still have to play with all the settings to see if I can get closer.
Thinknesses and densities were similar though, especially no "non-physical" results, where parameter limits would certainly allow them, so that's goos news!
To be honest, I also do not understand all the algorith settigns of GenX, so I cannot compare exactly the same situations in terms of fit stability, time, etc...
Maybe the IMD fit was also simply not finished yet, GenX was "good" within an hour, IMD "crashed" after 10 hours, fit looked decent by that time, but stopped due to some weird error...
One point: In GenX you have the option to not use the initial guess as part of the first polulation, it's unclear to me if that initial guess is part of your first population or not, maybe I should read the manual :)
But would be good to have the option to include or exclude it (you can give a guess or start really from random starting point.)
For reference: I did not use the initial guess as part of the population in GenX.
Now for some "frustrations" :)
When you abort a fit (I never reached convergence, stil playing...), IMD "pushes" the results of the fit parameters to the actual values in the main window, overwriting starting values! This really should be asked if this should be dome or if opriginal values should be kept! (GenX does ask this :)
We also (and I cannot stress this enough) *need* a fit residue!!!
Only then can you judge if the method chosen for fit quality (chi^2, logartihmic, errorbars, ...) actually focusses on the range where the information is, or e.g. only on the total reflection range or Bragg peaks.
Note that it may be interesting to add some more "fitness quality" methods, e.g. sin^4(theta) is also often used, since reflectivity generally scales with sin2^4
GenX has more of these options, although here I chose the one compatible with IMD.
(note that GenX also has no fit residue...)
Finally, I would really like the option to see the full final polulation, the best canditate is nice, but there may be others which are equally nice (and maybe even more physically relevant), that's the purpose of a genetic algorithm, to keep "different genes" as long as possible, up to and including in the final population! Then it's the scientists choice to discard or keep what he wants for futher analysis (e.g. continue with gradient method on several "best candidates" from final population)
All right, so far for some first feedback, summarized, things are looking interesting, still more comparisons to be done, but the speed is what's worrying me... Maybe I should just order a new PC and see if things improve :)
If you need more information, I can provide it, either here or through mail, including some screenshots.
I'll see if I can add some more stuff in the next week(s), it's a bit time consuming, I'll have to redo tens of fits from GenX to test general "consistency"...
P.S. love the live view of all the individuals, nicely chaotic :)
P.P.S. I second the suggestion of Patrick for combined hard and soft x-ray analysis! ("multi wavelength analysis")
We're about to publish a paper on this using some home-written (LevMar) fit, showing the benefit of combining the two, I'll add a link here when it's published, for those interested to read it :)
And just a funny added note: I would especially like combined x-ray and neutron analysis ... and a time machine to go back 20 years and redo my PhD analysis! :) :) :)
Cheers,
Robbert van de Kruijs