    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: The Model Student: Can Chance Make Fine Things? (Part 2)</title>
        <link>https://members.accu.org/index.php/articles/1523</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Design of applications and programs + Overload Journal #88 - December 2008</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c67/">Design</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c247/">88</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c67-247/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c67+247/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;The Model Student: Can Chance Make Fine Things? (Part 2)</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 23 December 2008 08:59:00 +00:00 or Tue, 23 December 2008 08:59:00 +00:00</p>
<p><strong>Summary:</strong>&nbsp;How well does evolution find solutions? Richard Harris models population change.</p>
<p><strong>Body:</strong>&nbsp;		<p>Last time we built a library with which we will simulate the process of evolution in the hope that we can use it to gain some insight into if and how evolution works in the real world. All that was left to do was implement a biochem complex enough to act as an analogue of the relationship between the genetic makeup of a real world creature and its physical properties. What I'd really like to use would be a model of engine efficiency and power such as I used to illustrate the Pareto optimal front.
  </p><p>
    Unfortunately, such models are complicated. <span style="  font-style: italic; font-weight: normal; vertical-align: baseline">Really</span> complicated. We're talking advanced computational fluid dynamics to even work out what happens inside a piston [<a href="#Meinkel97">Meinkel97</a>].
  </p><p>
    So instead, I'm going use randomly generated functions with several peaks and troughs. Thankfully, it's really easy to construct such functions by adding together a set of randomly weighted constituent functions, known as basis functions. Specifically I'm going to use radial basis functions, so named because they depend only on how far an evaluated point is from a central point.
  </p><p>
    There are quite a few radial basis functions to choose from. I shall use one we have already come across; the Gaussian function. This is the probability density function of the normal distribution and has the form
  </p>
  <img src="/content/images/journals/ol88/harris/formula1.png"/>
  <p>
    Its shape is illustrated in Figure 1.
  </p>
<table class="sidebartable"><tr><td><img src="/content/images/journals/ol88/harris/Figure1.png" hspace="5" vspace="5"/>
</td></tr><tr><td class="title">Figure 1</td></tr></table>
<p>
    We don't require that the function integrates to one over the entire real line, so shall replace the scaling factor with a simple weighting value. We also want to generalise to more than one dimension so must slightly change the exponentiated term. The functions we shall use will have the form
  </p>
  <img src="/content/images/journals/ol88/harris/formula2.png"/>
  <p>
    The <tt>||<i>x</i>-<i>&mu;</i><sub><i>i</i></sub>||<sup>2</sup></tt> means the square of the straight line, or Euclidean, distance between the points <b>x</b> and
 and is easily calculated by summing the squares of the differences between each element of the vectors representing the coordinates of those points. Each function in the set will have its own weight <span style="  font-style: italic; font-weight: normal; vertical-align: baseline">w</span><span style="  font-style: italic; font-weight: normal; vertical-align: sub">i</span> and they all share a scaling factor <span style="  font-style: italic; font-weight: normal; vertical-align: baseline">c</span> applied to the squared distance. We shall restrict the arguments of our functions to values between zero and one, so I shall choose this scaling factor so that, rather arbitrarily, a distance of 0.1 corresponds to a 50% drop in the value of the function from its maximum at a distance of zero. This implies that
  </p>
  <pre>&lt;big&gt;
  0.5 = e<sup>-0.01c</sup>
  &lt;/big&gt;</pre>
  <p>
    Taking logs of both sides yields
  </p>
  <pre>&lt;big&gt;
  -0.01c = ln0.5 &asymp; -0.7
       c = 70
  &lt;/big&gt;</pre>
  <p>
    Figure 2 illustrates one such function, in one dimension, constructed from 8 basis functions with centres randomly chosen from the range 0.2 to 0.8 and weights randomly chosen from the range -1 to 1.
  </p>
<table class="sidebartable"><tr><td><img src="/content/images/journals/ol88/harris/Figure2.png" hspace="5" vspace="5"/></td></tr><tr><td class="title">Figure 2</td></tr></table>
<p>
    Implementing a two dimensional version of this is reasonably straightforward. Listing 1 shows the class definition for our random function.
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    namespace evolve
    {
      class random_function :
         public std::binary_function&lt;double,
         double, double&gt;
      {
        class node
        {
        public:
          node();
          double operator()(double x, double y) const;
        private:
          double x_;
          double y_;
          double w_;
        };
        typedef std::vector&lt;node&gt; nodes_type;
      public:
        random_function();
        explicit random_function(size_t nodes);
        double operator()(double x, double y) const;
      private:
        nodes_type nodes_;
      };
    }
</pre></td></tr><tr><td class="title">Listing 1</td></tr></table>
<p>
    The <tt class="code">node</tt> nested class represents a single, randomly centred and weighted, basis function supporting function call semantics through <tt class="code">operator()</tt>. The <tt class="code">random_function</tt> class maintains a set of <tt class="code">node</tt>s and sums the results of the function calls to each of them in its own <tt class="code">operator()</tt>.
  </p><p>
    So let's take a look at the implementation of <tt class="code">node</tt>'s member functions (Listing 2).
  </p>
  <table class="sidebartable"><tr><td><pre class="programlisting">
    evolve::random_function::node::node() :
       x_(rnd(0.6)+0.2),
       y_(rnd(0.6)+0.2),
       w_(rnd(2.0)-1.0)
    {
    }
    double
    evolve::random_function::node::operator()(
       double x, double y) const
    {
      double d2 = (x-x_)*(x-x_)+(y-y_)*(y-y_);
      return w_*exp(-70.0*d2);
    }
  </pre></td></tr><tr><td class="title">Listing 2</td></tr></table>
  <p>
    I'm a little ashamed to have hard coded the ranges of the central points and weights. However, we're only going to use it during our simulations, so I think it's probably forgivable in this instance.
  </p><p>
    Now we can take a look at the implementation of <tt class="code">random_function</tt>. First off, the constructors (Listing 3).
  </p>
  <table class="sidebartable"><tr><td><pre class="programlisting">
    evolve::random_function::random_function()
    {
    }
    evolve::random_function::random_function(
       size_t nodes)
    {
      nodes_.reserve(nodes);
      while(nodes--) nodes_.push_back(node());
    }
  </pre></td></tr><tr><td class="title">Listing 3</td></tr></table>
  <p>
    Both are pretty simple. The initialising constructor simply pushes the required number of default constructed <tt class="code">node</tt>s onto the <tt class="code">nodes_</tt> collection, relying upon their constructors to randomly initialise them.
  </p><p>
    The function call operator is also pretty straightforward (Listing 4).
  </p>
  <table class="sidebartable"><tr><td><pre class="programlisting">
    double
    evolve::random_function::operator()(
       double x, double y) const
    {
      double result = 0.0;
      nodes_type::const_iterator first =
         nodes_.begin();
      nodes_type::const_iterator last  =
           nodes_.end();
      while(first!=last) result += (*first++)(x, y);
      return result;
    }  </pre></td></tr><tr><td class="title">Listing 4</td></tr></table>
  <p>
    As described before, this simply iterates over the <tt class="code">nodes_</tt>, summing the results of each function call.
  </p><p>
    At long last we're ready to implement a specialisation of <tt class="code">biochem</tt> (Listing 5).
  </p>
  <table class="sidebartable"><tr><td><pre class="programlisting">
    class example_biochem : public evolve::biochem
    {
    public:
      explicit example_biochem(size_t nodes);
      virtual size_t genome_base() const;
      virtual size_t genome_size() const;
      virtual size_t phenome_size() const;
      virtual double p_select() const;
      virtual void   develop(
         const genome_type &amp;genome,
         phenome_type &amp;phenome) const;

    private:
      enum {precision=5};

      double make_x(const genome_type &amp;genome) const;
      double make_y(const genome_type &amp;genome) const;
      double make_var(
         genome_type::const_iterator first,
         genome_type::const_iterator last) const;
      evolve::random_function f1_;
        evolve::random_function f2_;
      };
  </pre></td></tr><tr><td class="title">Listing 5</td></tr></table>
  <p>
    The <tt class="code">example_biochem</tt> treats the genome as a discrete representation of two variables each with <tt class="code">precision</tt>, or five, digits each. The two <tt class="code">random_functions</tt> map these variables onto a two dimensional phenome. We hard code the <tt class="code">biochem</tt> properties to reflect this, as illustrated in Listing 6.
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
      size_t
      example_biochem::genome_base() const
      {
        return 10;
      }
      size_t
      example_biochem::genome_size() const
      {
        return 2*precision;
      }
      size_t
      example_biochem::phenome_size() const
      {
        return 2;
      }
      double
      example_biochem::p_select() const
      {
        return 0.9;
      }
</pre></td></tr><tr><td class="title">Listing 6</td></tr></table>
<p>
    Note that we're sticking with the selection probability of 0.9 that we used in our original model.
  </p><p>
    The constructor simply initialises the two <tt class="code">random_function</tt>s with the required number of nodes.
  </p>
<pre class="programlisting">
      example_biochem::example_biochem(
         size_t nodes) : f1_(nodes), f2_(nodes)
      {
      }
</pre><p>
    As you no doubt recall, the <tt class="code">develop</tt> member function is responsible for mapping from the genome to the phenome and our example does so using the <tt class="code">make_x </tt>and <tt class="code">make_y</tt> member functions to create the two variables we need for the <tt class="code">random_function</tt>s from the genome. (See Listing 7.)
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
      void
      example_biochem::develop(
         const genome_type &amp;genome,
         phenome_type &amp;phenome) const
      {
        if(genome.size()!=genome_size())
           throw std::logic_error(&quot;&quot;);
        phenome.resize(phenome_size());
        double x = make_x(genome);
        double y = make_y(genome);
        phenome[0] = f1_(x, y);
        phenome[1] = f2_(x, y);
      }
</pre></td></tr><tr><td class="title">Listing 7</td></tr></table>
<p>
    The <tt class="code">make_x</tt> and <tt class="code">make_y</tt> member functions themselves simply forward to the <tt class="code">make_var</tt> member function with each of the two <tt class="code">precision</tt> digit halves of the genome (Listing 8).
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
      double
      example_biochem::make_x(
         const genome_type &amp;genome) const
      {
        if(genome.size()!=genome_size())
           throw std::invalid_argument(&quot;&quot;);
        return make_var(genome.begin(),
           genome.begin()+precision);
      }
      double
      example_biochem::make_y(
         const genome_type &amp;genome) const
      {
        if(genome.size()!=genome_size())
           throw std::invalid_argument(&quot;&quot;);
        return make_var(genome.begin()+precision,
           genome.end());
      }
</pre></td></tr><tr><td class="title">Listing 8</td></tr></table>
<p>
    The <tt class="code">make_var</tt> function maps an iterator range to a variable between zero and one. It does this by treating the elements in the range as progressively smaller digits, dividing the multiplying factor by the <tt class="code">genome_base</tt> at each step to accomplish this.
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
      double
      example_biochem::make_var(
         genome_type::const_iterator first,
         genome_type::const_iterator last) const
      {
        double var = 0.0;
        double mult = 1.0;
        while(first!=last)
        {
          mult /= double(genome_base());
          var += *first++ * mult;
        }
        return var;
      }
</pre></td></tr><tr><td class="title">Listing 9</td></tr></table>
<p>
    Since we're using base 10, this is equivalent to simply putting a decimal point at the start of the sequence of digits. The elements 1, 2, 3, 4 and 5 would therefore map to 0.12345.
  </p><p>
    So what are the results of a simulation based on our <tt class="code">example_biochem</tt>? Figure 3 illustrates the distribution of the phenomes of a <tt class="code">population</tt> of 100 <tt class="code">individual</tt>s from their initial state to their states after 10, 50 and 250 generations.
  </p>
<table class="sidebartable"><tr><td><img src="/content/images/journals/ol88/harris/Figure3a.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure3b.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure3c.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure3d.png" hspace="5" vspace="5"/>
</td></tr><tr><td class="title">Figure 3</td></tr></table>
  <p>
    Well, it certainly looks like the <tt class="code">population</tt> converges to a Pareto optimal front. However, we cannot be certain that there are not any better trade offs between the two functions. To check, we'll need to take a comprehensive sample of the two variables and record the optimal front.
  </p><p>
    We can do this by maintaining a list of undominated points. As we test each new point, we check to see if it is dominated by any in the list. If not, we remove any points in the list that it dominates and finally add it to the list.
  </p><p>
    In order to calculate the function values for any point, we first need to add another member function to <tt class="code">example_biochem</tt>. The function call operator seems a reasonable choice and its implementation is illustrated in Listing 10.
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    class example_biochem : public evolve::biochem
    {
    public:
      ...
      std::pair&lt;double, double&gt; operator()(double x,
         double y) const;
      ...
    };
    std::pair&lt;double, double&gt;
    example_biochem::operator()(double x,
       double y) const
    {
      return std::make_pair(f1_(x, y), f2_(x, y));
    }
</pre></td></tr><tr><td class="title">Listing 10</td></tr></table>
<p>
    Now we can implement a function to sample the optimal front.
  </p>
<pre class="programlisting">
      typedef std::pair&lt;double, double&gt; point;
      typedef std::vector&lt;std::pair&lt;point,
         point&gt; &gt; front;
      front sample_front(size_t n,
         const example_biochem &amp;b);

</pre><p>
    Note that the <tt class="code">std::pair</tt> of <tt class="code">point</tt>s represents the two input variables with its <tt class="code">first</tt> member and the two elements of the output phenome with its <tt class="code">second</tt> member.
  </p><p>
    The implementation of <tt class="code">sample_front</tt> (Listing 11) follows the scheme outlined above, slicing each of the variables into <tt class="code">n</tt> samples and iterating over them, filling up the sample of the optimal front.
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    front
    sample_front(size_t n, const example_biochem &amp;b)
    {
      front sample;
      for(size_t i=0;i!=n;++i)
      {
        for(size_t j=0;j!=n;++j)
        {
          double x = double(i) / double(n);
          double y = double(j) / double(n);
          point val = b(x, y);
          if(on_sample_front(val, sample))
         {
            remove_dominated(val, sample);
            sample.push_back(std::make_pair(
               point(x, y), val));
          }
        }
      }
      return sample;
    }
</pre></td></tr><tr><td class="title">Listing 11</td></tr></table>
<p>
    The two helper functions, <tt class="code">on_sample_fron</tt>t and <tt class="code">remove_dominated</tt>, implement the check that a point is not dominated by any already in the list and the removal of any that it dominates respectively. (See Listing 12.)
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    bool
    on_sample_front(const point &amp;value,
       const front &amp;sample)
    {
      front::const_iterator first = sample.begin();
      front::const_iterator last  = sample.end();
      while(first!=last &amp;&amp;
               (value.first&gt;=first-&gt;second.first ||
                value.second&gt;=first-&gt;second.second))
      {
        ++first;
      }
      return first==last;
    }
    void
    remove_dominated(const point &amp;value,
       front &amp;sample)
    {
      front::iterator first = sample.begin();
      while(first!=sample.end())
      {
        if(value.first&gt;=first-&gt;second.first &amp;&amp;
           value.second&gt;=first-&gt;second.second)
        {
          first = sample.erase(first);
        }
        else
        {
          ++first;
        }
      }
    }
</pre></td></tr><tr><td class="title">Listing 12</td></tr></table>
<p>
    Note that the loop condition in <tt class="code">on_sample_front</tt> and the comparison at the heart of <tt class="code">remove_dominated</tt> are simply hard coded versions of the complement of the <tt class="code">pareto_compare</tt> function we developed earlier.
  </p><p>
    Note that for <span style="  font-style: italic; font-weight: normal; vertical-align: baseline">n</span> samples of each variable, the <tt class="code">sample_front</tt> function must iterate over <span style="  font-style: italic; font-weight: normal; vertical-align: baseline">n</span><span style="  font-style: italic; font-weight: normal; vertical-align: super">2</span> points, making approximately O(<span style="  font-style: italic; font-weight: normal; vertical-align: baseline">n</span>) comparisons at each step (since the optimal front is a line in the plane). We can't therefore afford to work to the same precision as we do in the simulation itself.
  </p><p>
    Figure 4 adds the 100 by 100 point sample of the optimal front to the final state of our earlier simulation.
  </p>
<table class="sidebartable"><tr><td><img src="/content/images/journals/ol88/harris/Figure4.png" hspace="5" vspace="5"/>
</td></tr><tr><td class="title">Figure 4</td></tr></table>
  <p>
    Well, our simulation has certainly ended up distributed along part of the optimal front, but seems to have missed an entire section of it. To see why, we need to take a look at how the points whose values lie on the optimal front are distributed.
  </p><p>
    This requires a further change to the <tt class="code">example_biochem</tt>. To compute the distribution of the variables represented by the genomes, we need to make the <tt class="code">make_x</tt> and <tt class="code">make_y</tt> member functions public. Figure 5 compares the final distribution of points in our simulation to the set comprising the sample of the Pareto optimal front.
  </p>
<table class="sidebartable"><tr><td><img src="/content/images/journals/ol88/harris/Figure5a.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure5b.png" hspace="5" vspace="5"/>
</td></tr><tr><td class="title">Figure 5</td></tr></table>
  <p>
    Clearly our <tt class="code">population</tt> has converged on only one of the two regions from which the optimal front is formed. The question is, why?
  </p><p>
    To investigate this, we need to examine the properties of our <tt class="code">example_biochem</tt> near each of the two regions of the optimal front. We do this by sampling squares of side 0.3 centred on the mid points of the two regions, as illustrated along with the results in Figure 6.
  </p>
<table class="sidebartable"><tr><td><img src="/content/images/journals/ol88/harris/Figure6a.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure6b.png" hspace="5" vspace="5"/>
</td></tr><tr><td class="title">Figure 6</td></tr></table>
  <p>
    The 100 point uniform sample of the two regions clearly shows that points in the region of the rightmost front, marked with + symbols, are dominated by points in the region of the leftmost, marked with x symbols. The evolution process during our simulation has therefore converged on the portion of the optimal front located in the generally better region.
  </p><p>
    So presumably, if our <tt class="code">example_biochem</tt> were to have several mutually dominant regions, we should expect to find individuals populating many of them. Well, sometimes, as Figure 7 illustrates.
  </p>
<table class="sidebartable"><tr><td><img src="/content/images/journals/ol88/harris/Figure7a.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure7b.png" hspace="5" vspace="5"/>
</td></tr><tr><td class="title">Figure 7</td></tr></table>
  <p>
    In this case the front is formed from 3 separate regions, of which 2 are represented in the final <tt class="code">population</tt>. Such regions will not necessarily persist for the duration of a simulation, however. In many cases multiple optimal regions will be populated part way through a simulation, only to disappear by the end. This is due to an effect known as genetic drift, which is also observed in the natural world [<a href="#Frankham02">Frankham02</a>].
  </p><p>
    In a small population, a less densely occupied region has a relatively large risk of being out competed by a more densely occupied region. The latter will likely have a greater number of dominant <tt class="code">individual</tt>s and hence a better chance of representation after selection. The cumulative effect is that the population can converge on a single region, even if that region is not quantitatively better than the other. This can be mitigated with geographically separated sub <tt class="code">population</tt>s or, in the terms of our model, several independent simulations. If the loss of diversity is solely due to genetic drift, different simulations will converge on different optimal regions and the combination of the final states will yield a more complete picture of the optimal front.
  </p><p>
    Returning to the argument that evolution cannot create information, only destroy it, one could argue that the success of our simulation is due to the initial random distribution of <tt class="code">individual</tt>s in the <tt class="code">population</tt>. Could evolution simply be concentrating on the best region of the initial sample, rather than seeking out novelty?
  </p><p>
    This question is easily answered by forcing the <tt class="code">individual</tt>s in the initial <tt class="code">population</tt> to start at the same point. This requires a couple of minor changes to the <tt class="code">individual</tt> and <tt class="code">population</tt> classes.
  </p><p>
    Listing 13 shows the new constructors we need to add to these classes.
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    namespace evolve
    {
      class individual
      {
      public:
        ...
        individual(unsigned long init_val,
           const biochem &amp;b);
        ...
      };
      class population
      {
      public:
        ...
        population(size_t n, unsigned long init_val,
           const biochem &amp;b);
        ...
      };
    }
</pre></td></tr><tr><td class="title">Listing 13</td></tr></table>
<p>
    Their implementation is pretty straightforward, replacing the random initialisation of the phenome with assignment to the initial value. (See Listing 14.)
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    evolve::individual::individual(
       unsigned long init_val,
       const biochem &amp;biochem) :
       biochem_(&amp;biochem),
       genome_(biochem.genome_size(), init_val)
    {
      develop();
    }
    evolve::population::population(size_t n,
       unsigned long init_val,
       const biochem &amp;biochem) : biochem_(biochem),
       population_(n, individual(init_val, biochem)),
       offspring_(2*n)
    {
    }
</pre></td></tr><tr><td class="title">Listing 14</td></tr></table>
<p>
    Note that we don't call <tt class="code">reset</tt> in the new <tt class="code">population</tt> constructor since this time we want all of the <tt class="code">individual</tt>s to be the same.
  </p><p>
    Figure 8 shows the results of repeating our original simulation with an initial <tt class="code">population</tt> formed entirely from <tt class="code">individual</tt>s with zero initialised genomes.
  </p>
<table class="sidebartable"><tr><td><img src="/content/images/journals/ol88/harris/Figure8a.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure8b.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure8c.png" hspace="5" vspace="5"/> <img src="/content/images/journals/ol88/harris/Figure8d.png" hspace="5" vspace="5"/>
</td></tr><tr><td class="title">Figure 8</td></tr></table>
  <p>
    Clearly, the initial distribution seems to have had little impact on the final state of the <tt class="code">population</tt>.
  </p><p>
    So, given that our simulation has converged on the optimal set of trade offs, or at least the most stable of them, despite starting far from that set, where does the information actually come from?
  </p><p>
    Well, one further criticism that has been made is that these kinds of simulations somehow inadvertently encode the answers into the process; that we have unconsciously cheated and hidden the solution in the code.
  </p><p>
    You may be surprised, but I am willing to concede this point. The information describing the best <tt class="code">individual</tt>s <span style="  font-style: italic; font-weight: normal; vertical-align: baseline">is</span> hidden in the code. Specifically, it's in <tt class="code">example_biochem</tt>. Whilst we may find it difficult to spot which genomes are optimal simply by examining the complex trade offs between the two functions, it does not mean that the information is not there. The Pareto optimal front exists, whether or not it's easy for us to identify.
  </p><p>
    However, I do not agree that this represents a weakness in our model.
  </p><p>
    Just as the information describing the Pareto optimal front is written into our <tt class="code">example_biochem</tt>, so the information describing the rich tapestry of life we find around us is written into the laws of nature; into physics and chemistry. We simply do not have the wherewithal to read it.
  </p><p>
    Evolution, however, suffers no such illiteracy. It may not create information, but it is supremely effective at distilling it from the environment in which it operates.
  </p><p>
    The extraordinary power of evolution has not escaped the computer science community. From its beginnings in the 1960s and 1970s [<a href="#Rechenberg65">Rechenberg65</a>] [<a href="#Klockgether70">Klockgether70</a>] [<a href="#Holland75">Holland75</a>] the field of evolutionary computing has blossomed [<a href="#Goldberg89">Goldberg89</a>] [<a href="#Koza92">Koza92</a>] [<a href="#Vose99">Vose99</a>]. Whilst the details generally differ from those of our simulation, the general principles are the same. The quality of a genome is measured by a function, or functions, that model a design problem, say improving the efficiency and reducing the emissions of a diesel engine [<a href="#Hiroyasu02">Hiroyasu02</a>]. Through reproduction and selection, evolution has repeatedly proven capable of extracting optimal, or at least near optimal, solutions to problems that have previously evaded us [<a href="#Hiroyasu02">Hiroyasu02</a>].
  </p><p>
    There are still some aspects of our model that could use some improvement, however. For example, we are not modelling the effect of limited resources during the development of an <tt class="code">individual</tt>. If you have the time and the inclination, you might consider adapting the code to reflect this, perhaps by introducing some penalty to <tt class="code">individual</tt>s in densely populated regions.
  </p><p>
    If you make any further discoveries, I'd be delighted to hear about them.</p><h2>
    Acknowledgements
  </h2><p>
    With thanks to Keith Garbutt and Lee Jackson for proof reading this article.
  </p><h2>
    References &amp; Further Reading
  </h2><p class="bibliomixed">
    [<a name="Frankham02"></a>Frankham02] Frankham, R., Ballou, J. and Briscoe, D., <i>Introduction to Conservation Genetics</i>, Cambridge University Press, 2002.
  </p><p class="bibliomixed">
    [<a name="Goldberg89"></a>Goldberg89] Goldberg, D., <i>Genetic Algorithms in Search, Optimization, and Machine Learning</i>, Addison-Wesley, 1989.
  </p><p class="bibliomixed">
    [<a name="Hiroyasu02"></a>Hiroyasu02] Hiroyasu, T. et al., <i>Multi-Objective Optimization of Diesel Engine Emissions and Fuel Economy using Genetic Algorithms and Phenomenological Model</i>, Society of Automotive Engineers, 2002.
  </p><p class="bibliomixed">
    [<a name="Holland75"></a>Holland75] Holland, J., <i>Adaptation in Natural and Artificial Systems</i>, University of Michigan Press, 1975.
  </p><p class="bibliomixed">
    Karr, C. and Freeman, L. (Eds.), <i>Industrial Applications of Genetic Algorithms</i>, CRC, 1998.
  </p><p class="bibliomixed">
    [<a name="Klockgether70"></a>Klockgether70] Klockgether, J. and Schwefel, H., 'Two-Phase Nozzle and Hollow Core Jet Experiments', <i>Proceedings of the 11th Symposium on Engineering Aspects of Magnetohydrodynamics</i>, Californian Institute of Technology, 1970.
  </p><p class="bibliomixed">
    [<a name="Koza92"></a>Koza92] Koza, J., <i>Genetic Programming: On the Programming of Computers by Means of Natural Selection</i>, MIT Press, 1992.
  </p><p class="bibliomixed">
    [<a name="Meinkel97"></a>Meinkel97] Meinke1, M., Abdelfattah1, A. and Krause1, E., 'Simulation of piston engine flows in realistic geometries', <i>Proceedings of the Fifteenth International Conference on Numerical Methods in Fluid Dynamics</i>, vol. 490, pp. 195-200, Springer Berlin, 1997.
  </p><p class="bibliomixed">
    [<a name="Rechenberg65"></a>Rechenberg65] Rechenberg, I., <i>Cybernetic Solution Path of an Experimental Problem</i>, Royal Aircraft Establishment, Library Translation 1122, 1965.
  </p><p class="bibliomixed">
    [<a name="Vose99"></a>Vose99] Vose, M., <i>The Simple Genetic Algorithm: Foundations and Theory</i>, MIT Press, 1999.
  </p>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
