[Avida-SVN] r1537 - branches/dkdev/source/main

dknoester at myxo.css.msu.edu dknoester at myxo.css.msu.edu
Thu May 10 07:57:30 PDT 2007


Author: dknoester
Date: 2007-05-10 10:57:30 -0400 (Thu, 10 May 2007)
New Revision: 1537

Modified:
   branches/dkdev/source/main/cPopulation.cc
Log:
Logging changes.

Modified: branches/dkdev/source/main/cPopulation.cc
===================================================================
--- branches/dkdev/source/main/cPopulation.cc	2007-05-10 13:28:55 UTC (rev 1536)
+++ branches/dkdev/source/main/cPopulation.cc	2007-05-10 14:57:30 UTC (rev 1537)
@@ -922,31 +922,32 @@
             double max_lsp = world_x * world_y/num_demes * 0.75;
           
             source_germline.UpdateMerit(pow(max_edges - boost::num_edges(network)+1, 2)
-                                        + pow(max_lsp - mean_lsp + 1, 2));            
-            
-            // Now, update this deme's merit.
-            // This particular calculation doesn't work well; it rewards small diameter and small number of edges equally.
-            // The end result is a network that favors low edge count, with little bias towards diameter.
-            //source_germline.UpdateMerit(pow(max_lsp - mean_lsp + 1, 2) // This is for mean lsp.
-            //                          + pow(max_edges - boost::num_edges(network) + 1, 2));
-            //
-            // This one however, is perhaps better.  We reward low diameter the most, scaled by the maximum possible
-            // number of edges.  Then, we reduce this number by the actual number of edges, and square it.
-            // This fitness function is the opposite of the above.  Here, low diameter is favored, resulting in nearly
-            // full networks.
-            //source_germline.UpdateMerit(pow((max_lsp - mean_lsp + 1) * max_edges - boost::num_edges(network), 2));
-            //
-            // Let's try to balance these out a bit.  We're looking for a network that has both low diameter
-            // and few edges.
-            //source_germline.UpdateMerit(pow((max_lsp-mean_lsp+1)*(max_edges-boost::num_edges(network)+1),2));
-            //
-            // That didn't work either.  Let's try normalizing and scaling.
-            //source_germline.UpdateMerit(pow(
-            //                            (max_lsp-mean_lsp)/max_lsp
-            //                            + (max_edges-boost::num_edges(network))/max_edges
-            //                            + 1, 
-            //                            );
-            }
+                                        + pow(max_lsp - mean_lsp + 1, 2));
+            m_world->GetStats().ConnectedTopology(source_deme, mean_lsp);
+          }
+          
+          // Now, update this deme's merit.
+          // This particular calculation doesn't work well; it rewards small diameter and small number of edges equally.
+          // The end result is a network that favors low edge count, with little bias towards diameter.
+          //source_germline.UpdateMerit(pow(max_lsp - mean_lsp + 1, 2) // This is for mean lsp.
+          //                          + pow(max_edges - boost::num_edges(network) + 1, 2));
+          //
+          // This one however, is perhaps better.  We reward low diameter the most, scaled by the maximum possible
+          // number of edges.  Then, we reduce this number by the actual number of edges, and square it.
+          // This fitness function is the opposite of the above.  Here, low diameter is favored, resulting in nearly
+          // full networks.
+          //source_germline.UpdateMerit(pow((max_lsp - mean_lsp + 1) * max_edges - boost::num_edges(network), 2));
+          //
+          // Let's try to balance these out a bit.  We're looking for a network that has both low diameter
+          // and few edges.
+          //source_germline.UpdateMerit(pow((max_lsp-mean_lsp+1)*(max_edges-boost::num_edges(network)+1),2));
+          //
+          // That didn't work either.  Let's try normalizing and scaling.
+          //source_germline.UpdateMerit(pow(
+          //                            (max_lsp-mean_lsp)/max_lsp
+          //                            + (max_edges-boost::num_edges(network))/max_edges
+          //                            + 1, 
+          //                            );
         }          
         break;
       }




More information about the Avida-cvs mailing list