<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Roger Alsing Weblog &#187; Evolution</title>
	<atom:link href="http://rogeralsing.com/category/evolution/feed/" rel="self" type="application/rss+xml" />
	<link>http://rogeralsing.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 08:00:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='rogeralsing.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Roger Alsing Weblog &#187; Evolution</title>
		<link>http://rogeralsing.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://rogeralsing.com/osd.xml" title="Roger Alsing Weblog" />
	<atom:link rel='hub' href='http://rogeralsing.com/?pushpress=hub'/>
		<item>
		<title>Essentials of Metaheuristics</title>
		<link>http://rogeralsing.com/2011/04/12/essentials-of-metaheuristics/</link>
		<comments>http://rogeralsing.com/2011/04/12/essentials-of-metaheuristics/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 18:32:40 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[Evolution]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=987</guid>
		<description><![CDATA[Essentials of Metaheuristics is now available on Amazon.com http://www.amazon.com/Essentials-Metaheuristics-Sean-Luke/dp/0557148596/ (Featuring EvoLisa inspired images ;-) )<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=987&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Essentials of Metaheuristics is now available on Amazon.com</p>
<p><a href="http://www.amazon.com/Essentials-Metaheuristics-Sean-Luke/dp/0557148596/">http://www.amazon.com/Essentials-Metaheuristics-Sean-Luke/dp/0557148596/</a></p>
<p>(Featuring EvoLisa inspired images ;-) )</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/987/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/987/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/987/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/987/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/987/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/987/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/987/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/987/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/987/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/987/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/987/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/987/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/987/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/987/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=987&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2011/04/12/essentials-of-metaheuristics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>
	</item>
		<item>
		<title>Evolutionary Algorithms &#8211; Directing the undirected</title>
		<link>http://rogeralsing.com/2010/07/30/evolutionary-algorithms-directing-the-undirected/</link>
		<comments>http://rogeralsing.com/2010/07/30/evolutionary-algorithms-directing-the-undirected/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 06:57:38 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[Evolution]]></category>
		<category><![CDATA[Darwin]]></category>
		<category><![CDATA[dawkins]]></category>
		<category><![CDATA[ea]]></category>
		<category><![CDATA[GA]]></category>
		<category><![CDATA[GP]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=894</guid>
		<description><![CDATA[This is a followup to my previous post on the same topic : http://rogeralsing.com/2010/07/29/evolutionary-algorithms-problems-with-directed-evolution/ I started thinking about possible solutions after I published my last post, and I think I might have something that could work. In order to harness the full power of evolution, we need to be able to simulate undirected evolution. Undirected [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=894&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a followup to my previous post on the same topic : <a href="http://rogeralsing.com/2010/07/29/evolutionary-algorithms-problems-with-directed-evolution/">http://rogeralsing.com/2010/07/29/evolutionary-algorithms-problems-with-directed-evolution/</a></p>
<p>I started thinking about possible solutions after I published my last post, and I think I might have something that could work.</p>
<p>In order to harness the full power of evolution, we need to be able to simulate undirected evolution.<br />
Undirected evolution requires more than one environment, so that organisms can evolve and niche into specific environments instead of just competing for the same environment.</p>
<p>In our case, the &#8220;environment&#8221; is the &#8220;problem&#8221; that we want to solve.<br />
The more fit an organism is in our environment, the better it is to solve our given problem.</p>
<p>So far, I think everyone have been applying evolutionary/genetic algorithms on individual problems, evolving algorithms/solutions for a single purpose..<br />
And thus, experiencing the problems of irreducible complexity.</p>
<p>But what if we were to introduce an entire &#8220;world&#8221; of problems?</p>
<p>If we have a shared &#8220;world&#8221; where we can introduce our new problems, the problem would be like an island in this world, and this island would be a new environment where existing organisms can niche into.<br />
This way, we could see organisms re-use solutions from other problems, and with crossover we could see combinations of multiple solutions for other problems.</p>
<p>The solutions would of course have to be generic enough to handle pretty much every kind of algorithm, so I guess the DNA of the organisms needs to be very close to a real GPL language.<br />
Possibly something like serialized Lisp/Clojure, running in a sandboxed environment&#8230;</p>
<p>By adding more and more problems to this &#8220;world&#8221;, the better it would become at solving harder problems since it can reuse existing solutions.</p>
<p>The structure of it all would be something like:</p>
<p>The &#8220;World&#8221; is the container for &#8220;Problems&#8221;.<br />
&#8220;Problems&#8221; contains input/output sampling and &#8220;populations of organisms&#8221;, thus, each problem have its own eco system.<br />
&#8220;organisms&#8221; evolve by mutations and genetic crossover, they can also migrate to other &#8220;problems&#8221; from time to time.</p>
<p>This way, an organism from the &#8220;SSH Encryption island&#8221; may migrate over to the island of &#8220;Bank authentication login code generator island&#8221; and possibly be used as a module in one of the branches of one of the organisms in there, and thus removing &#8220;irreducible complexity&#8221; from the equation here..<br />
Evolution would be locally directed and globally undirected&#8230;</p>
<p>I think this could work at least to some extent, or?</p>
<p>//Roger</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/894/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=894&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2010/07/30/evolutionary-algorithms-directing-the-undirected/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>
	</item>
		<item>
		<title>Evolutionary Algorithms &#8211; Problems with Directed Evolution</title>
		<link>http://rogeralsing.com/2010/07/29/evolutionary-algorithms-problems-with-directed-evolution/</link>
		<comments>http://rogeralsing.com/2010/07/29/evolutionary-algorithms-problems-with-directed-evolution/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 14:38:13 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[Evolution]]></category>
		<category><![CDATA[Darwin]]></category>
		<category><![CDATA[dawkins]]></category>
		<category><![CDATA[ea]]></category>
		<category><![CDATA[GA]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=891</guid>
		<description><![CDATA[Creationists often use &#8220;irreducible complexity&#8221; as an argument against evolution. e.g. you need all parts in place and functioning before the &#8220;whole&#8221; can do its work and thus reproduce and spread its features. The bacteria flangellum is one such feature that have been attributed with &#8220;irreducible complexity&#8221;. You need the &#8220;tail&#8221; and some &#8220;engine&#8221; parts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=891&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Creationists often use &#8220;irreducible complexity&#8221; as an argument against evolution.<br />
e.g. you need all parts in place and functioning before the &#8220;whole&#8221; can do its work and thus reproduce and spread its features.</p>
<p>The bacteria flangellum is one such feature that have been attributed with &#8220;irreducible complexity&#8221;.<br />
You need the &#8220;tail&#8221; and some &#8220;engine&#8221; parts in place before it can be used as a propeller and drive the bacteria forwards.</p>
<p>Evolutionists have however proven this wrong and shown that each of these parts have had other purposes before they were re-used/combined for propulsion, so each part was already present.</p>
<p>The key here is that evolution in reality is not directed to a &#8220;final goal&#8221; it simply makes organisms adapt to their current environment.<br />
e.g. an organism might evolve a single pair of legs and later generations might get more of those legs if that is beneficial.<br />
The front pair of legs might even later evolve into a pair of arms that allows the organisms to grab food while they eat and so on.</p>
<p>In short, existing features can be reused and refined in order to reach a higher fitness level in the current environment.</p>
<p>As far as I know, we still have not managed to accomplish this sort of &#8220;undirected evolution&#8221; in computer programs in the same sense.<br />
If we make a program that are supposed to come up with a solution for a given problem, I would use &#8220;directed evolution&#8221; and try to breed solutions that are better and better at solving the given problem.<br />
So if our program was supposed to come up with a propulsion system for a body, it would fail at evolving the bacteria flangellum since we experience the effects of irreducible complexity, our program is unable to evolve all the parts for other reasons than moving the body forwards.</p>
<p>In order to harness the full power of evolution in computer programs, we need to be able to simulate &#8220;undirected evolution&#8221; so that we can evolve all these parts that later can be re-used for other purposes.</p>
<p>Are there any research going on in this topic at all?</p>
<p>I know that the old &#8220;Tierra&#8221; simulation was sort of undirected, the only goal was to consume as much CPU as possible, but it sure could use undirected evolution to get to that goal.</p>
<p>But other than that, anything?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/891/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/891/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/891/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/891/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/891/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/891/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/891/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/891/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/891/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/891/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/891/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/891/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/891/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/891/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=891&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2010/07/29/evolutionary-algorithms-problems-with-directed-evolution/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>
	</item>
		<item>
		<title>Synthetic life unveiled</title>
		<link>http://rogeralsing.com/2010/05/22/synthetic-life-unveiled/</link>
		<comments>http://rogeralsing.com/2010/05/22/synthetic-life-unveiled/#comments</comments>
		<pubDate>Sat, 22 May 2010 06:45:49 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[Evolution]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=882</guid>
		<description><![CDATA[This is just a must see. Scientists have designed a DNA sequence in a computer and managed to create real, self replicating cell, with it&#8217;s own email address encoded in the DNA :-) http://www.ted.com/talks/craig_venter_unveils_synthetic_life.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=882&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is just a must see.<br />
Scientists have designed a DNA sequence in a computer and managed to create real, self replicating cell, with it&#8217;s own email address encoded in the DNA :-)</p>
<p><a href="http://www.ted.com/talks/craig_venter_unveils_synthetic_life.html">http://www.ted.com/talks/craig_venter_unveils_synthetic_life.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/882/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=882&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2010/05/22/synthetic-life-unveiled/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>
	</item>
		<item>
		<title>Genetic Programming: Evolving Domain Logic a&#8217;la CQRS</title>
		<link>http://rogeralsing.com/2010/04/01/genetic-programming-evolving-domain-logic-ala-cqrs/</link>
		<comments>http://rogeralsing.com/2010/04/01/genetic-programming-evolving-domain-logic-ala-cqrs/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:08:25 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Evolution]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=819</guid>
		<description><![CDATA[[EDIT] This was supposed to be my contribution to first of april (Sorry guys) But apparently people are already doing things similair to this, for real, which makes this post quite a bit less fun. So maybe aprils fool is on me if someone implements this :-) [/EDIT] Most samples of genetic/evolutionary programming evolve formulas, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=819&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>[EDIT]<br />
This was supposed to be my contribution to first of april (Sorry guys)<br />
But apparently people are already doing things similair to this, for real, which makes this post quite a bit less fun.</strong></p>
<p><strong>So maybe aprils fool is on me if someone implements this :-)<br />
</strong><strong>[/EDIT]</strong></p>
<p>Most samples of genetic/evolutionary programming evolve formulas, e.g. a single mathematical formula that evolves to come up with a formula a given set of in and out parameters.<br />
(see <a href="http://rogeralsing.com/2010/02/14/genetic-programming-code-smarter-than-you/">http://rogeralsing.com/2010/02/14/genetic-programming-code-smarter-than-you/</a>)<br />
While that is interesting, it would be much more interesting and profitable if one could evolve an entire application, or at least some parts of it.</p>
<p>If you are into domain driven design, you have probably seen that the latest buzz is CQRS, Command Query responsibility segregation.<br />
In short, you let your domain model raise events that can be consumed by a query/reporting store.<br />
Thus, allowing the query and command sides to be separated.</p>
<p>So what does this have to evolving code?<br />
Well, if you want to evolve code, you need some way to verify the fitness of it, how good the generated code solves your problem.<br />
This is hard if not impossible to do for a normal application, there is no natural integration point where you can see if the application does what you expect.</p>
<p>However, with domain logic a&#8217;la CQRS, you have domain events, and you can easily set up a set of event sequences for a given use case.</p>
<p>Example.</p>
<p>Given that:</p>
<p><pre class="brush: plain;">
Customer.Rename(&quot;Foo&quot;);
UoW.Commit();
</pre></p>
<p>Expect:</p>
<p><pre class="brush: plain;">
CustomerRenamedEvent
  CustomerId = 123
  NewName = &quot;Foo&quot;
</pre></p>
<p>Given that:</p>
<p><pre class="brush: plain;">
Customer.Rename(&quot;Bar&quot;);
UoW.Commit();
</pre></p>
<p>Expect:</p>
<p><pre class="brush: plain;">
CustomerRenamedEvent
  CustomerId = 345
  NewName = &quot;Bar&quot;
</pre></p>
<p>Or preferably a more complex scenario</p>
<p>Given that:</p>
<p><pre class="brush: plain;">
Customer
 .NewOrder()
 .AddProduct(50050,10)
 .AddProduct(1024,5)
 .AddProduct(50040,2);
UoW.Commit();
</pre></p>
<p>Expect:</p>
<p><pre class="brush: plain;">
OrderPlacedEvent
  OrderId = 1
  CustomerId = 2
   Details
      OrderDetail
         ProductId = 50050
         Quantity = 10
      OrderDetail
         ProductId = 1024
         Quantity = 5
      OrderDetail
         ProductId = 50040
         Quantity = 2
</pre></p>
<p>This way, you can compare the expected output with the output of the generated code.<br />
You simply have to score the events based on if they match the expected types and if they contain the correct data.</p>
<p>You will still have to create skeleton code for your entities and event types and describe the expected output, but the actual implementation can be generated by evolution.<br />
That is, it will evolve the command methods that performs domain logic and changes state in your model.</p>
<p>In my experiment it takes on average 7-9 minutes for my POC generator to come up with C# code that solves the given problems, per command method that is.<br />
(About 43 k generations)</p>
<p>IMO this is groundbreaking since the code don&#8217;t have to be tested since you already know it fills your expectations and even in complex cases the generator is usually faster than most junior developers.</p>
<p>A very nice benefit of evolution is that if you later get some changed requirements, some special cases, the evolver can simply continue from the current code and incrementally add the code for the new requirements.</p>
<p>Since the fitness factor currently doesn&#8217;t include how complex the generated code is, the output can be somewhat verbose.<br />
Actual sample:</p>
<p><pre class="brush: plain;">
public void Rename(string newName)
{
     this.Name = (newName + &quot;a¤&quot;).Substring(0, newName.Length - 9 + 5 + 4);
}
</pre></p>
<p>This can be solved by giving short code higher fitness than equal but more verbose code.</p>
<p>Thats all for now..</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/819/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=819&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2010/04/01/genetic-programming-evolving-domain-logic-ala-cqrs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>
	</item>
		<item>
		<title>Genetic Programming: Code smarter than you!</title>
		<link>http://rogeralsing.com/2010/02/14/genetic-programming-code-smarter-than-you/</link>
		<comments>http://rogeralsing.com/2010/02/14/genetic-programming-code-smarter-than-you/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 09:23:37 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Evolution]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=739</guid>
		<description><![CDATA[Here in sweden there are currently circulating some email with a challange about solving a math puzzle. It&#8217;s nothing special really but the mail goes something like this (translated): (Don&#8217;t blame me for the claims in the quote, it&#8217;s not my words) It&#8217;s said that only people with an IQ over 120 can solve the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=739&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here in sweden there are currently circulating some email with a challange about solving a math puzzle.<br />
It&#8217;s nothing special really but the mail goes something like this (translated):<br />
(Don&#8217;t blame me for the claims in the quote, it&#8217;s not my words)</p>
<blockquote><p>It&#8217;s said that only people with an IQ over 120 can solve the following problem:</p>
<p>If we assume that:<br />
2 + 3 = 10<br />
7 + 2 = 63<br />
6 + 5 = 66<br />
8 + 4 = 96</p>
<p>How much is?<br />
9 + 7 = ????</p></blockquote>
<p>The mail contains an excel file with a password and can only be opened if you know the answer to the above.</p>
<p>Just for the hell of it I entered the problem into my old genetic expression evolver:<br />
<a href="http://rogeralsing.com/2008/02/07/genetic-programming-math/">http://rogeralsing.com/2008/02/07/genetic-programming-math/</a></p>
<p>The application is based on genetic programming and does use genetic crossover and a real population (unlike my EvoLisa sample).</p>
<p>The problem was described like this:<br />
problem.Cases.Add(new Case(2, 3, 10));<br />
problem.Cases.Add(new Case(7, 2, 63));<br />
problem.Cases.Add(new Case(6, 5, 66));<br />
problem.Cases.Add(new Case(8, 4, 96));</p>
<p>The first and second arguments are variable values and the last argument is the expected output.</p>
<p>And here is the output of the application:</p>
<p><img class="alignnone size-full wp-image-741" title="SmarterThanYou" src="http://rogeralsing.files.wordpress.com/2010/02/smarterthanyou.png?w=630" border="0" alt=""   /></p>
<p>As you can see on the screenshot, the application have solved the equation in 250 generations (a few milliseconds).</p>
<p>That&#8217;s probably faster than you solved it ;-)</p>
<p>PS.<br />
If it makes you feel better, I didn&#8217;t solve it at all, I go into fetus position on the floor when I see math problems ;-)</p>
<p>//Roger</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/739/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=739&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2010/02/14/genetic-programming-code-smarter-than-you/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>

		<media:content url="http://rogeralsing.files.wordpress.com/2010/02/smarterthanyou.png" medium="image">
			<media:title type="html">SmarterThanYou</media:title>
		</media:content>
	</item>
		<item>
		<title>Evolutionary Compression</title>
		<link>http://rogeralsing.com/2009/03/10/evolutionary-compression/</link>
		<comments>http://rogeralsing.com/2009/03/10/evolutionary-compression/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 17:43:40 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[Evolution]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=568</guid>
		<description><![CDATA[When I first posted the &#8220;Evolution of Mona Lisa&#8221; post, there were a few questions raised regarding how well an evolutionary approach to image compression would work out. A few days later, some guys at the NVidia forms started to try out the concept using hardware accellerated graphics. That attempt was fairly successful, it was better [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=568&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I first posted the <em><a href="http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/">&#8220;Evolution of Mona Lisa&#8221;</a></em> post, there were a few questions raised regarding how well an evolutionary approach to image compression would work out.<br />
A few days later, some guys at the NVidia forms started to try out the concept using hardware accellerated graphics.<br />
That attempt was fairly successful, it was better than normal JPG, but worse than JPG2000.</p>
<p>Now there is another attempy made by Neil Graham, you can read his article about it here: <a href="http://www.screamingduck.com/Article.php?ArticleID=46&amp;Show=ABCE" target="_blank">http://www.screamingduck.com/Article.php?ArticleID=46&amp;Show=ABCE</a> <br />
This attempt seems to deal much better with fine details than the CUDA version did.</p>
<p>I think that the final results shown in that article are awesome, although I would like to have seen some reference images using other compression algorithms with the same data size.</p>
<p>//Roger</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/568/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=568&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2009/03/10/evolutionary-compression/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>
	</item>
		<item>
		<title>Scaling Clustered Evolution: 1 + 1 = 4</title>
		<link>http://rogeralsing.com/2009/01/04/scaling-clustere-evolution-1-1-4/</link>
		<comments>http://rogeralsing.com/2009/01/04/scaling-clustere-evolution-1-1-4/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 12:00:35 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Evolution]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[GA]]></category>
		<category><![CDATA[GP]]></category>
		<category><![CDATA[MPI]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=536</guid>
		<description><![CDATA[This is a follow up on: http://rogeralsing.com/2009/01/01/clustering-evolution-we-have-lift-off/ Yesterday I got the chance to test run the cluster version of EvoLisa on a 64 bit 4 core machine. (Thanks to my collegue Ulf Axelsson for the help on this one) The results from the cluster version are quite interesting. One could expect that you would get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=536&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>This is a follow up on: </strong><a href="http://rogeralsing.com/2009/01/01/clustering-evolution-we-have-lift-off/"><strong>http://rogeralsing.com/2009/01/01/clustering-evolution-we-have-lift-off/</strong></a></p>
<p>Yesterday I got the chance to test run the cluster version of EvoLisa on a 64 bit 4 core machine.<br />
(Thanks to my collegue Ulf Axelsson for the help on this one)</p>
<p>The results from the cluster version are quite interesting.<br />
One could expect that you would get a maximum of 200% performance by using two nodes instead of one.<br />
However, this is not the case, <strong>we are getting 400% performance by doing this.<br />
</strong><br />
Doubling the CPU capacity and get 4 times as much work done.</p>
<p>How is this possible?</p>
<p>This really confused me for a while.<br />
But the reason is quite obvious once you figure it out.</p>
<p>Let&#8217;s assume the following:</p>
<p>* We use one core.<br />
* We are running 1000 generations with 50 polygons over 10 seconds.<br />
* 1 out of 10 mutations are positive.</p>
<p><strong>This gives us approx 100 positive mutations over 10 seconds.</strong></p>
<p>If we add one more core we would get:</p>
<p>* We use two cores in parallel.<br />
* We are running a total of 2000 generations, with 50 polygons per node over 10 seconds.<br />
* 1 out of 10 mutations are positive.</p>
<p><strong>This would give us approx 200 positive mutations over 10 seconds. <br />
Thus, this would give the expected 200% performance.</strong></p>
<p><strong>BUT:</strong></p>
<p>We are NOT rendering <strong>50</strong> polygons per core in this case.<br />
Each core is only rendering <strong>25</strong> polygons each.</p>
<p>During those 10 seconds, we are actually able to run <strong>2000</strong> generations instead of <strong>1000 </strong>per core, thus, running a total of <strong>4000</strong> generations over 10 sec.<br />
Which in turn results in approx <strong>400</strong> positive mutations during the same time span.<br />
<strong><br />
We have doubled the CPU capacity and halved the work that needs to be done per node.<br />
Thus, we get a * 2 * 2 perf boost.</strong></p>
<p>Pretty slick :-)</p>
<p>PS.<br />
The 4 core machine was able to render the Mona Lisa image with the same quality as the last image in the evolution series in: <strong>1 min 34 sec!</strong></p>
<p>//Roger</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/536/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=536&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2009/01/04/scaling-clustere-evolution-1-1-4/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>
	</item>
		<item>
		<title>Clustering Evolution &#8211; We have lift-off</title>
		<link>http://rogeralsing.com/2009/01/01/clustering-evolution-we-have-lift-off/</link>
		<comments>http://rogeralsing.com/2009/01/01/clustering-evolution-we-have-lift-off/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 19:00:10 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Evolution]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=519</guid>
		<description><![CDATA[After some horrible failures trying to cluster EvoLisa, I finally succeeded! (And some creds goes out to Fredrik Hendeberg on this solution too) All of my other attempts failed because of the overhead in the communication. I was trying to synchronize things too often, simply because I didn&#8217;t see how it would be possible to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=519&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After some horrible failures trying to cluster EvoLisa, I finally succeeded!<br />
(And some creds goes out to Fredrik Hendeberg on this solution too)</p>
<p>All of my other attempts failed because of the overhead in the communication.<br />
I was trying to synchronize things too often, simply because I didn&#8217;t see how it would be possible to solve the original Mona Lisa problem w/o doing so.</p>
<p>The key to successful clustering is to communicate as little as possible and run jobs in isolation as much as possible.</p>
<p>And this is what I&#8217;ve done now.<br />
Each node gets &#8221; 50 / NodeCount &#8221; polygons.<br />
If I have 2 nodes, they get 25 each.</p>
<p>So how do I get those two nodes to paint one and the same image with their 25 polygons each?</p>
<p>The solution is quite simple;<br />
Each node runs in isolation for e.g. 1000 generations.<br />
Then they pass their own DNA over to all the other nodes.<br />
The receiving nodes then construct a &#8220;foreground image&#8221; and a &#8220;background image&#8221; based on the DNA from the sending nodes, depending on their ordinal/rank/index in the cluster.<br />
Once that process is complete, each node goes back to running another 1000 generations, but now using the static fore and background while rendering.</p>
<p><img class="alignnone size-full wp-image-520" title="monapartition" src="http://rogeralsing.files.wordpress.com/2009/01/monapartition.gif?w=630" alt="monapartition"   /></p>
<p>So each node is sort of rendering the entire image, but where all the polygons except for its own are static for X generations.</p>
<p>This works because the longer the simulation runs, the less changes there are to all the polygons.<br />
So each node can fine-tune it&#8217;s own polygons together with the static fore and background since we know that the fore and background will not change that much until the next sync.</p>
<p>There will be a bit of a ping-pong effect in the beginning before all of the polygons on all the nodes start to make sense together.<br />
But that doesn&#8217;t matter because it is only for a short period before everything start to stabilize.</p>
<p>So we are actually co-evolving one organism per node, where all of the organisms needs to harmonize with each other in order to get a good fitness level.<br />
There is a sort of symbiosis going on now.</p>
<p>As a result of this, the new algorithm is no longer &#8220;greedy&#8221; and can in some cases result in a worse fitness level than the previous X generations, but the positive effect by far out-weights this.</p>
<p>The effect was quite dramatic on my 2 core laptop.<br />
With a single core, it takes about 12-20 minutes to reach the fitness level that I use for my tests (The same fitness level as the last image as the original Mona Lisa evolution series).</p>
<p>With two cores, I reach the same fitness in 3-5 minutes.<br />
That&#8217;s a pretty nice speedup.</p>
<p>The performance gain is actually more than 100%, and my best guess is that the OS is eating some of the power of the first core, the one that is used when running in single core mode.</p>
<p>Now I just need to find a multi core computer to see how it works on more than two cores.</p>
<p>//Roger</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/519/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=519&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2009/01/01/clustering-evolution-we-have-lift-off/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>

		<media:content url="http://rogeralsing.files.wordpress.com/2009/01/monapartition.gif" medium="image">
			<media:title type="html">monapartition</media:title>
		</media:content>
	</item>
		<item>
		<title>Hill climbing, GP, GA, EP, ES</title>
		<link>http://rogeralsing.com/2008/12/23/hill-climbing-gp-ga-ep-es/</link>
		<comments>http://rogeralsing.com/2008/12/23/hill-climbing-gp-ga-ep-es/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 23:54:47 +0000</pubDate>
		<dc:creator>Roger Alsing</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Evolution]]></category>

		<guid isPermaLink="false">http://rogeralsing.com/?p=502</guid>
		<description><![CDATA[[Edit] See Maarten&#8217;s comments for more info [/Edit] There have been allot of discussions about what sort of algorithm the EvoLisa app uses. Quite a few have claimed that it is a hill climber. So I think it&#8217;s time to set everything straight here. This is the definition of Hill climbing from wikipedia: Hill climbing attempts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=502&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[Edit]<br />
See <strong>Maarten&#8217;s </strong>comments for more info<br />
[/Edit]</p>
<p>There have been allot of discussions about what sort of algorithm the EvoLisa app uses.<br />
Quite a few have claimed that it is a hill climber.</p>
<p>So I think it&#8217;s time to set everything straight here.</p>
<p>This is the definition of <strong>Hill climbing </strong>from wikipedia:</p>
<blockquote><p>Hill climbing attempts to maximize (or minimize) a function <span class="texhtml">f(x)</span>, where <span class="texhtml">x</span> are discrete states. These states are typically represented by <strong>vertices in a graph</strong>, where <strong>edges in the graph encode nearness</strong> or similarity of a graph. Hill climbing <strong>will follow the graph from vertex to vertex</strong>, always locally increasing (or decreasing) the value of <span class="texhtml">f</span>, until a local maximum (or local minimum) <span class="texhtml">xm</span> is reached. Hill climbing <strong>can also operate on a continuous space</strong>: in that case, the algorithm is called gradient ascent (or gradient descent if the function is minimized).*.</p></blockquote>
<p>If we look at the EvoLisa app; <strong>there are no vertices</strong>, <strong>there is no graph</strong>, <strong>there are no edges that encodes nearness</strong>.<br />
<strong>There is no continious space</strong>.</p>
<p>There is an individual with its own set of DNA, and that individual can breed offspring that can be quite far from the parent.<br />
e.g. Each polygon in a drawing could change shape and size, each polygon could change color.<br />
(The likeliness that it happens might be extremely small, but it is not impossible)<br />
There are no paths that can be followed or backtracked like in a graph.</p>
<p>So if we stick to the wikipedia definition of hill climbing, then we can safely say that EvoLisa does not use a hill climber.</p>
<p>So what about my claims about Genetic Programming?</p>
<p>The wikipedia definition of GP is:</p>
<blockquote><p><strong>GP evolves computer programs, traditionally represented in memory as tree structures</strong>. Trees can be easily evaluated in a recursive manner. <strong>Every tree node has an operator function and every terminal node has an operand, making mathematical expressions easy to evolve and evaluate</strong>. Thus traditionally GP favors the use of programming languages that naturally embody tree structures (for example, Lisp; other functional programming languages are also suitable).</p>
<p>Non-tree representations have been suggested and successfully implemented, such as linear genetic programming which suits the more traditional imperative languages [see, for example, Banzhaf et al. (1998)]. The commercial GP software Discipulus,[6] uses AIM, automatic induction of binary machine code[7] to achieve better performance.[8] MicroGP[9] uses a representation similar to linear GP to generate programs that fully exploit the syntax of a given assembly language</p></blockquote>
<p>OK, the first statement says GP evolves computer programs, that is sort of fuzzy, a program can be allot more than computational expressions.<br />
But the next highlighted part implies that GP should deal with computational AST&#8217;s only.</p>
<p>IMO, for loops, variable declarations and other statements could very well be used in GP .<br />
An AST that contains statements for drawing polygons onto a canvas when evaluated is also a program.<br />
I could very well create a parser for a language that generates that very same AST and everyone using it would agree that it is a language and that they are writing programs when using it.</p>
<p>But let&#8217;s ignore what I think, lets stick with the definition here.</p>
<p>If we accept that GP only deals with computational programs and not imperative execution or declarations, then EvoLisa is not GP.</p>
<p>So what would be the correct definition of the algorithm then?</p>
<p>The closest definition would be:<br />
<a href="http://en.wikipedia.org/wiki/Evolutionary_programming">http://en.wikipedia.org/wiki/Evolutionary_programming</a><br />
or<br />
<a href="http://en.wikipedia.org/wiki/Evolution_strategy">http://en.wikipedia.org/wiki/Evolution_strategy</a></p>
<p>EvoLisa fits the 1+1 Evolutionary Strategy.<br />
But it also fits the μ + μ EP since it relies on an AST with mutable values.</p>
<p>Which one of those two it is depends on what definition you set for &#8220;a program&#8221;<br />
When is an AST an AST and not just data?</p>
<p>e.g. are these statements data or code? &#8220;DrawPolygon ( &#8230; )&#8221; or &#8220;print &#8216;foo&#8217;&#8221; .</p>
<p>//Roger</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogeralsing.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogeralsing.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogeralsing.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogeralsing.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rogeralsing.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rogeralsing.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rogeralsing.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rogeralsing.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogeralsing.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogeralsing.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogeralsing.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogeralsing.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogeralsing.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogeralsing.wordpress.com/502/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogeralsing.com&amp;blog=2473556&amp;post=502&amp;subd=rogeralsing&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rogeralsing.com/2008/12/23/hill-climbing-gp-ga-ep-es/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ac3d313189eb4d3fe101e3aadcd08e2?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">roggan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
