[Avida-SVN] r3064 - in branches/hjg-dev/source: cpu main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Fri Dec 19 13:46:02 PST 2008


Author: hjg
Date: 2008-12-19 16:46:02 -0500 (Fri, 19 Dec 2008)
New Revision: 3064

Modified:
   branches/hjg-dev/source/cpu/cHardwareCPU.cc
   branches/hjg-dev/source/main/cTaskLib.cc
Log:
changed allstrings to be a percentage of the string that is right

Modified: branches/hjg-dev/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/hjg-dev/source/cpu/cHardwareCPU.cc	2008-12-19 14:49:38 UTC (rev 3063)
+++ branches/hjg-dev/source/cpu/cHardwareCPU.cc	2008-12-19 21:46:02 UTC (rev 3064)
@@ -7425,7 +7425,7 @@
 			if (strings_to_match.size()) len = strings_to_match[0].GetSize();
 		//	organism->SetAverageReputation(max);
 			int rep = (max - floor(len/2));
-			if (rep > 0) organism->SetAverageReputation(rep);
+			if (rep > 0) organism->AddReputation(rep);
 		
 		
 		}
@@ -7475,4 +7475,4 @@
 {
 	organism->SetStringCatter(true);
 	return true;
-}
\ No newline at end of file
+}

Modified: branches/hjg-dev/source/main/cTaskLib.cc
===================================================================
--- branches/hjg-dev/source/main/cTaskLib.cc	2008-12-19 14:49:38 UTC (rev 3063)
+++ branches/hjg-dev/source/main/cTaskLib.cc	2008-12-19 21:46:02 UTC (rev 3064)
@@ -2169,8 +2169,9 @@
 	
 	if (sum_matched == total_size) {
 		m_world->GetStats().IncPerfectMatch();
-		bonus = 1.0;
 	}
+
+	bonus = sum_matched/total_size;
 	
   return bonus;
 }




More information about the Avida-cvs mailing list