source: cpp/tests/genomanipulation-fS.goal @ 1037

Last change on this file since 1037 was 1034, checked in by sz, 4 years ago

test results updated

File size: 24.8 KB
Line 
1    #############################################
2   ##                                           ##
3  ##    Welcome to Genotype Manipulation Demo!    ##
4   ##                                           ##
5    #############################################
6Found converter accepting f1: "Recursive encoding"
7Found 6 converter(s) producing f0
8
9Source genotype: '1.1,0,0.4:C[Gpart]{x=0.806,y=0.806,z=2.295}(C[N;M:p=0.899]{x=0.806,z=0.806}(E{rx=1.3416,ry=-1.3967,rz=1.1368,tx=-0.7694,ty=1.0496,tz=-0.1275,x=1,y=1,z=1},bIE[N,1]{rx=-1.277,ry=-1.087,rz=-0.9208,tx=1.189,ty=1.1182,tz=-0.1494,x=1,y=1,z=1}E{rx=0.4085,ry=1.0807,rz=0.5977,tx=0.4698,ty=0.3333,tz=1.4408,x=1,y=1,z=1}E{rx=-0.9279,ry=-0.2806,rz=-0.7292,tx=1.1498,ty=-0.6195,tz=0.0121,x=1,y=1,z=1}),biR[N]{ry=0.271,x=1.0144,y=0.903,z=0.903}(R{rx=0.3229,ry=-0.3828,rz=1.5117,tx=0.7618,ty=1.3803,tz=1.354,x=0.8736,y=0.8736,z=0.8736},E{rx=1.3416,ry=-1.3967,rz=1.1368,tx=-0.7694,ty=1.0496,tz=-0.1275,x=1,y=1,z=1}),iC{rx=-0.9744,ry=-1.5695,rz=1.1659,tx=-0.9065,ty=-1.2759,tz=-0.0857,x=1.273,y=0.133,z=1.509},R{rx=0.3229,ry=-0.3828,rz=1.5117,tx=0.7618,ty=1.3803,tz=1.354,x=0.8736,y=0.8736,z=0.8736},iE{rx=1.3416,ry=-1.3967,rz=1.1368,tx=-0.7694,ty=1.0496,tz=-0.1275,x=1,y=1,z=1})'
10                  ( format S )
11Converted to f0:
12p:sh=2, sx=0.806, sy=0.806, sz=2.295
13p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
14p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
15p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
16p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
17p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
18p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271
19p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
20p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
21p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
22p:0.1364642552368182, 0.619565647570761, 3.289951226640109, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
23p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
24j:0, 1, sh=1
25j:1, 2, sh=1
26j:1, 3, sh=2
27j:3, 4, sh=1
28j:4, 5, sh=1
29j:0, 6, sh=2
30j:6, 7, sh=1
31j:6, 8, sh=1
32j:0, 9, sh=1
33j:0, 10, sh=1
34j:0, 11, sh=1
35n:p=0, d=Gpart
36n:p=1
37n:j=0, d=M:p=0.899
38n:p=3
39n:p=6
40c:3, 1
41
42Model contains: 12 part(s)
43                11 joint(s)
44                5 neuron(s)
45
46Investigating details...
47    #############################################
48   ##                                           ##
49  ##    P A R T    O B J E C T                   ##
50   ##                                           ##
51    #############################################
52            (part # 6)
53Here is the full listing of properties as they are printed in f0
54 (please compare with f0 genotype).
55Some properties have special meaning (eg. geometry and connections groups)
56and should be handled with care, because they influence other elements of the model.
57
58 [this data is provided by Part::properties() ]
59 #        id                      type  name        group (22 properties)
60 0.        x = 2.044122892122303    f   position.x  Geometry 
61 1.        y = 0.0                  f   position.y  Geometry 
62 2.        z = 0.0                  f   position.z  Geometry 
63 3.       sh = 3                    d 0 3 0 shape       Geometry 
64 4.        s = 1.0                  f 0.1 10.0 1.0 size        Geometry 
65 5.       sx = 1.0144               f 0.05 5.0 1.0 scale.x     Geometry 
66 6.       sy = 0.903                f 0.05 5.0 1.0 scale.y     Geometry 
67 7.       sz = 0.903                f 0.05 5.0 1.0 scale.z     Geometry 
68 8.        h = 0.0                  f 0 1 0 hollow      Other properties
69 9.       dn = 1.0                  f 0.2 5.0 1.0 density     Other properties
7010.       fr = 0.4                  f 0.0 4.0 0.4 friction    Other properties
7111.      ing = 0.22727272727272727  f 0.0 1.0 0.25 ingestion   Other properties
7212.       as = 0.25                 f 0.0 1.0 0.25 assimilation  Other properties
7313.       rx = 0.0                  f   rot.x       Geometry 
7414.       ry = 0.271                f   rot.y       Geometry 
7515.       rz = 0.0                  f   rot.z       Geometry 
7616.        i =                      s   info        Other properties
7717.   Vstyle = part                 s 0 0 part vis_style   Visual   
7818.       vs = 0.2                  f 0.05 0.7 0.2 visual thickness  Visual   
7919.       vr = 1.0                  f 0.0 1.0 1.0 red component  Visual   
8020.       vg = 1.0                  f 0.0 1.0 1.0 green component  Visual   
8121.       vb = 1.0                  f 0.0 1.0 1.0 blue component  Visual   
82
83However, there is a subset of properties which may be modified more freely.
84Properties on this list are related only to this part and can be changed
85without much consideration. They are guaranteed to be always valid; any inconsistencies
86will be silently repaired.
87
88 [this data is provided by Part::extraProperties() ]
89 #        id                      type  name        group (9 properties)
90 0.        h = 0.0                  f 0 1 0 hollow      Extra properties
91 1.       dn = 1.0                  f 0.2 5.0 1.0 density     Extra properties
92 2.       fr = 0.4                  f 0.0 4.0 0.4 friction    Extra properties
93 3.      ing = 0.22727272727272727  f 0.0 1.0 0.25 ingestion   Extra properties
94 4.       as = 0.25                 f 0.0 1.0 0.25 assimilation  Extra properties
95 5.       vs = 0.2                  f 0.05 0.7 0.2 visual thickness  Extra properties
96 6.       vr = 1.0                  f 0.0 1.0 1.0 red component  Extra properties
97 7.       vg = 1.0                  f 0.0 1.0 1.0 green component  Extra properties
98 8.       vb = 1.0                  f 0.0 1.0 1.0 blue component  Extra properties
99
100This set of properties can vary from release to release,
101but can be safely accessed by using extraProperties() call.
102This method accesses the full set of properies (even those
103which appear in future releases).
104Now we will try to change some of properties:
105
106      Change property #5 to random value from range [0.05..0.7]
107      Current value of 'vs' (visual thickness) is '0.2'
108      Setting new value... [ using ParamInterface::set() ]
109      The value is now '0.514873'
110
111Let's see f0... (check out part #6 !)
112
113p:sh=2, sx=0.806, sy=0.806, sz=2.295
114p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
115p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
116p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
117p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
118p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
119p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
120p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
121p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
122p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
123p:0.1364642552368182, 0.619565647570761, 3.289951226640109, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
124p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
125j:0, 1, sh=1
126j:1, 2, sh=1
127j:1, 3, sh=2
128j:3, 4, sh=1
129j:4, 5, sh=1
130j:0, 6, sh=2
131j:6, 7, sh=1
132j:6, 8, sh=1
133j:0, 9, sh=1
134j:0, 10, sh=1
135j:0, 11, sh=1
136n:p=0, d=Gpart
137n:p=1
138n:j=0, d=M:p=0.899
139n:p=3
140n:p=6
141c:3, 1
142
143    #############################################
144   ##                                           ##
145  ##    J O I N T    O B J E C T                 ##
146   ##                                           ##
147    #############################################
148            (joint # 9)
149Similarly as with Part, the full list of properties comes first:
150
151 #        id                      type  name        group (21 properties)
152 0.       p1 = 0                    d -1 999999 -1 part1 ref#  Connections
153 1.       p2 = 10                   d -1 999999 -1 part2 ref#  Connections
154 2.       sh = 1                    d 0 3 0 shape       Geometry 
155 3.       hx = 0.0                  f   hinge position.x  Geometry 
156 4.       hy = 0.0                  f   hinge position.y  Geometry 
157 5.       hz = 0.0                  f   hinge position.z  Geometry 
158 6.      hrx = 0.0                  f   hinge rotation.x  Geometry 
159 7.      hry = 0.0                  f   hinge rotation.y  Geometry 
160 8.      hrz = 0.0                  f   hinge rotation.z  Geometry 
161 9.      hxn = -1.5708              f -6.2832 0 -1.5708 hinge x negative limit  Geometry 
16210.      hxp = 1.5708               f 0 6.2832 1.5708 hinge x positive limit  Geometry 
16311.      hyn = -1.5708              f -6.2832 0 -1.5708 hinge y negative limit  Geometry 
16412.      hyp = 1.5708               f 0 6.2832 1.5708 hinge y positive limit  Geometry 
16513.     stif = 1.0                  f 0.0 1.0 1.0 stiffness   Other properties
16614.  rotstif = 1.0                  f 0.0 1.0 1.0 rotation stiffness  Other properties
16715.     stam = 0.25                 f 0.0 1.0 0.25 stamina     Other properties
16816.        i =                      s   info        Other properties
16917.   Vstyle = joint                s 0 0 joint vis_style   Visual   
17018.       vr = 1.0                  f 0.0 1.0 1.0 red component  Visual   
17119.       vg = 1.0                  f 0.0 1.0 1.0 green component  Visual   
17220.       vb = 1.0                  f 0.0 1.0 1.0 blue component  Visual   
173
174Actually, there are two kinds of Joints: delta and absolute.
175For this object, Joint::isDelta() returns 0, so this is the absolute Joint.
176
177Absolute Joints adapt to its Parts' positions.
178We can move a Part, and it does not influence the second part, nor the Joint.
179Let's move the first Part along y axis by -0.1...
180The Part's position is changed, but everything else stays intact:
181
182p:y=-0.1, sh=2, sx=0.806, sy=0.806, sz=2.295
183p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
184p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
185p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
186p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
187p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
188p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
189p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
190p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
191p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
192p:0.1364642552368182, 0.619565647570761, 3.289951226640109, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
193p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
194j:0, 1, sh=1
195j:1, 2, sh=1
196j:1, 3, sh=2
197j:3, 4, sh=1
198j:4, 5, sh=1
199j:0, 6, sh=2
200j:6, 7, sh=1
201j:6, 8, sh=1
202j:0, 9, sh=1
203j:0, 10, sh=1
204j:0, 11, sh=1
205n:p=0, d=Gpart
206n:p=1
207n:j=0, d=M:p=0.899
208n:p=3
209n:p=6
210c:3, 1
211
212How would this joint look like with delta option enabled?
213[ by calling Joint::useDelta(1) ]
214f0 is now:
215
216p:y=-0.1, sh=2, sx=0.806, sy=0.806, sz=2.295
217p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
218p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
219p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
220p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
221p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
222p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
223p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
224p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
225p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
226p:0.13646425523681815, 0.6195656475707613, 3.289951226640109, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
227p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
228j:0, 1, sh=1
229j:1, 2, sh=1
230j:1, 3, sh=2
231j:3, 4, sh=1
232j:4, 5, sh=1
233j:0, 6, sh=2
234j:6, 7, sh=1
235j:6, 8, sh=1
236j:0, 9, sh=1
237j:0, 10, rx=0.3229, -0.3828, 1.5117, dx=-0.5550636879509978, 0.9656107299102641, 3.181143899353255, sh=1
238j:0, 11, sh=1
239n:p=0, d=Gpart
240n:p=1
241n:j=0, d=M:p=0.899
242n:p=3
243n:p=6
244c:3, 1
245
246...so this is a delta joint.
247
248Delta fields (dx,dy,dz) describe relative location of the second part.
249This joint will change the second Part's positions to preserve delta distance.
250Let's move the first Part (#0) along y axis (+0.1) and change delta.z (dz) by 0.1.
251Position of the second Part referenced by this joint (part #10) is now changed:
252
253p:sh=2, sx=0.806, sy=0.806, sz=2.295
254p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
255p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
256p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
257p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
258p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
259p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
260p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
261p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
262p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
263p:0.1702327285845081, 0.753051220526163, 3.3779194402835317, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
264p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
265j:0, 1, sh=1
266j:1, 2, sh=1
267j:1, 3, sh=2
268j:3, 4, sh=1
269j:4, 5, sh=1
270j:0, 6, sh=2
271j:6, 7, sh=1
272j:6, 8, sh=1
273j:0, 9, sh=1
274j:0, 10, rx=0.3229, -0.3828, 1.5117, dx=-0.5550636879509978, 0.9656107299102641, 3.281143899353255, sh=1
275j:0, 11, sh=1
276n:p=0, d=Gpart
277n:p=1
278n:j=0, d=M:p=0.899
279n:p=3
280n:p=6
281c:3, 1
282
283If no delta fields are defined, they will be computed automatically.
284You can always delete existing delta values by using Joint::resetDelta().
285Now we will change the second Part's z position by -0.2 and call resetDelta()...
286As you can see, Joint's delta fields have altered:
287
288p:sh=2, sx=0.806, sy=0.806, sz=2.295
289p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
290p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
291p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
292p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
293p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
294p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
295p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
296p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
297p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
298p:0.1702327285845081, 0.753051220526163, 3.1779194402835316, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
299p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
300j:0, 1, sh=1
301j:1, 2, sh=1
302j:1, 3, sh=2
303j:3, 4, sh=1
304j:4, 5, sh=1
305j:0, 6, sh=2
306j:6, 7, sh=1
307j:6, 8, sh=1
308j:0, 9, sh=1
309j:0, 10, rx=0.3229, -0.3828, 1.5117, dx=-0.48035983335347077, 0.9067404686418418, 3.10520747206641, sh=1
310j:0, 11, sh=1
311n:p=0, d=Gpart
312n:p=1
313n:j=0, d=M:p=0.899
314n:p=3
315n:p=6
316c:3, 1
317
318Part references and delta fields are the 'core' properties of the Joint.
319The other properties are available from Joint::extraProperties()
320and at the moment are defined as follows:
321
322 #        id                      type  name        group (5 properties)
323 0.     stif = 1.0                  f 0.0 1.0 1.0 stiffness   Extra properties
324 1.  rotstif = 1.0                  f 0.0 1.0 1.0 rotation stiffness  Extra properties
325 2.       vr = 1.0                  f 0.0 1.0 1.0 red component  Extra properties
326 3.       vg = 1.0                  f 0.0 1.0 1.0 green component  Extra properties
327 4.       vb = 1.0                  f 0.0 1.0 1.0 blue component  Extra properties
328
329They can be changed just like Part's extra properties:
330      Change property #3 to random value from range [0..1]
331      Current value of 'vg' (green component) is '1.0'
332      Setting new value... [ using ParamInterface::set() ]
333      The value is now '0.857946'
334And after that we have this genotype:
335
336p:sh=2, sx=0.806, sy=0.806, sz=2.295
337p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
338p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
339p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
340p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
341p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
342p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
343p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
344p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
345p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
346p:0.170232728584508, 0.7530512205261631, 3.1779194402835316, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
347p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
348j:0, 1, sh=1
349j:1, 2, sh=1
350j:1, 3, sh=2
351j:3, 4, sh=1
352j:4, 5, sh=1
353j:0, 6, sh=2
354j:6, 7, sh=1
355j:6, 8, sh=1
356j:0, 9, sh=1
357j:0, 10, rx=0.3229, -0.3828, 1.5117, dx=-0.48035983335347077, 0.9067404686418418, 3.10520747206641, sh=1, vg=0.857946
358j:0, 11, sh=1
359n:p=0, d=Gpart
360n:p=1
361n:j=0, d=M:p=0.899
362n:p=3
363n:p=6
364c:3, 1
365
366    #############################################
367   ##                                           ##
368  ##    N E U R O    O B J E C T                 ##
369   ##                                           ##
370    #############################################
371            (neuro # 2)
372Basic features of Neuro object are similar to those of Part and Joint.
373We can request a property list:
374
375 #        id                      type  name        group (10 properties)
376 0.        p = -1                   d -1 999999 -1 part ref#   Connections
377 1.        j = 0                    d -1 999999 -1 joint ref#  Connections
378 2.        d = M:p=0.899            s   details     Other     
379 3.        i =                      s   info        Other     
380 4.   Vstyle = neuro                s 0 0 neuro vis_style   Visual   
381 5. getInputCount = 0                    d   input count  Connections
382 9. classObject = null                 oNeuroClass neuron class  Connections
383
384...and extra properties (which are designed to be always valid and easy to change):
385
386 #        id                      type  name        group (0 properties)
387
388As usual, we will change something:
389Each neuron can have any number of inputs = weighted connections
390 with other neurons.
391According to Neuro::getInputCount(), this one has 0 inputs.
392Standard API is provided for accessing those inputs (getInput(int)),
393adding inputs (addInput(Neuro*)) and removing them (removeInput(int)).
394
395
396The most unusual thing is 'details' field (d).
397It is something like separate object with its own set of properties.
398Currently the value of 'd' is 'M:p=0.899'.
399'M' is the class name (Neuro::getClassName() == 'M') and means 'Muscle for solids'.
400Neuro::getClass() gives you information about basic characteristic
401of the class, that can be analyzed automatically.
402For the current object we can learn that it supports 1 inputs (getPreferredInputs()) and doesn't provide useful output signal (getPreferredOutput()==0).
403Instances of 'M' can be used in models having shape types: 'solid shapes'.
404Instances of 'M' can be attached to Joints having shapes: 'hinge x' 'hinge xy'.
405The class defines its own properties:
406
407 [ data provided by Neuro::classProperties() ]
408 #        id                      type  name        group (2 properties)
409 0.        p = 0.899                f 0.01 1.0 1.0 power       Muscle for solids
410 1.        a = 0                    d 0 1 0 axis        Muscle for solids
411and they can be changed:
412      Change property #1 to random value from range [0..1]
413      Current value of 'a' (axis) is '0'
414      Setting new value... [ using ParamInterface::set() ]
415      The value is now '0'
416After that, 'details' contains the new object: 'M:p=0.899'.
417The class of this object can be changed using Neuro::setClassName()
418The following classes are available:
419 [ data provided by Neuro::getClassInfo()->getProperties() ]
420
421 #  class  description       properties
422 0.     N  Neuron                 4
423 1.    Nu  Unipolar neuron [EXPERIMENTAL!]   4
424 2.     G  Gyroscope              0
425 3. Gpart  Part Gyroscope         2
426 4.     T  Touch                  3
427 5.Tcontact  Touch contact          0
428 6.Tproximity  Touch proximity        3
429 7.     S  Smell                  0
430 8.     *  Constant               0
431 9.     |  Bend muscle            2
43210.     @  Rotation muscle        1
43311.     M  Muscle for solids      2
43412.     D  Differentiate          0
43513. Fuzzy  Fuzzy system [EXPERIMENTAL!]   4
43614.   Sti  Sticky [EXPERIMENTAL!]   0
43715.   LMu  Linear muscle [EXPERIMENTAL!]   1
43816. Water  Water detector         0
43917.Energy  Energy level           0
44018.    Ch  Channelize             0
44119. ChMux  Channel multiplexer    0
44220. ChSel  Channel selector       1
44321.   Rnd  Random noise           0
44422.   Sin  Sinus generator        2
445
446Let's change the Neuro's class to 'Sti'...
447[WARN] Param.loadSingleLine: Unknown property 'Sti.p' (ignored)
448The final object description will be then: 'Sti'
449And the full f0 genotype:
450
451p:sh=2, sx=0.806, sy=0.806, sz=2.295
452p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
453p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
454p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
455p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
456p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
457p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
458p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
459p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
460p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
461p:0.170232728584508, 0.7530512205261631, 3.1779194402835316, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
462p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
463j:0, 1, sh=1
464j:1, 2, sh=1
465j:1, 3, sh=2
466j:3, 4, sh=1
467j:4, 5, sh=1
468j:0, 6, sh=2
469j:6, 7, sh=1
470j:6, 8, sh=1
471j:0, 9, sh=1
472j:0, 10, rx=0.3229, -0.3828, 1.5117, dx=-0.48035983335347077, 0.9067404686418418, 3.10520747206641, sh=1, vg=0.857946
473j:0, 11, sh=1
474n:p=0, d=Gpart
475n:p=1
476n:j=0, d=Sti
477n:p=3
478n:p=6
479c:3, 1
480
481
482######### THE END ###########
483
484Hints:
485  1. You can redirect output: genomanipulation >filename.txt
486  2. Each run can yield different results and new behaviors, but you
487     need to uncomment rndRandomizeSeed() in genomanipulation.cpp.
488  3. This application will use custom genotype passed as
489     a commandline parameter: genomanipulation "/*9*/FULU"
490
491
Note: See TracBrowser for help on using the repository browser.