From a0c7412c188b0bb70e147c7a027b964392e110a8 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 27 Sep 2004 13:34:34 +0000 Subject: [PATCH] Replaced the eoNormalMutation (mutating ALL variables of a real-valued vector) with eiNormalVecMutation that has a proba. to mutation each variable --- eo/src/es/make_op_real.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h index 80fc42e4..11138821 100644 --- a/eo/src/es/make_op_real.h +++ b/eo/src/es/make_op_real.h @@ -180,6 +180,8 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< eoValueParam & sigmaParam = _parser.createParam(0.3, "sigma", "Sigma (fixed) for Gaussian mutation", 's', "Variation Operators" ); + eoValueParam & pNormalParam = _parser.createParam(1.0, "pNormal", "Proba. to change each variable for Gaussian mutation", 's', "Variation Operators" ); + // minimum check bool bMut = true; if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) @@ -209,7 +211,7 @@ eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded< ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); // mutate all component using Gaussian mutation - ptMon = new eoNormalMutation(boundsParam.value(), sigmaParam.value()); + ptMon = new eoNormalVecMutation(boundsParam.value(), sigmaParam.value(), pNormalParam.value()); _state.storeFunctor(ptMon); ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); _state.storeFunctor(ptCombinedMonOp);