[Avida-SVN] r3088 - branches/hjg-dev/source/main
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Sat Jan 3 16:40:56 PST 2009
Author: hjg
Date: 2009-01-03 19:40:55 -0500 (Sat, 03 Jan 2009)
New Revision: 3088
Modified:
branches/hjg-dev/source/main/cAvidaConfig.h
branches/hjg-dev/source/main/cTaskLib.cc
Log:
Modified: branches/hjg-dev/source/main/cAvidaConfig.h
===================================================================
--- branches/hjg-dev/source/main/cAvidaConfig.h 2009-01-03 16:52:18 UTC (rev 3087)
+++ branches/hjg-dev/source/main/cAvidaConfig.h 2009-01-04 00:40:55 UTC (rev 3088)
@@ -572,6 +572,7 @@
CONFIG_ADD_VAR(INHERIT_REPUTATION, int, 0, "0=reputations are not inherited\n1=reputations are inherited\n2=tags are inherited");
CONFIG_ADD_VAR(SPECIALISTS, int, 0, "0=generalists allowed\n1=only specialists");
CONFIG_ADD_VAR(STRING_AMOUNT_CAP, int, -1, "-1=no cap on string amounts\n#=CAP");
+ CONFIG_ADD_VAR(MATCH_ALREADY_PRODUCED, int, 0, "0=off\n1=on");
#endif
Modified: branches/hjg-dev/source/main/cTaskLib.cc
===================================================================
--- branches/hjg-dev/source/main/cTaskLib.cc 2009-01-03 16:52:18 UTC (rev 3087)
+++ branches/hjg-dev/source/main/cTaskLib.cc 2009-01-04 00:40:55 UTC (rev 3088)
@@ -2002,9 +2002,12 @@
// Check if the organism already produced this string.
// If so, it receives a perfect score for this task.
int tag = ctx.GetTaskEntry()->GetArguments().GetInt(2);
- int prod = ctx.GetOrganism()->GetNumberStringsProduced(tag);
- if (prod) max_num_matched = string_to_match.GetSize();
+ if (m_world->GetConfig().MATCH_ALREADY_PRODUCED.Get()) {
+ int prod = ctx.GetOrganism()->GetNumberStringsProduced(tag);
+ if (prod) max_num_matched = string_to_match.GetSize();
+ }
+
// Update the organism's tag.
ctx.GetOrganism()->UpdateTag(tag, max_num_matched);
if (ctx.GetOrganism()->GetTagLabel() == tag) {
More information about the Avida-cvs
mailing list