Ignore:
Timestamp:
11/28/20 17:38:03 (3 years ago)
Author:
Maciej Komosinski
Message:

Updated test results after changes to evol_test and fS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/tests/genomanipulation-complex.goal

    r1009 r1033  
    2929   ##                                           ##
    3030    #############################################
    31             (part # 2)
     31            (part # 1)
    3232Here is the full listing of properties as they are printed in f0
    3333 (please compare with f0 genotype).
     
    3737 [this data is provided by Part::properties() ]
    3838 #        id                      type  name        group (22 properties)
    39  0.        x = 2.0                  f   position.x  Geometry 
     39 0.        x = 1.0                  f   position.x  Geometry 
    4040 1.        y = 0.0                  f   position.y  Geometry 
    4141 2.        z = 0.0                  f   position.z  Geometry 
    4242 3.       sh = 0                    d 0 3 0 shape       Geometry 
    4343 4.        s = 1.0                  f 0.1 10.0 1.0 size        Geometry 
    44  5.       sx = 1.0                  f 0.001 1000.0 1.0 scale.x     Geometry 
    45  6.       sy = 1.0                  f 0.001 1000.0 1.0 scale.y     Geometry 
    46  7.       sz = 1.0                  f 0.001 1000.0 1.0 scale.z     Geometry 
     44 5.       sx = 1.0                  f 0.05 5.0 1.0 scale.x     Geometry 
     45 6.       sy = 1.0                  f 0.05 5.0 1.0 scale.y     Geometry 
     46 7.       sz = 1.0                  f 0.05 5.0 1.0 scale.z     Geometry 
    4747 8.        h = 0.0                  f 0 1 0 hollow      Other properties
    4848 9.       dn = 1.0                  f 0.2 5.0 1.0 density     Other properties
    49 10.       fr = 0.976                f 0.0 4.0 0.4 friction    Other properties
    50 11.      ing = 0.475                f 0.0 1.0 0.25 ingestion   Other properties
    51 12.       as = 0.175                f 0.0 1.0 0.25 assimilation  Other properties
     4910.       fr = 1.12                 f 0.0 4.0 0.4 friction    Other properties
     5011.      ing = 0.53125              f 0.0 1.0 0.25 ingestion   Other properties
     5112.       as = 0.15625              f 0.0 1.0 0.25 assimilation  Other properties
    525213.       rx = 0.0                  f   rot.x       Geometry 
    535314.       ry = 0.0                  f   rot.y       Geometry 
     
    6969 0.        h = 0.0                  f 0 1 0 hollow      Extra properties
    7070 1.       dn = 1.0                  f 0.2 5.0 1.0 density     Extra properties
    71  2.       fr = 0.976                f 0.0 4.0 0.4 friction    Extra properties
    72  3.      ing = 0.475                f 0.0 1.0 0.25 ingestion   Extra properties
    73  4.       as = 0.175                f 0.0 1.0 0.25 assimilation  Extra properties
     71 2.       fr = 1.12                 f 0.0 4.0 0.4 friction    Extra properties
     72 3.      ing = 0.53125              f 0.0 1.0 0.25 ingestion   Extra properties
     73 4.       as = 0.15625              f 0.0 1.0 0.25 assimilation  Extra properties
    7474 5.       vs = 0.2                  f 0.05 0.7 0.2 visual thickness  Extra properties
    7575 6.       vr = 0.5                  f 0.0 1.0 1.0 red component  Extra properties
     
    8383Now we will try to change some of properties:
    8484
    85       Change property #0 to random value from range [0..1]
    86       Current value of 'h' (hollow) is '0.0'
     85      Change property #5 to random value from range [0.05..0.7]
     86      Current value of 'vs' (visual thickness) is '0.2'
    8787      Setting new value... [ using ParamInterface::set() ]
    88       The value is now '0.548814'
    89 
    90 Let's see f0... (check out part #2 !)
    91 
    92 p:fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    93 p:1.0, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    94 p:2.0, h=0.548814, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
     88      The value is now '0.514873'
     89
     90Let's see f0... (check out part #1 !)
     91
     92p:fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
     93p:1.0, fr=1.12, ing=0.53125, as=0.15625, vs=0.514873, vr=0.5, 0.5, 0.5
     94p:2.0, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
    9595j:0, 1, dx=1.0, 0.0, 0.0, stam=0.15625, vr=0.5, 0.5, 0.5
    9696j:1, 2, dx=1.0, 0.0, 0.0, stam=0.175, vr=0.5, 0.5, 0.5
     
    104104   ##                                           ##
    105105    #############################################
    106             (joint # 0)
     106            (joint # 1)
    107107Similarly as with Part, the full list of properties comes first:
    108108
    109109 #        id                      type  name        group (27 properties)
    110  0.       p1 = 0                    d -1 999999 -1 part1 ref#  Connections
    111  1.       p2 = 1                    d -1 999999 -1 part2 ref#  Connections
     110 0.       p1 = 1                    d -1 999999 -1 part1 ref#  Connections
     111 1.       p2 = 2                    d -1 999999 -1 part2 ref#  Connections
    112112 2.       rx = 0.0                  f   rotation.x  Geometry 
    113113 3.       ry = 0.0                  f   rotation.y  Geometry 
     
    12912919.     stif = 1.0                  f 0.0 1.0 1.0 stiffness   Other properties
    13013020.  rotstif = 1.0                  f 0.0 1.0 1.0 rotation stiffness  Other properties
    131 21.     stam = 0.15625              f 0.0 1.0 0.25 stamina     Other properties
     13121.     stam = 0.175                f 0.0 1.0 0.25 stamina     Other properties
    13213222.        i =                      s   info        Other properties
    13313323.   Vstyle = joint                s 0 0 joint vis_style   Visual   
     
    141141Delta fields (dx,dy,dz) describe relative location of the second part.
    142142This joint will change the second Part's positions to preserve delta distance.
    143 Let's move the first Part (#0) along y axis (+0.1) and change delta.z (dz) by 0.1.
    144 Position of the second Part referenced by this joint (part #1) is now changed:
    145 
    146 p:y=0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    147 p:1.0, 0.1, 0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    148 p:2.0, 0.1, 0.1, h=0.548814, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
    149 j:0, 1, dx=1.0, 0.0, 0.1, stam=0.15625, vr=0.5, 0.5, 0.5
    150 j:1, 2, dx=1.0, 0.0, 0.0, stam=0.175, vr=0.5, 0.5, 0.5
     143Let's move the first Part (#1) along y axis (+0.1) and change delta.z (dz) by 0.1.
     144Position of the second Part referenced by this joint (part #2) is now changed:
     145
     146p:fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
     147p:1.0, fr=1.12, ing=0.53125, as=0.15625, vs=0.514873, vr=0.5, 0.5, 0.5
     148p:2.0, z=0.1, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
     149j:0, 1, dx=1.0, 0.0, 0.0, stam=0.15625, vr=0.5, 0.5, 0.5
     150j:1, 2, dx=1.0, 0.0, 0.1, stam=0.175, vr=0.5, 0.5, 0.5
    151151n:j=0, d=@:p=0.6543
    152152n:j=1, d=G
     
    158158As you can see, Joint's delta fields have altered:
    159159
    160 p:y=0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    161 p:1.0, 0.1, -0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    162 p:2.0, 0.1, -0.1, h=0.548814, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
    163 j:0, 1, dx=1.0, 0.0, -0.1, stam=0.15625, vr=0.5, 0.5, 0.5
    164 j:1, 2, dx=1.0, 0.0, 0.0, stam=0.175, vr=0.5, 0.5, 0.5
     160p:fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
     161p:1.0, fr=1.12, ing=0.53125, as=0.15625, vs=0.514873, vr=0.5, 0.5, 0.5
     162p:2.0, z=-0.1, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
     163j:0, 1, dx=1.0, 0.0, 0.0, stam=0.15625, vr=0.5, 0.5, 0.5
     164j:1, 2, dx=1.0, 0.0, -0.1, stam=0.175, vr=0.5, 0.5, 0.5
    165165n:j=0, d=@:p=0.6543
    166166n:j=1, d=G
     
    171171f0 is now:
    172172
    173 p:y=0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    174 p:1.0, 0.1, -0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    175 p:2.0, 0.1, -0.1, h=0.548814, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
    176 j:0, 1, stam=0.15625, vr=0.5, 0.5, 0.5
    177 j:1, 2, dx=1.0, 0.0, 0.0, stam=0.175, vr=0.5, 0.5, 0.5
     173p:fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
     174p:1.0, fr=1.12, ing=0.53125, as=0.15625, vs=0.514873, vr=0.5, 0.5, 0.5
     175p:2.0, z=-0.1, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
     176j:0, 1, dx=1.0, 0.0, 0.0, stam=0.15625, vr=0.5, 0.5, 0.5
     177j:1, 2, stam=0.175, vr=0.5, 0.5, 0.5
    178178n:j=0, d=@:p=0.6543
    179179n:j=1, d=G
     
    188188
    189189p:fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    190 p:1.0, 0.1, -0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    191 p:2.0, 0.1, -0.1, h=0.548814, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
    192 j:0, 1, stam=0.15625, vr=0.5, 0.5, 0.5
    193 j:1, 2, dx=1.0, 0.0, 0.0, stam=0.175, vr=0.5, 0.5, 0.5
     190p:1.0, fr=1.12, ing=0.53125, as=0.15625, vs=0.514873, vr=0.5, 0.5, 0.5
     191p:2.0, z=-0.1, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
     192j:0, 1, dx=1.0, 0.0, 0.0, stam=0.15625, vr=0.5, 0.5, 0.5
     193j:1, 2, stam=0.175, vr=0.5, 0.5, 0.5
    194194n:j=0, d=@:p=0.6543
    195195n:j=1, d=G
     
    208208
    209209They can be changed just like Part's extra properties:
    210       Change property #4 to random value from range [0..1]
    211       Current value of 'vb' (blue component) is '0.5'
     210      Change property #3 to random value from range [0..1]
     211      Current value of 'vg' (green component) is '0.5'
    212212      Setting new value... [ using ParamInterface::set() ]
    213       The value is now '0.592845'
     213      The value is now '0.857946'
    214214And after that we have this genotype:
    215215
    216216p:fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    217 p:1.0, 0.1, -0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    218 p:2.0, 0.1, -0.1, h=0.548814, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
    219 j:0, 1, stam=0.15625, vr=0.5, 0.5, 0.592845
    220 j:1, 2, dx=1.0, 0.0, 0.0, stam=0.175, vr=0.5, 0.5, 0.5
     217p:1.0, fr=1.12, ing=0.53125, as=0.15625, vs=0.514873, vr=0.5, 0.5, 0.5
     218p:2.0, z=-0.1, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
     219j:0, 1, dx=1.0, 0.0, 0.0, stam=0.15625, vr=0.5, 0.5, 0.5
     220j:1, 2, stam=0.175, vr=0.5, 0.857946, 0.5
    221221n:j=0, d=@:p=0.6543
    222222n:j=1, d=G
     
    228228   ##                                           ##
    229229    #############################################
    230             (neuro # 0)
     230            (neuro # 1)
    231231Basic features of Neuro object are similar to those of Part and Joint.
    232232We can request a property list:
     
    234234 #        id                      type  name        group (10 properties)
    235235 0.        p = -1                   d -1 999999 -1 part ref#   Connections
    236  1.        j = 0                    d -1 999999 -1 joint ref#  Connections
    237  2.        d = @:p=0.6543           s   details     Other     
     236 1.        j = 1                    d -1 999999 -1 joint ref#  Connections
     237 2.        d = G                    s   details     Other     
    238238 3.        i =                      s   info        Other     
    239239 4.   Vstyle = neuro                s 0 0 neuro vis_style   Visual   
    240  5. getInputCount = 1                    d   input count  Connections
     240 5. getInputCount = 0                    d   input count  Connections
    241241 9. classObject = null                 oNeuroClass neuron class  Connections
    242242
     
    248248Each neuron can have any number of inputs = weighted connections
    249249 with other neurons.
    250 According to Neuro::getInputCount(), this one has 1 inputs.
     250According to Neuro::getInputCount(), this one has 0 inputs.
    251251Standard API is provided for accessing those inputs (getInput(int)),
    252252adding inputs (addInput(Neuro*)) and removing them (removeInput(int)).
     
    255255The most unusual thing is 'details' field (d).
    256256It is something like separate object with its own set of properties.
    257 Currently the value of 'd' is '@:p=0.6543'.
    258 '@' is the class name (Neuro::getClassName() == '@') and means 'Rotation muscle'.
     257Currently the value of 'd' is 'G'.
     258'G' is the class name (Neuro::getClassName() == 'G') and means 'Gyroscope'.
    259259Neuro::getClass() gives you information about basic characteristic
    260260of the class, that can be analyzed automatically.
    261 For the current object we can learn that it supports 1 inputs (getPreferredInputs()) and doesn't provide useful output signal (getPreferredOutput()==0).
    262 Instances of '@' can be used in models having shape types: 'ball-and-stick'.
    263 Instances of '@' can be attached to Joints having any shapes.
    264 The class defines its own properties:
    265 
    266  [ data provided by Neuro::classProperties() ]
    267  #        id                      type  name        group (1 properties)
    268  0.        p = 0.6543               f 0.01 1.0 1.0 power       Rotation muscle
    269 and they can be changed:
    270       Change property #0 to random value from range [0.01..1]
    271       Current value of 'p' (power) is '0.6543'
    272       Setting new value... [ using ParamInterface::set() ]
    273       The value is now '0.718037'
    274 After that, 'details' contains the new object: '@:p=0.718037'.
     261For the current object we can learn that it supports no inputs (getPreferredInputs()) and provides meaningful output signal (getPreferredOutput()==1).
     262Instances of 'G' can be used in models having shape types: 'ball-and-stick'.
     263Instances of 'G' can be attached to Joints having any shapes.
     264(This class does not have its own properties
     265 - Neuro::classProperties().getPropCount()==0)
    275266The class of this object can be changed using Neuro::setClassName()
    276267The following classes are available:
     
    30229322.   Sin  Sinus generator        2
    303294
    304 Let's change the Neuro's class to 'Water'...
    305 [WARN] Param.loadSingleLine: Unknown property 'Water.p' (ignored)
    306 Info for input #0 = ""
    307 Info for input #0, field "abc" = ""
    308 The final object description will be then: 'Water'
     295Let's change the Neuro's class to 'ChMux'...
     296The final object description will be then: 'ChMux'
    309297And the full f0 genotype:
    310298
    311299p:fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    312 p:1.0, 0.1, -0.1, fr=1.12, ing=0.53125, as=0.15625, vr=0.5, 0.5, 0.5
    313 p:2.0, 0.1, -0.1, h=0.548814, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
    314 j:0, 1, stam=0.15625, vr=0.5, 0.5, 0.592845
    315 j:1, 2, dx=1.0, 0.0, 0.0, stam=0.175, vr=0.5, 0.5, 0.5
    316 n:j=0, d=Water
    317 n:j=1, d=G
    318 c:0, 1, -1.23456, i="test=44,abc=yeah"
     300p:1.0, fr=1.12, ing=0.53125, as=0.15625, vs=0.514873, vr=0.5, 0.5, 0.5
     301p:2.0, z=-0.1, fr=0.976, ing=0.475, as=0.175, vr=0.5, 0.5, 0.5
     302j:0, 1, dx=1.0, 0.0, 0.0, stam=0.15625, vr=0.5, 0.5, 0.5
     303j:1, 2, stam=0.175, vr=0.5, 0.857946, 0.5
     304n:j=0, d=@:p=0.6543
     305n:j=1, d=ChMux
     306c:0, 1, -1.23456
    319307
    320308
     
    324312  1. You can redirect output: genomanipulation >filename.txt
    325313  2. Each run can yield different results and new behaviors, but you
    326      need to uncomment srand(time(0)) in genomanipulation.cpp.
     314     need to uncomment rndRandomizeSeed() in genomanipulation.cpp.
    327315  3. This application will use custom genotype passed as
    328316     a commandline parameter: genomanipulation "/*9*/FULU"
Note: See TracChangeset for help on using the changeset viewer.