Changeset 1302 for cpp/frams/genetics/f1


Ignore:
Timestamp:
04/25/24 21:59:54 (8 months ago)
Author:
Maciej Komosinski
Message:

Cosmetic / minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f1/f1_conv.cpp

    r1258 r1302  
    2323          "- Full/NumberOfBranches - a compromise between the two other settings.\n"
    2424          "- Full/(NumberOfBranches+1) - because the originating stick also counts as a branch. This setting guarantees that in the worst case, when at least two neighboring branches have sticks controlled by bending muscles and their controlling signals are at extreme values, the sticks can touch and overlap, but will not intersect. This setting is in most cases too strict because (1) all branches are very rarely controlled by muscles, (2) there are often 'empty' branches - multiple commas with no sticks in-between, and (3) the share of the originating stick is effectively wasted because this stick itself has no muscle at the branching point so it will not bend; the muscle bending range is symmetrical and the default range is equal for all muscles in a branching, but the sticks equipped with muscles in a branching are rarely evenly spaced.\n"
    25           "- Full: Always 1 (the complete angle) - because we do not have to care about the physical plausibility and avoid intersecting sticks, and other genetic representations do not impose such constraints, so this full angle setting can be useful as the default bending range when comparing the performance of various genetic encodings."},
     25          "- Full: always the complete angle - because we do not have to care about the physical plausibility and avoid intersecting sticks, and other genetic representations do not impose such constraints, so this full angle setting can be useful as the default bending range when comparing the performance of various genetic encodings."},
    2626
    2727        { 0, },
     
    331331{
    332332        double len = std::min(2.0, c.length);
     333        Part *p1 = model.getPart(part1);
     334        Part *p2 = model.getPart(part2);
    333335        sprintf(tmp, "p1=%d,p2=%d,dx=%lg,rx=%lg,ry=%lg,rz=%lg,stam=%lg,vr=%g,vg=%g,vb=%g",
    334                 part1, part2, len, angle.x, angle.y, angle.z, c.stamina, c.cred, c.cgreen, c.cblue);
     336                part1, part2, len, angle.x, angle.y, angle.z, c.stamina, (p1->vcolor.x+p2->vcolor.x)/2, (p1->vcolor.y+p2->vcolor.y)/2, (p1->vcolor.z+p2->vcolor.z)/2);
    335337        lastjoint_muscle_power = c.muscle_power;
    336338        return model.addFromString(Model::JointType, tmp, makeRange(g));
Note: See TracChangeset for help on using the changeset viewer.