Changeset 1273 for cpp/frams/genetics/fH


Ignore:
Timestamp:
09/09/23 15:10:49 (14 months ago)
Author:
Maciej Komosinski
Message:

fH, fB, fL: improved default parameter values, syntax coloring and code logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/fH/fH_oper.cpp

    r1257 r1273  
    1414{
    1515        { "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 adding new stick handle", },
    18         { "fH_mut_add_neuron", 0, 0, " - add neuron", "f 0 100 33", FIELD(addoperations[FH_ADD_NEURO]), "Probability of adding new neuron handle", },
    19         { "fH_mut_add_connection", 0, 0, " - add neural connection", "f 0 100 33", FIELD(addoperations[FH_ADD_CONN]), "Probability of adding new 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 of handle", },
    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", },
    2323        { 0, },
    2424};
     
    5353                return 1;
    5454        }
    55         return 0;
     55        return GENOPER_OK;
    5656}
    5757
     
    6363        fH_Builder builder;
    6464        int err = builder.parseGenotype(geno);
    65         // if parsing failed, then it is impossible to repair genotype
     65        // if parsing failed, then it is impossible to repair the genotype
    6666        if (err != 0)
    6767        {
    68                 return GENOPER_OPFAIL;
    69         }
    70         // method removes definitions of neurons that have invalid genotype
     68                return GENOPER_OK;
     69        }
     70        // method removes definitions of neurons that have an invalid genotype
    7171        int amount = builder.removeNeuronsWithInvalidClasses();
    72         // if there were any warnings, then rewrite genotype
     72        // if there were any warnings, then rewrite the genotype
    7373        if (eh.getErrorWarningCount() > 0 || amount > 0)
    7474        {
Note: See TracChangeset for help on using the changeset viewer.