[Avida-SVN] r2247 - branches/uml/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Tue Jan 1 06:58:38 PST 2008


Author: hjg
Date: 2008-01-01 09:58:38 -0500 (Tue, 01 Jan 2008)
New Revision: 2247

Modified:
   branches/uml/source/main/cUMLModel.cc
   branches/uml/source/main/cUMLStateDiagram.cc
Log:
Changed the rewards for scenarios to be 1 per step, rather than a percentage complete.



Modified: branches/uml/source/main/cUMLModel.cc
===================================================================
--- branches/uml/source/main/cUMLModel.cc	2007-12-28 20:12:26 UTC (rev 2246)
+++ branches/uml/source/main/cUMLModel.cc	2008-01-01 14:58:38 UTC (rev 2247)
@@ -332,7 +332,10 @@
 		complete_bonus = s.path.size() + s.shouldLoop; 
 		if (s.startState >= 0) complete_bonus++;
 		
-		total_bonus += (temp_bonus / complete_bonus);
+		// The next line is commented out to increase the reward for a given scenario. 
+		// total_bonus += (temp_bonus / complete_bonus);
+		total_bonus += temp_bonus;
+		
 	scenario_completion[i] = temp_bonus / complete_bonus;
 	}
 		

Modified: branches/uml/source/main/cUMLStateDiagram.cc
===================================================================
--- branches/uml/source/main/cUMLStateDiagram.cc	2007-12-28 20:12:26 UTC (rev 2246)
+++ branches/uml/source/main/cUMLStateDiagram.cc	2008-01-01 14:58:38 UTC (rev 2247)
@@ -75,7 +75,6 @@
 // of the longest path segment that the diagram satisfies. 
 // The function is complicated by the fact that the longest path segment could start at the 
 // beginning, middle, or end of the path itself. 
-// Currently the path must begin at the 0 vertex. 
 int cUMLStateDiagram::findPath(std::deque<std::string> p, bool should_loop, int start_state) { 
 	unsigned int path_dist = 0; // the current path distance satisfied is 0. 
 //	int path_longest_length = 0; 




More information about the Avida-cvs mailing list