Index: cpp/frams/genetics/f4/f4_oper.cpp
===================================================================
--- cpp/frams/genetics/f4/f4_oper.cpp	(revision 1227)
+++ cpp/frams/genetics/f4/f4_oper.cpp	(revision 1228)
@@ -13,7 +13,7 @@
 // TODO getting rid of redundancy (having valid genotypes with a lot of "junk code") in this representation looks like a good idea.
 // 
-// Note: symbols after the last > are ignored, for example /*4*/<X>N:N>N:N[2:-0.5]XXXwhatever but since they are not parsed into the f4_Node tree, they will be lost after any mutation.
+// Note: symbols after the last > are ignored, for example /*4*/<X>N:N>blablaN:N[2:-0.5]XXXwhatever but since they are not parsed into the f4_Node tree, they will be lost after any mutation.
 //
-// TODO the behavior of neuron input indexes during mutation seems badly implemented (see also TREAT_BAD_CONNECTIONS_AS_ERRORS). Are they kept properly maintained when nodes are added and removed? This could be done well because during mutation we operate on the tree structure with cross-references between nodes (so they should not be affected by local changes in the tree), and then convert the tree back to string. Yet, the f4_Node.conn_from is an integer and these fields in nodes do not seem to be maintained on tree node adding/removal... change these integer offsets to references to node objects? But actually, do the offsets that constitute relative connection references concern the f4_Node tree structure (and all these sophisticated calculations of offsets during mutation are useful) or rather they concern the f4_Cells development? verify all situations in f4_Cell::oneStep(), case '['.
+// TODO the behavior of neuron input indexes during mutation seems badly implemented (see also TREAT_BAD_CONNECTIONS_AS_INVALID_GENO). Are they kept properly maintained when nodes are added and removed? This could be done well because during mutation we operate on the tree structure with cross-references between nodes (so they should not be affected by local changes in the tree), and then convert the tree back to string. Yet, the f4_Node.conn_from is an integer and these fields in nodes do not seem to be maintained on tree node adding/removal... change these integer offsets to references to node objects? But actually, do the offsets that constitute relative connection references concern the f4_Node tree structure (and all these sophisticated calculations of offsets during mutation are useful) or rather they concern the f4_Cells development? verify all situations in f4_Cell::oneStep(), case '['.
 // TODO add simplifying sequences of modifiers (so capital and small letter cancel out, like in f1) - but seems like each single modifier is a separate f4_Node? and perhaps we don't want to use the repair mechanism for this... maybe mutations, when they add/modify/remove a modifier node, should be "cleaning" the tree by removing nodes when they encounter contradictory modifiers on the same subpath?
 // TODO add support for properties of (any class of) neurons - not just sigmoid/force/intertia (':' syntax) for N
@@ -122,5 +122,5 @@
 	// convert geno to tree, then try to validate 20 times
 	f4_Node root;
-	if (f4_processrec(geno, 0, &root) || root.childCount() != 1) return GENOPER_OK; // cannot repair
+	if (f4_processRecur(geno, 0, &root) || root.childCount() != 1) return GENOPER_OK; // cannot repair
 	if (ValidateRec(&root, 20) == GENOPER_REPAIR) // if repaired, make it back to string
 	{
@@ -135,5 +135,5 @@
 {
 	f4_Node root;
-	int res = f4_processrec(geno, 0, &root);
+	int res = f4_processRecur(geno, 0, &root);
 	if (res) return res;  // errorpos, >0
 	if (root.childCount() != 1) return 1; //earlier: GENOPER_OPFAIL
@@ -208,5 +208,5 @@
 							// The "false" argument in findConnectionNeuronIndexes() below is not suffient, because we also need to access (find) the f4_Node of the other neuron.
 							// A similar logic is implemented in F4_ADD_CONN below, but let's not complicate this F4_ADD_DIV mutation anymore.
-							// A disadvantage is that the node_new_neuron added here which is a neuron that provides output (e.g., a receptor, N, etc.) will not get connected immediately here even when there are already existing neurons wanting inputs (e.g., muscles, N, etc.).
+							// The disadvantage is that the node_new_neuron added here which is a neuron that provides output (e.g., a receptor, N, etc.) will not get connected immediately here even when there are already existing neurons wanting inputs (e.g., muscles, N, etc.).
 							//bool ok = findConnectionNeuronIndexes(g, ... , false, ..., ...);
 						}
@@ -230,5 +230,5 @@
 
 			// the probability that a randomly selected node will be a neuron and additionally this neuron will accept inputs is low,
-			// so we disregard randomly picked node_mutated and build a list of all valid candidate nodes here, then select a random one from them.
+			// so we disregard randomly picked node_mutated and build a list of all valid candidate nodes here, then randomly select one from them.
 
 			vector<f4_Node*> candidate_nodes; //neurons that accept input(s)
@@ -476,5 +476,5 @@
 	// relative input connection to some existing neuron
 	nn->conn_from = nn_index - other_index;
-	//nn->conn_from = (int)(4.0f * (rndDouble(1) - 0.5f)); //in very old times - did not care about neuron input/output preferences
+	//nn->conn_from = (int)(4.0f * (rndDouble(1) - 0.5)); //in very old times - did not care about neuron input/output preferences
 
 	nn->conn_weight = GenoOperators::getMutatedNeuronConnectionWeight(nn->conn_weight);
@@ -493,5 +493,5 @@
 void Geno_f4::repeatNodeChangeRandom(f4_Node *nn) const
 {
-	if (rndDouble(1) < 0.5f) nn->reps++; else nn->reps--; // change count
+	if (rndDouble(1) < 0.5) nn->reps++; else nn->reps--; // change count
 	if (nn->reps < 1) nn->reps = 1;
 	if (nn->reps > mut_max_rep) nn->reps = mut_max_rep;
@@ -547,5 +547,5 @@
 {
 	f4_Node *root = new f4_Node;
-	if (f4_processrec(g, 0, root) || root->childCount() != 1)
+	if (f4_processRecur(g, 0, root) || root->childCount() != 1)
 	{
 		delete root;
@@ -607,5 +607,5 @@
 
 // decide number of nodes to mutate
-n = (int)( 0.5f + rndDouble(1) * maxToMut );
+n = (int)( 0.5 + rndDouble(1) * maxToMut );
 if (n<1) n=1;
 if (n>totNodes) n=totNodes;
@@ -671,6 +671,6 @@
 
 	// convert genotype strings into tree structures
-	if (f4_processrec(g1, 0, &root1) || (root1.childCount() != 1)) return GENOPER_OPFAIL;
-	if (f4_processrec(g2, 0, &root2) || (root2.childCount() != 1)) return GENOPER_OPFAIL;
+	if (f4_processRecur(g1, 0, &root1) || (root1.childCount() != 1)) return GENOPER_OPFAIL;
+	if (f4_processRecur(g2, 0, &root2) || (root2.childCount() != 1)) return GENOPER_OPFAIL;
 
 	// decide amounts of crossover, 0.25-0.75
