Index: cpp/frams/genetics/fn/conv_fn.cpp
===================================================================
--- cpp/frams/genetics/fn/conv_fn.cpp	(revision 763)
+++ 	(revision )
@@ -1,82 +1,0 @@
-// This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
-// See LICENSE.txt for details.
-
-#include "conv_fn.h"
-#include <frams/vm/classes/collectionobj.h>
-
-GenoConv_fn0::GenoConv_fn0()
-{
-	name = "Vector of real values, no phenotype"; //for numerical optimization; custom fitness function must be provided in script. See oper_fn.cpp for more details.
-	in_format = 'n';
-	out_format = '0';
-	mapsupport = 0;
-}
-
-
-
-SString GenoConv_fn0::convert(SString &in, MultiMap *map, bool using_checkpoints)
-{
-	vector<double> values = stringToVector(in.c_str());
-	if (values.size() == 0) //invalid input genotype?
-		return ""; //so we return an invalid f0 genotype
-
-	return SString("p:\n"); //phenotype not relevant for this genetic encoding
-}
-
-
-
-vector<double> GenoConv_fn0::stringToVector(const char *input) //returns empty vector on error
-{
-	vector<double> empty;
-	ExtValue val;
-	const char* after_des = val.deserialize(input);
-	if (after_des == NULL) //deserialization failed
-	{
-		logPrintf("GenoConv_fn0", "stringToVector", LOG_ERROR, "Unable to deserialize - expecting a vector of real values, got '%s'", input);
-		return empty;
-	}
-	if (after_des[0] != '\0') //not everything was consumed
-	{
-		logPrintf("GenoConv_fn0", "stringToVector", LOG_ERROR, "Extra characters after deserialized '%s'", input);
-		return empty;
-	}
-
-	VectorObject *vec = VectorObject::fromObject(val.getObject(), false);
-	if (vec)
-	{
-		vector<double> output;
-		for (int i = 0; i < vec->data.size(); i++)
-		{
-			ExtValue* val = (ExtValue*)vec->data(i);
-			if (val == NULL)
-			{
-				logPrintf("GenoConv_fn0", "stringToVector", LOG_ERROR, "Expecting a real value in a vector, got NULL");
-				return empty;
-			}
-			else
-				output.push_back(val->getDouble());
-		}
-		return output;
-	}
-	else
-	{
-		logPrintf("GenoConv_fn0", "stringToVector", LOG_ERROR, "Expecting a vector of real values, got '%s'", input);
-		return empty;
-	}
-}
-
-
-string GenoConv_fn0::vectorToString(const vector<double> vec)
-{
-	char buffer[32];
-	string out = "[";
-	for (unsigned int i = 0; i < vec.size(); i++)
-	{
-		if (i > 0)
-			out += ", ";
-		snprintf(buffer, sizeof(buffer), "%.8g", vec[i]);
-		out += buffer; //+= std::to_string(1.23) still not available in embarcadero 10.2.3
-	}
-	return out + "]";
-}
Index: cpp/frams/genetics/fn/conv_fn.h
===================================================================
--- cpp/frams/genetics/fn/conv_fn.h	(revision 763)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
-// See LICENSE.txt for details.
-
-#ifndef _CONV_Fn_H_
-#define _CONV_Fn_H_
-
-#include <frams/genetics/genoconv.h>
-
-// The fn->f0 converter
-class GenoConv_fn0 : public GenoConverter
-{
-public:
-	GenoConv_fn0();
-	//~GenoConv_fn0();
-	//implementation of the GenoConverter method
-	SString convert(SString &in, MultiMap *map, bool using_checkpoints);
-
-	static vector<double> stringToVector(const char *input); //returns empty vector on error
-	static string vectorToString(const vector<double> vec);
-};
-
-#endif
Index: cpp/frams/genetics/fn/fn_conv.cpp
===================================================================
--- cpp/frams/genetics/fn/fn_conv.cpp	(revision 779)
+++ cpp/frams/genetics/fn/fn_conv.cpp	(revision 779)
@@ -0,0 +1,82 @@
+// This file is a part of Framsticks SDK.  http://www.framsticks.com/
+// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// See LICENSE.txt for details.
+
+#include "fn_conv.h"
+#include <frams/vm/classes/collectionobj.h>
+
+GenoConv_fn0::GenoConv_fn0()
+{
+	name = "Vector of real values, no phenotype"; //for numerical optimization; custom fitness function must be provided in script. See oper_fn.cpp for more details.
+	in_format = 'n';
+	out_format = '0';
+	mapsupport = 0;
+}
+
+
+
+SString GenoConv_fn0::convert(SString &in, MultiMap *map, bool using_checkpoints)
+{
+	vector<double> values = stringToVector(in.c_str());
+	if (values.size() == 0) //invalid input genotype?
+		return ""; //so we return an invalid f0 genotype
+
+	return SString("p:\n"); //phenotype not relevant for this genetic encoding
+}
+
+
+
+vector<double> GenoConv_fn0::stringToVector(const char *input) //returns empty vector on error
+{
+	vector<double> empty;
+	ExtValue val;
+	const char* after_des = val.deserialize(input);
+	if (after_des == NULL) //deserialization failed
+	{
+		logPrintf("GenoConv_fn0", "stringToVector", LOG_ERROR, "Unable to deserialize - expecting a vector of real values, got '%s'", input);
+		return empty;
+	}
+	if (after_des[0] != '\0') //not everything was consumed
+	{
+		logPrintf("GenoConv_fn0", "stringToVector", LOG_ERROR, "Extra characters after deserialized '%s'", input);
+		return empty;
+	}
+
+	VectorObject *vec = VectorObject::fromObject(val.getObject(), false);
+	if (vec)
+	{
+		vector<double> output;
+		for (int i = 0; i < vec->data.size(); i++)
+		{
+			ExtValue* val = (ExtValue*)vec->data(i);
+			if (val == NULL)
+			{
+				logPrintf("GenoConv_fn0", "stringToVector", LOG_ERROR, "Expecting a real value in a vector, got NULL");
+				return empty;
+			}
+			else
+				output.push_back(val->getDouble());
+		}
+		return output;
+	}
+	else
+	{
+		logPrintf("GenoConv_fn0", "stringToVector", LOG_ERROR, "Expecting a vector of real values, got '%s'", input);
+		return empty;
+	}
+}
+
+
+string GenoConv_fn0::vectorToString(const vector<double> vec)
+{
+	char buffer[32];
+	string out = "[";
+	for (unsigned int i = 0; i < vec.size(); i++)
+	{
+		if (i > 0)
+			out += ", ";
+		snprintf(buffer, sizeof(buffer), "%.8g", vec[i]);
+		out += buffer; //+= std::to_string(1.23) still not available in embarcadero 10.2.3
+	}
+	return out + "]";
+}
Index: cpp/frams/genetics/fn/fn_conv.h
===================================================================
--- cpp/frams/genetics/fn/fn_conv.h	(revision 779)
+++ cpp/frams/genetics/fn/fn_conv.h	(revision 779)
@@ -0,0 +1,23 @@
+// This file is a part of Framsticks SDK.  http://www.framsticks.com/
+// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// See LICENSE.txt for details.
+
+#ifndef _Fn_CONV_H_
+#define _Fn_CONV_H_
+
+#include <frams/genetics/genoconv.h>
+
+// The fn->f0 converter
+class GenoConv_fn0 : public GenoConverter
+{
+public:
+	GenoConv_fn0();
+	//~GenoConv_fn0();
+	//implementation of the GenoConverter method
+	SString convert(SString &in, MultiMap *map, bool using_checkpoints);
+
+	static vector<double> stringToVector(const char *input); //returns empty vector on error
+	static string vectorToString(const vector<double> vec);
+};
+
+#endif
Index: cpp/frams/genetics/fn/fn_oper.cpp
===================================================================
--- cpp/frams/genetics/fn/fn_oper.cpp	(revision 779)
+++ cpp/frams/genetics/fn/fn_oper.cpp	(revision 779)
@@ -0,0 +1,127 @@
+// This file is a part of Framsticks SDK.  http://www.framsticks.com/
+// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// See LICENSE.txt for details.
+
+#include "fn_oper.h"
+#include "fn_conv.h"
+#include <common/nonstd.h> //randomN, rnd01
+
+
+/**
+\class GenoOper_fn
+
+This genetic representation only stores a vector of real numbers. A fitness function must be provided
+for the gene pool, for example the "Booth function" would be:
+
+var X = String.deserialize(this.geno.rawgenotype); //a vector of real values
+var result = Math.pow(X[0]+2*X[1]-7,2) + Math.pow(2*X[0]+X[1]-5,2);
+return -result; //negation because Framsticks assumes maximization, and the original function needs to be minimized
+*/
+
+
+
+#define FIELDSTRUCT GenoOper_fn
+static ParamEntry GENOfnparam_tab[] =
+{
+	{ "Genetics: fn", 1, 4, },
+	{ "fn_xover", 0, 0, "Inherited in linear mix crossover", "f 0.5 1.0 0.9", FIELD(xover_proportion), "0.5 => children are averaged parents.\n0.8 => children are only 20% different from parents.\n1.0 => each child is identical to one parent (no crossover).", },
+	{ "fn_mut_bound_low", 1, 0, "Lower bounds for mutation", "s 0 0 [-10.0, -10.0]", FIELD(mut_bound_low), "A vector of lower bounds (one real value for each variable)", },
+	{ "fn_mut_bound_high", 1, 0, "Higher bounds for mutation", "s 0 0 [10.0, 10.0]", FIELD(mut_bound_high), "A vector of higher bounds (one real value for each variable)", },
+	{ "fn_mut_stddev", 1, 0, "Standard deviations for mutation", "s 0 0 [0.1, 0.1]", FIELD(mut_stddev), "A vector of standard deviations (one real value for each variable)", },
+	{ 0, },
+};
+#undef FIELDSTRUCT
+
+
+
+GenoOper_fn::GenoOper_fn()
+{
+	par.setParamTab(GENOfnparam_tab);
+	par.select(this);
+	par.setDefault();
+	supported_format = 'n';
+}
+
+int GenoOper_fn::checkValidity(const char* gene, const char *genoname)
+{
+	vector<double> values = GenoConv_fn0::stringToVector(gene);
+	return values.size() > 0 ? GENOPER_OK : 1;
+}
+
+int GenoOper_fn::validate(char *&gene, const char *genoname)
+{
+	vector<double> values = GenoConv_fn0::stringToVector(gene);
+	if (values.size() == 0)
+		values.push_back(0.0);
+	string validated = GenoConv_fn0::vectorToString(values);
+	free(gene);
+	gene = strdup(validated.c_str()); //reallocate
+	return GENOPER_OK;
+}
+
+//Creep-mutate one property
+int GenoOper_fn::mutate(char *&gene, float &chg, int &method)
+{
+	method = 0;
+	vector<double> values = GenoConv_fn0::stringToVector(gene);
+	if (values.size() == 0)
+		return GENOPER_OPFAIL;
+	vector<double> bound_low = GenoConv_fn0::stringToVector(mut_bound_low.c_str());
+	vector<double> bound_high = GenoConv_fn0::stringToVector(mut_bound_high.c_str());
+	vector<double> stddev = GenoConv_fn0::stringToVector(mut_stddev.c_str());
+	if (bound_low.size() != bound_high.size() || bound_high.size() != stddev.size() || stddev.size() != values.size())
+	{
+		logPrintf("GenoOper_fn", "mutate", LOG_ERROR, "The solution vector, bound vectors, and standard deviation vectors must all have the same number of values");
+		return GENOPER_OPFAIL;
+	}
+
+	int which = randomN(values.size());
+	values[which] = GenoOperators::mutateCreep('f', values[which], bound_low[which], bound_high[which], stddev[which], false);
+	string saved = GenoConv_fn0::vectorToString(values);
+	free(gene);
+	gene = strdup(saved.c_str()); //reallocate
+	chg = 1.0f / values.size();
+	return GENOPER_OK;
+}
+
+///Averaging crossover
+int GenoOper_fn::crossOver(char *&g1, char *&g2, float& chg1, float& chg2)
+{
+	//g1 = strdup("[1,0.5,0.5,0.5,0.5,1,1]"); //testing...
+	//g2 = strdup("[4,1,  1,  1,  1,  2,2]"); //testing...
+	//xover_proportion = 0.1; //testing...
+
+	chg1 = xover_proportion;
+	chg2 = 1 - xover_proportion;
+
+	vector<double> v1 = GenoConv_fn0::stringToVector(g1);
+	vector<double> v2 = GenoConv_fn0::stringToVector(g2);
+
+	if (v1.size() != v2.size())
+	{
+		logPrintf("GenoOper_fn", "crossOver", LOG_ERROR, "Tried to cross over solutions with a differing number of variables (%d and %d)", v1.size(), v2.size());
+		return GENOPER_OPFAIL;
+	}
+
+	GenoOperators::linearMix(v1, v2, xover_proportion);
+
+	string saved = GenoConv_fn0::vectorToString(v1);
+	free(g1);
+	g1 = strdup(saved.c_str()); //reallocate
+	saved = GenoConv_fn0::vectorToString(v2);
+	free(g2);
+	g2 = strdup(saved.c_str()); //reallocate
+	return GENOPER_OK;
+}
+
+///Applying some colors and font styles...
+uint32_t GenoOper_fn::style(const char *g, int pos)
+{
+	char ch = g[pos];
+	uint32_t style = GENSTYLE_CS(0, GENSTYLE_INVALID); //default, should be changed below
+	if (strchr("-.e 0123456789", ch) != NULL)
+		style = GENSTYLE_CS(GENCOLOR_NUMBER, GENSTYLE_NONE);
+	else if (strchr("[,]", ch) != NULL)
+		style = GENSTYLE_RGBS(0, 0, 0, GENSTYLE_BOLD);
+	return style;
+}
Index: cpp/frams/genetics/fn/fn_oper.h
===================================================================
--- cpp/frams/genetics/fn/fn_oper.h	(revision 779)
+++ cpp/frams/genetics/fn/fn_oper.h	(revision 779)
@@ -0,0 +1,26 @@
+// This file is a part of Framsticks SDK.  http://www.framsticks.com/
+// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// See LICENSE.txt for details.
+
+#ifndef _Fn_OPER_H_
+#define _Fn_OPER_H_
+
+#include "../genooperators.h"
+
+
+class GenoOper_fn : public GenoOperators
+{
+public:
+	GenoOper_fn();
+	int checkValidity(const char *, const char *genoname);
+	int validate(char *&, const char *genoname);
+	int mutate(char *&g, float& chg, int &method);
+	int crossOver(char *&g1, char *&g2, float& chg1, float& chg2);
+	uint32_t style(const char *g, int pos);
+	const char* getSimplest() { return "[0.0, 0.0]"; } //should actually correspond in length to vectors in mut_bound_low, mut_bound_high, mut_stddev
+
+	double xover_proportion;
+	SString mut_bound_low, mut_bound_high, mut_stddev;
+};
+
+#endif
Index: cpp/frams/genetics/fn/oper_fn.cpp
===================================================================
--- cpp/frams/genetics/fn/oper_fn.cpp	(revision 763)
+++ 	(revision )
@@ -1,127 +1,0 @@
-// This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
-// See LICENSE.txt for details.
-
-#include "oper_fn.h"
-#include "conv_fn.h"
-#include <common/nonstd.h> //randomN, rnd01
-
-
-/**
-\class GenoOper_fn
-
-This genetic representation only stores a vector of real numbers. A fitness function must be provided
-for the gene pool, for example the "Booth function" would be:
-
-var X = String.deserialize(this.geno.rawgenotype); //a vector of real values
-var result = Math.pow(X[0]+2*X[1]-7,2) + Math.pow(2*X[0]+X[1]-5,2);
-return -result; //negation because Framsticks assumes maximization, and the original function needs to be minimized
-*/
-
-
-
-#define FIELDSTRUCT GenoOper_fn
-static ParamEntry GENOfnparam_tab[] =
-{
-	{ "Genetics: fn", 1, 4, },
-	{ "fn_xover", 0, 0, "Inherited in linear mix crossover", "f 0.5 1.0 0.9", FIELD(xover_proportion), "0.5 => children are averaged parents.\n0.8 => children are only 20% different from parents.\n1.0 => each child is identical to one parent (no crossover).", },
-	{ "fn_mut_bound_low", 1, 0, "Lower bounds for mutation", "s 0 0 [-10.0, -10.0]", FIELD(mut_bound_low), "A vector of lower bounds (one real value for each variable)", },
-	{ "fn_mut_bound_high", 1, 0, "Higher bounds for mutation", "s 0 0 [10.0, 10.0]", FIELD(mut_bound_high), "A vector of higher bounds (one real value for each variable)", },
-	{ "fn_mut_stddev", 1, 0, "Standard deviations for mutation", "s 0 0 [0.1, 0.1]", FIELD(mut_stddev), "A vector of standard deviations (one real value for each variable)", },
-	{ 0, },
-};
-#undef FIELDSTRUCT
-
-
-
-GenoOper_fn::GenoOper_fn()
-{
-	par.setParamTab(GENOfnparam_tab);
-	par.select(this);
-	par.setDefault();
-	supported_format = 'n';
-}
-
-int GenoOper_fn::checkValidity(const char* gene, const char *genoname)
-{
-	vector<double> values = GenoConv_fn0::stringToVector(gene);
-	return values.size() > 0 ? GENOPER_OK : 1;
-}
-
-int GenoOper_fn::validate(char *&gene, const char *genoname)
-{
-	vector<double> values = GenoConv_fn0::stringToVector(gene);
-	if (values.size() == 0)
-		values.push_back(0.0);
-	string validated = GenoConv_fn0::vectorToString(values);
-	free(gene);
-	gene = strdup(validated.c_str()); //reallocate
-	return GENOPER_OK;
-}
-
-//Creep-mutate one property
-int GenoOper_fn::mutate(char *&gene, float &chg, int &method)
-{
-	method = 0;
-	vector<double> values = GenoConv_fn0::stringToVector(gene);
-	if (values.size() == 0)
-		return GENOPER_OPFAIL;
-	vector<double> bound_low = GenoConv_fn0::stringToVector(mut_bound_low.c_str());
-	vector<double> bound_high = GenoConv_fn0::stringToVector(mut_bound_high.c_str());
-	vector<double> stddev = GenoConv_fn0::stringToVector(mut_stddev.c_str());
-	if (bound_low.size() != bound_high.size() || bound_high.size() != stddev.size() || stddev.size() != values.size())
-	{
-		logPrintf("GenoOper_fn", "mutate", LOG_ERROR, "The solution vector, bound vectors, and standard deviation vectors must all have the same number of values");
-		return GENOPER_OPFAIL;
-	}
-
-	int which = randomN(values.size());
-	values[which] = GenoOperators::mutateCreep('f', values[which], bound_low[which], bound_high[which], stddev[which], false);
-	string saved = GenoConv_fn0::vectorToString(values);
-	free(gene);
-	gene = strdup(saved.c_str()); //reallocate
-	chg = 1.0f / values.size();
-	return GENOPER_OK;
-}
-
-///Averaging crossover
-int GenoOper_fn::crossOver(char *&g1, char *&g2, float& chg1, float& chg2)
-{
-	//g1 = strdup("[1,0.5,0.5,0.5,0.5,1,1]"); //testing...
-	//g2 = strdup("[4,1,  1,  1,  1,  2,2]"); //testing...
-	//xover_proportion = 0.1; //testing...
-
-	chg1 = xover_proportion;
-	chg2 = 1 - xover_proportion;
-
-	vector<double> v1 = GenoConv_fn0::stringToVector(g1);
-	vector<double> v2 = GenoConv_fn0::stringToVector(g2);
-
-	if (v1.size() != v2.size())
-	{
-		logPrintf("GenoOper_fn", "crossOver", LOG_ERROR, "Tried to cross over solutions with a differing number of variables (%d and %d)", v1.size(), v2.size());
-		return GENOPER_OPFAIL;
-	}
-
-	GenoOperators::linearMix(v1, v2, xover_proportion);
-
-	string saved = GenoConv_fn0::vectorToString(v1);
-	free(g1);
-	g1 = strdup(saved.c_str()); //reallocate
-	saved = GenoConv_fn0::vectorToString(v2);
-	free(g2);
-	g2 = strdup(saved.c_str()); //reallocate
-	return GENOPER_OK;
-}
-
-///Applying some colors and font styles...
-uint32_t GenoOper_fn::style(const char *g, int pos)
-{
-	char ch = g[pos];
-	uint32_t style = GENSTYLE_CS(0, GENSTYLE_INVALID); //default, should be changed below
-	if (strchr("-.e 0123456789", ch) != NULL)
-		style = GENSTYLE_CS(GENCOLOR_NUMBER, GENSTYLE_NONE);
-	else if (strchr("[,]", ch) != NULL)
-		style = GENSTYLE_RGBS(0, 0, 0, GENSTYLE_BOLD);
-	return style;
-}
Index: cpp/frams/genetics/fn/oper_fn.h
===================================================================
--- cpp/frams/genetics/fn/oper_fn.h	(revision 763)
+++ 	(revision )
@@ -1,26 +1,0 @@
-// This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
-// See LICENSE.txt for details.
-
-#ifndef _GENOOPER_Fn_H_
-#define _GENOOPER_Fn_H_
-
-#include "../oper_fx.h"
-
-
-class GenoOper_fn : public GenoOperators
-{
-public:
-	GenoOper_fn();
-	int checkValidity(const char *, const char *genoname);
-	int validate(char *&, const char *genoname);
-	int mutate(char *&g, float& chg, int &method);
-	int crossOver(char *&g1, char *&g2, float& chg1, float& chg2);
-	uint32_t style(const char *g, int pos);
-	const char* getSimplest() { return "[0.0, 0.0]"; } //should actually correspond in length to vectors in mut_bound_low, mut_bound_high, mut_stddev
-
-	double xover_proportion;
-	SString mut_bound_low, mut_bound_high, mut_stddev;
-};
-
-#endif
