Changeset 967 for cpp/frams/genetics/genooperators.cpp
- Timestamp:
- 06/28/20 23:33:17 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/genooperators.cpp
r959 r967 76 76 } 77 77 78 bool GenoOperators::mutateRandomNeuro nOrNeuroclassProperty(Neuro* n)78 bool GenoOperators::mutateRandomNeuroClassProperty(Neuro* n) 79 79 { 80 80 bool mutated = false; 81 int prop = selectRandomNeuro nProperty(n);81 int prop = selectRandomNeuroClassProperty(n); 82 82 if (prop >= 0) 83 83 { 84 84 if (prop >= GenoOperators::NEUROCLASS_PROP_OFFSET) 85 85 { 86 SyntParam par = n->classProperties(); //commits changes when pis destroyed86 SyntParam par = n->classProperties(); //commits changes when this object is destroyed 87 87 mutated = mutateProperty(par, prop - GenoOperators::NEUROCLASS_PROP_OFFSET); 88 88 } … … 96 96 } 97 97 98 int GenoOperators::selectRandomNeuro nProperty(Neuro *n)98 int GenoOperators::selectRandomNeuroClassProperty(Neuro *n) 99 99 { 100 100 int neuext = n->extraProperties().getPropCount(), … … 106 106 } 107 107 108 double GenoOperators:: mutateNeuronProperty(double current, Neuro *n, int i)108 double GenoOperators::getMutatedNeuroClassProperty(double current, Neuro *n, int i) 109 109 { 110 110 if (i == -1) return mutateCreepNoLimit('f', current, 2, true); //i==-1: mutating weight of neural connection
Note: See TracChangeset
for help on using the changeset viewer.