How to Troubleshoot Apps for the Modern Connected Worker
The Art of Evolutionary Algorithms Programming
1. The art of Evolutionary Algorithms programming, by Dr. Juan-Julián Merelo, Esq. Calling from the University of Granada in the Old Continent of Europe
35. Python, Perl, Lua, Ruby, Javascript... interpreted languages are faster.
36. Language agnoticism at its best Evolving Regular Expressions for GeneChip Probe Performance Prediction http://www.springerlink.com/content/j3x8r108x757876w/ The regular expresions are coded in AWK scripts: Although this may seem complex, gawk (Unix’ free interpreted pattern scanning and processing language) can handle populations of a million individuals.
91. (no cats were harmed doing this presentation) http://geneura.wordpress.com http://twitter.com/geneura Or camels!
Editor's Notes
CC picture from http://www.flickr.com/photos/torsteinsaltvedt/2459322441/in/photostream/
Wonderful drawing from http://www.flickr.com/photos/keeki/4264005006/in/photostream/
Picture from http://www.flickr.com/photos/imsbildarkiv/4962991603/in/photostream/ Zen means totality, and this tutorial is not just about how to write programs, but about the whole process from idea to publishing a paper in a high-impact index journal (and everything in between). So we'll make in the shape of mantras that should be followed when programming evolutionary algorithms (and probably all metaheuristics)
Picture By MarionVoss http://www.flickr.com/photos/ooocha/2869488840/in/photostream/
Forge picture from http://www.flickr.com/photos/jamesclay/1396990924/in/photostream/
You need real operating systems to speed up the gathering of tools to start. It needs to be free and gratis, so that you can have all the libraries you need, and designed for programming, not for desktop and office environment. Programmer's editors speed up coding, allowing you to check the structure of a program at first glance. Every one has his favorite program, but you need to settle for one, since you'll be much more productive with it. Emacs or vi are probably a good choice, since you can live in them and with them. NetBeans and Eclipse are free, and popular, and good, but it's overkill if you want to do small programs and scripts (which is all you need sometimes) There are other IDEs for particular languages, worth checking out.
Picture http://www.flickr.com/photos/goldenberg/22276200/in/photostream/ Now it's more important than ever to open source because research topics are more and more narrower and the code is the law
Speed will depend on many factors, and every language is geared for particular features.
Aho, Weinberger, Kernighan, AWK is a data-driven language included in all Unices. Extremely mature, extremely fast, extremely unknown... and also the best tool for this paper.
There is a balance between efficiency in programming and efficiency when doing a task. There's a power law: you can be best at one, maybe 3 languages, but at least know the potentialities of several others. Or at least know enough to tell a graduate student where she should look.
Foto de http://www.flickr.com/photos/marcelgermain/2071204651/in/photostream/
A profiler, which is available for every computer language but we show here for Perl, allows to know how much time is spent in every function, and then in every line of every function. That allows identification of bottlenecks, and surgically directed optimization.
Parameters of an evolutionary algorithm really matter, and the two main ones are chromosome and population size. This is, BTW, the first purely evolutionary-algorithmic stuff I introduce here. It can vary in complex ways, and differently depending on implementation, computer languaje, and lots of other factors. In this case what is being measured is the running time of three different implementations. Details in an upcoming paper (from SpringerLink) You probably know this already. But it's good to remember it from time to time.
How can you optimize? By looking for a better algorithm, like the cat is doing. Picture from http://www.flickr.com/photos/broterham/13140244/in/photostream/
Instead of sorting, some algorithms just need the max or two max. You have to look for the best implementation in your programming language of choice. A choide of data structure forces using lenguage function and algorithms, which might be slow or the other way round. For instance, if you use a string instead of a bitvector you will be forced to use string operations a language might not be prepared for.
Image from http://www.flickr.com/photos/adactio/502362353/in/photostream/
Imagen de http://www.flickr.com/photos/lwr/3462352862/in/photostream/
De hecho, también lo aconseja en “The practice of programming”: hacer tests estadísticos simples. It's an example of evoluitonary algorithm for MasterMind. It does not work very well: too many copies of a single one in the population. Having a YAML log allowed easy off-linen visualization of the evolution of the population.
Image from http://www.flickr.com/photos/dacran/2369215001/in/photostream/
Picture from RealBlades http://www.flickr.com/photos/xtl/3007809619/
Picture by Fernando Rodríguez, http://www.flickr.com/photos/frodrig/5317382828/
Picture by 1967geezer http://www.flickr.com/photos/chrisguise/5607158342/in/photostream/
Picture by doviende from http://www.flickr.com/photos/doviende/77324602/