Changeset 1273 for cpp/frams/genetics/fH
- Timestamp:
- 09/09/23 15:10:49 (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/fH/fH_oper.cpp
r1257 r1273 14 14 { 15 15 { "Genetics: fH", 1, FH_OPCOUNT + FH_ADD_OPCOUNT, }, 16 { "fH_mut_addition", 0, 0, "Add element", "f 0 100 30", FIELD(operations[FH_ADD]), "Probability of adding new element to genotype", },17 { "fH_mut_add_joint", 0, 0, " - add joint", "f 0 100 33", FIELD(addoperations[FH_ADD_STICK]), "Probability of addingnew stick handle", },18 { "fH_mut_add_neuron", 0, 0, " - add neuron", "f 0 100 3 3", FIELD(addoperations[FH_ADD_NEURO]), "Probability of addingnew neuron handle", },19 { "fH_mut_add_connection", 0, 0, " - add neural connection", "f 0 100 33", FIELD(addoperations[FH_ADD_CONN]), "Probability of addingnew neuron connection handle", },20 { "fH_mut_deletion", 0, 0, "Delete element", "f 0 100 10", FIELD(operations[FH_DEL]), "Probability of removing element from genotype", },21 { "fH_mut_handle", 0, 0, "Modify vectors of handles", "f 0 100 30", FIELD(operations[FH_HANDLE]), "Probability of changing values in vectors ofhandle", },22 { "fH_mut_property", 0, 0, "Modify properties of handles", "f 0 100 30", FIELD(operations[FH_PROP]), "Probability of changing properties of handles", },16 { "fH_mut_addition", 0, 0, "Add element", "f 0 100 4", FIELD(operations[FH_ADD]), "Probability of adding a new element", }, 17 { "fH_mut_add_joint", 0, 0, " - add joint", "f 0 100 4", FIELD(addoperations[FH_ADD_STICK]), "Probability of adding a new stick handle", }, 18 { "fH_mut_add_neuron", 0, 0, " - add neuron", "f 0 100 3", FIELD(addoperations[FH_ADD_NEURO]), "Probability of adding a new neuron handle", }, 19 { "fH_mut_add_connection", 0, 0, " - add neural connection", "f 0 100 1", FIELD(addoperations[FH_ADD_CONN]), "Probability of adding a new neuron connection handle", }, 20 { "fH_mut_deletion", 0, 0, "Delete element", "f 0 100 4", FIELD(operations[FH_DEL]), "Probability of removing an element", }, 21 { "fH_mut_handle", 0, 0, "Modify vectors of handles", "f 0 100 1", FIELD(operations[FH_HANDLE]), "Probability of changing values in vectors of a handle", }, 22 { "fH_mut_property", 0, 0, "Modify properties of handles", "f 0 100 4", FIELD(operations[FH_PROP]), "Probability of changing properties of handles", }, 23 23 { 0, }, 24 24 }; … … 53 53 return 1; 54 54 } 55 return 0;55 return GENOPER_OK; 56 56 } 57 57 … … 63 63 fH_Builder builder; 64 64 int err = builder.parseGenotype(geno); 65 // if parsing failed, then it is impossible to repair genotype65 // if parsing failed, then it is impossible to repair the genotype 66 66 if (err != 0) 67 67 { 68 return GENOPER_O PFAIL;69 } 70 // method removes definitions of neurons that have invalid genotype68 return GENOPER_OK; 69 } 70 // method removes definitions of neurons that have an invalid genotype 71 71 int amount = builder.removeNeuronsWithInvalidClasses(); 72 // if there were any warnings, then rewrite genotype72 // if there were any warnings, then rewrite the genotype 73 73 if (eh.getErrorWarningCount() > 0 || amount > 0) 74 74 {
Note: See TracChangeset
for help on using the changeset viewer.