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

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Thu Oct 9 18:36:21 PDT 2008


Author: hjg
Date: 2008-10-09 21:36:21 -0400 (Thu, 09 Oct 2008)
New Revision: 2828

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-10-10 01:21:22 UTC (rev 2827)
+++ branches/hjg-dev/source/main/cStats.cc	2008-10-10 01:36:21 UTC (rev 2828)
@@ -1725,6 +1725,7 @@
 	int max_rep = 0;
 	int cur_rep;
 	int pop_size = 0;
+	int num_alt =0;
 	
 	df.WriteComment("Avida organism reputation information -- average donations, min donations, max donations");
 	df.WriteTimeStamp();
@@ -1741,12 +1742,15 @@
 		if (max_rep < cur_rep) max_rep = cur_rep;
 		reputations += cur_rep;
 		pop_size++;
+		
+		if (cur_rep > 0) num_alt++;
 	  }
 	}
 	float rep = reputations/pop_size;
 	df.Write(rep, "Avg. reputation");
 	df.Write(min_rep, "Minimum reputation");
 	df.Write(max_rep, "Maximum reputation");
+	df.Write(num_alt, "Number of altruists");
 
 	
   df.Endl();




More information about the Avida-cvs mailing list