function
ExpParams_cr_c_set, ExpParams_cr_life_set, ExpParams_cr_v_set, ExpParams_cr_gl_set,
ExpParams_cr_joints_set, ExpParams_cr_nnsiz_set, ExpParams_cr_nncon_set, ExpParams_cr_di_set,
ExpParams_cr_vpos_set, ExpParams_cr_vvel_set, ExpParams_cr_norm_set, ExpParams_cr_simi_set,
update_fitformula()
{
  var formula = "" + ExpParams.cr_c;
  formula += singlecrit("cr_life", "lifespan");
  formula += singlecrit("cr_v", "velocity");
  formula += singlecrit("cr_gl", "numparts");
  formula += singlecrit("cr_joints", "numjoints");
  formula += singlecrit("cr_nnsiz", "numneurons");
  formula += singlecrit("cr_nncon", "numconnections");
  formula += singlecrit("cr_di", "distance");
  formula += singlecrit("cr_vpos", "vertpos");
  formula += singlecrit("cr_vvel", "vertvel");
  if (ExpParams.cr_simi)
    formula = "(" + formula + ")*this.simi";
  GenePools[0].fitness = "return " + formula + ";";
}

function singlecrit(crname, fieldname)
{
  var weight = ExpParams.[crname];
  if (weight == 0.0)
    return "";
  if (ExpParams.cr_norm)
    return "+this.getNormalized(Genotype:" + fieldname + ")*" + weight;
  else
    return "+this." + fieldname + "*" + weight;
}
