Changeset 968 for cpp/frams/genetics/genooperators.h
- Timestamp:
- 06/30/20 00:30:39 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/genooperators.h
r967 r968 187 187 static bool mutateRandomNeuroClassProperty(Neuro* n); ///<high-level neuron mutation function, will select and mutate a random property of Neuron's NeuroClass. Returns true if successful and some property was actually mutated. Could return false when the NeuroClass of the Neuron have no properties, or when a randomly selected property was not suitable for mutation (for example a string or another non-number type). 188 188 static int selectRandomNeuroClassProperty(Neuro* n); ///<selects random property (either 0-based extraproperty of NeuroClass or NEUROCLASS_PROP_OFFSET-based standard property of NeuroClass). -1 if Neuroclass has no properties. 189 static double getMutatedNeuroClassProperty(double current, Neuro *n, int propindex); ///<returns value \e current mutated for the property \e propindex of Neuron's NeuroClass or for extraproperty (\e propindex - NEUROCLASS_PROP_OFFSET) of Neuron's NeuroClass. Neuro \e n is used as read-only. Use \e propindex == -1 to mutate connection weight (\e n and \e i are then ignored). 189 static double getMutatedNeuroClassProperty(double current, Neuro *n, int propindex); ///<returns value \e current mutated for the property \e propindex of Neuron's NeuroClass or for extraproperty (\e propindex - NEUROCLASS_PROP_OFFSET) of Neuron's NeuroClass. Neuro \e n is used as read-only. 190 static double getMutatedNeuronConnectionWeight(double current); ///<returns mutated value of \e current. 190 191 static bool mutatePropertyNaive(ParamInterface &p, int propindex); ///<creep-mutate selected property. Returns true when success. mutateProperty() should be used instead of this function. 191 192 static bool mutateProperty(ParamInterface &p, int propindex); ///<like mutatePropertyNaive(), but uses special probability distributions for some neuron properties. … … 216 217 }; 217 218 218 219 //220 // custom distributions for mutations of various parameters221 //222 /*223 static double distrib_weight[]=224 {225 5, // distribution -999 _-^_^-_ +999226 -999, 999, // each weight value may be useful, especially...227 -5, -0.3, // ...little non-zero values228 -3, -0.6,229 0.6, 3,230 0.3, 5,231 };232 */233 234 219 #endif
Note: See TracChangeset
for help on using the changeset viewer.