[Avida-SVN] r3025 - branches/hjg-dev/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Fri Dec 12 10:29:11 PST 2008


Author: hjg
Date: 2008-12-12 13:29:11 -0500 (Fri, 12 Dec 2008)
New Revision: 3025

Modified:
   branches/hjg-dev/source/main/cPopulation.cc
   branches/hjg-dev/source/main/cTaskLib.cc
Log:
added inheritance for tagging and rolled back the fitness value change. 

Modified: branches/hjg-dev/source/main/cPopulation.cc
===================================================================
--- branches/hjg-dev/source/main/cPopulation.cc	2008-12-12 16:39:27 UTC (rev 3024)
+++ branches/hjg-dev/source/main/cPopulation.cc	2008-12-12 18:29:11 UTC (rev 3025)
@@ -359,6 +359,7 @@
 		// to that of its parent.
 		if (m_world->GetConfig().INHERIT_REPUTATION.Get()) {
 			child_array[i]->SetReputation(parent_organism.GetReputation()); 
+			child_array[i]->SetTag(parent_organism.GetTag()); 
 		}
   }
   

Modified: branches/hjg-dev/source/main/cTaskLib.cc
===================================================================
--- branches/hjg-dev/source/main/cTaskLib.cc	2008-12-12 16:39:27 UTC (rev 3024)
+++ branches/hjg-dev/source/main/cTaskLib.cc	2008-12-12 18:29:11 UTC (rev 3025)
@@ -2068,9 +2068,7 @@
   double bonus = 0.0;
   // return value between 0 & 1 representing the percentage of string that was matched
 	
-	// commenting out Sherri's fitness function to try a straight bits matched approach
-  //double base_bonus = static_cast<double>(max_num_matched) * 2.0 / static_cast<double>(string_to_match.GetSize()) - 1;
-  double base_bonus = static_cast<double>(max_num_matched) / static_cast<double>(string_to_match.GetSize());
+  double base_bonus = static_cast<double>(max_num_matched) * 2.0 / static_cast<double>(string_to_match.GetSize()) - 1;
 
   if (partial)
   {




More information about the Avida-cvs mailing list