Skip to content

Comment on Evolution of Mona Lisa in JavaScript & Canvasparent

Comments

I will try your function in my code this evening. Another strategy I thought about is to have a small chance of replacing a polygon with a random new polygon. It seems that it would help get out of dead end situations.

Ok, I tried it and it converges much faster. My dna data is all integers so the update function is something like constrained update( int existing_value, int limit ) { new_value = random( limit ) constraining_value = random_float difference = ( new_value - existing value ) * ( constraining_value * constraining value ) return difference ( apologize if code doesn't format correctly).

I also tried randomly replacing a poly with a new random shape and color poly 5% of the time to get away from local minima... didn't seem to help. I'm still doing a bit on this in my spare time if anyone is interested.

Later.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.