[Avida-SVN] r3092 - branches/hjg-dev/source/main
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Wed Jan 7 05:59:54 PST 2009
Author: hjg
Date: 2009-01-07 08:59:54 -0500 (Wed, 07 Jan 2009)
New Revision: 3092
Modified:
branches/hjg-dev/source/main/cTaskLib.cc
Log:
Fixed an oddity in the MatchString task that enabled specialists to receive partial credit for strings that they could not produce.
Modified: branches/hjg-dev/source/main/cTaskLib.cc
===================================================================
--- branches/hjg-dev/source/main/cTaskLib.cc 2009-01-05 17:10:47 UTC (rev 3091)
+++ branches/hjg-dev/source/main/cTaskLib.cc 2009-01-07 13:59:54 UTC (rev 3092)
@@ -2009,11 +2009,18 @@
if (prod) max_num_matched = string_to_match.GetSize();
}
- // Update the organism's tag.
+
+ // Update the organism's tag. If the organism is a strict specialist then
+ // make sure it
ctx.GetOrganism()->UpdateTag(tag, max_num_matched);
if (ctx.GetOrganism()->GetTagLabel() == tag) {
ctx.GetOrganism()->SetLineageLabel(ctx.GetTaskEntry()->GetArguments().GetInt(2));
+ } else if (m_world->GetConfig().SPECIALISTS.Get()) {
+ max_num_matched = 0;
}
+
+
+
// Update stats
cString name;
name = "[produced";
More information about the Avida-cvs
mailing list