Use a genetic algorithm to recreate a string AKA: the most complex way to return a string I could think of.

Requirements:

*Edit: * @Griffin, You are correct, the goal is to use crossover/mutation of characters in a string to eventually come up with the same as input, although, "Hello World" was simply an example. Really, I just like to see what the others on the site can come up with.

Golf. Try to keep it short.
Have fun, dag nabbit!

Preferences (not required):
-Using a fixed seed on a random number generator would help others reproduce your results.
-Bonus if you test for 'properties' of the string, such as the number of L's in "Hello World", instead of only correct characters (like mine).

Shortest code, or highest voted, wins.
One exception: if you manage to create a working version in BrainF***, you win.

My take using Java:

import static java.lang.Math.*;import java.util.Arrays;import static java.lang.System.out;import java.util.Random;class G{static char[]c;static Random r;public static void main(String[]a){c=a[0].toCharArray();r=new Random(6);P w=new P(9);int n=0;while(!w.f){w.s();if(w.f)out.println(w.g[w.p].x()+"@gen "+n);n++;}}static class P{boolean f=false;int p=0;M[]g=null;P(int s){if(s&gt;=9)g=new M[s];else g=new M[9];for(int i=0;i&lt;g.length;i++)g[i]=new M(c.length);}void s(){f();if(!f){h();j();}}void f(){for(int i=0;i&lt;g.length;i++){g[i].f(c);if(g[i].l==0){f=true;p=i;}}}void h(){Arrays.sort(g);}void j(){M[]b=new M[g.length];for(int i=0;i&lt;g.length-1;i++){float k=r.nextInt(100);if(k&lt;40)b[i]=new M(g[0],g[1]);else if((k&lt;60)&amp;&amp;(k&gt;40))b[i]=new M(g[0],g[2]);else if((k&lt;80)&amp;&amp;(k&gt;60))b[i]=new M(g[1],g[2]);else if((k&lt;90)&amp;&amp;(k&gt;80))b[i]=new M(g[2],g[3]);else if((k&lt;95)&amp;&amp;(k&gt;90))b[i]=new M(g[2],g[4]);else if((k&lt;99)&amp;&amp;(k&gt;95))b[i]=new M(g[0],g[r.nextInt(g.length)]);else b[i]=new M(g[0],new M(c.length));b[g.length-1]=g[0];}g=b;}}static class M implements Comparable {char[]a=null;int l=0;int q=0;int u=8;int o=20;public int compareTo(Object o){M t=(M)o;if(this.l&lt;t.l)return-1;else if(this.l&gt;t.l)return 1;return 0;}M(int s){a=new char[s];for(int i=0;i&lt;a.length;i++)a[i]=(char)r.nextInt(255);}M(M m,M p){a=new char[m.a.length];for(int i=0;i&lt;m.a.length;i++){a[i]=(r.nextInt(100)&gt;2)?m.a[i]:p.a[i];int z=r.nextInt(100);if(z&lt;u)a[i]=(char)r.nextInt(255);else if(z&lt;o){int b=r.nextInt(6);a[i]=(char)(a[i]^(1&lt;&lt;b));}}}void f(char[]v){l=0;for(int i=0;i&lt;a.length;i++){int d=abs(a[i]-v[i]);l+=d;}}String x(){return new String(a);}}}


Example output from my code:

Hello World!@gen 3352
APL (98)

L←⍴T←⎕UCS'Hello World!'⋄F←{+/2*⍨⍵-T}⋄0{0=F ⍵:⍺,⎕UCS⍵⋄(⍺+1)∇{(F⍵)≤F⊢C←⍵+(2-?3)×(⍳L)=?⍴⍵:⍵⋄C}⍵}L?255


Can be shortened, at the expense of easy configurability and of result, I'll do so when this one is beaten. 

Output:

5940 Hello World!

(or another number between ~4000-~9000).


Credit for the algorithm: http://www.electricmonk.nl/log/2011/09/28/evolutionary-algorithm-evolving-hello-world/

Explanation:


L←⍴T←⎕UCS'Hello World!': The target is the ASCII values (⎕UCS) of 'Hello World'. (You can change the string.) L is its length.
F←{+/2*⍨⍵-T}: F measures the 'distance' between a candidate and a target. This is the sum of the squares of the difference between each character.
0{0=F ⍵:⍺,⎕UCS⍵⋄(⍺+1)∇...⍵}L?255: Starting with a random string (L?255), if the distance between the target and the candidate is 0 (i.e. we have it) (0=F ⍵:), then output the generation and the string (⍺,⎕UCS⍵). Otherwise, mutate the candidate and proceed to the next generation.  
(F⍵)≤F⊢C←⍵+(2-?3)×(⍳L)=?⍴⍵:⍵⋄C: Generate a new candidate by selecting a random position and mutating it by one. If the distance to the target is less than the old candidate, return the new candidate, otherwise keep the old candidate.