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

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Mon Dec 22 16:51:55 PST 2008


Author: hjg
Date: 2008-12-22 19:51:55 -0500 (Mon, 22 Dec 2008)
New Revision: 3074

Modified:
   branches/hjg-dev/source/main/cStats.cc
Log:
more stats

Modified: branches/hjg-dev/source/main/cStats.cc
===================================================================
--- branches/hjg-dev/source/main/cStats.cc	2008-12-23 00:44:22 UTC (rev 3073)
+++ branches/hjg-dev/source/main/cStats.cc	2008-12-23 00:51:55 UTC (rev 3074)
@@ -1844,6 +1844,7 @@
 //	int pop_size = 0;
 	int num_alt =0;
 	int num_coop = 0;
+	int perfect =0;
 	
 	// Set up the stats tracking for the strings.
 	// print the tags
@@ -1889,10 +1890,13 @@
 //		other_raw_mat.Add(org->GetOtherRawMaterials());
 			
 		// Update raw materials. 
+			int type_rec =0;
 			for (iter2 = tag_results.begin(); iter2 != tag_results.end(); iter2++) { 
 				tag_results[iter2->first].Add(org->GetRawMaterialAmount(iter2->first));
+				if (org->GetRawMaterialAmount(iter2->first) > 0) type_rec++;
 			}		
-
+			if (type_rec == tag_results.size()) perfect++;
+			
 		reciprocations.Add(org->GetNumberOfReciprocations());
 		donors.Add(org->GetNumberOfDonors());
 		num_failed_reputation_inc.Add(org->GetFailedReputationIncreases());
@@ -1929,7 +1933,9 @@
 		df.Write(iter2->second.Average(), my_strings[iter2->first]);
 	}		
 	
+	df.Write(perfect, "Number of orgs with all strings [perfect]");
 	
+	
 //	df.Write(k.Average(), "Avg. k of organisms [k]");
 //	df.Write(m_donate_to_donor, "Number of donate to donor [donatedonor]");
 //	df.Write(m_donate_to_facing, "Number of donate to facing [donatefacing]");




More information about the Avida-cvs mailing list