[Avida-SVN] r3024 - branches/hjg-dev/source/main
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Fri Dec 12 08:39:28 PST 2008
Author: hjg
Date: 2008-12-12 11:39:27 -0500 (Fri, 12 Dec 2008)
New Revision: 3024
Modified:
branches/hjg-dev/source/main/cTaskLib.cc
Log:
modified the MatchString task reward to directly reflect the number of bits matched
Modified: branches/hjg-dev/source/main/cTaskLib.cc
===================================================================
--- branches/hjg-dev/source/main/cTaskLib.cc 2008-12-12 04:10:58 UTC (rev 3023)
+++ branches/hjg-dev/source/main/cTaskLib.cc 2008-12-12 16:39:27 UTC (rev 3024)
@@ -2068,7 +2068,10 @@
double bonus = 0.0;
// return value between 0 & 1 representing the percentage of string that was matched
- double base_bonus = static_cast<double>(max_num_matched) * 2.0 / static_cast<double>(string_to_match.GetSize()) - 1;
+ // 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());
+
if (partial)
{
base_bonus=double(max_num_matched)*2/double(num_real) -1;
More information about the Avida-cvs
mailing list