source: java/Framclipse/com.framsticks.framclipse/res/framscript.xml @ 437

Last change on this file since 437 was 437, checked in by Mateusz Poszwa, 9 years ago

Added Framclipse as developed by Bartosz Kukawka and Tomek Maciejewski in 2010

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 253.1 KB
Line 
1<?xml version="1.0"?>
2<!DOCTYPE framscript SYSTEM "framscript.dtd">
3<?xml-stylesheet type="text/xsl" href="framscript.xsl"?>
4<framscript>
5        <type name="expdef" context="expdef file">
6                <element name="code" type="string"/>
7                <element name="info" type="string"/>
8                <element name="name" type="string"/>
9                <element name="neurons" type="string"/>
10        </type>
11        <type name="prop" context="properties file">
12                <element name="flags" type="integer"/>
13                <element name="group" type="string"/>
14                <element name="help" type="string"/>
15                <element name="id" type="string"/>
16                <element name="name" type="string"/>
17                <element name="type" type="string"/>
18        </type>
19        <type name="stat" context="state file">
20                <element name="flags" type="integer"/>
21                <element name="group" type="string"/>
22                <element name="help" type="string"/>
23                <element name="id" type="string"/>
24                <element name="name" type="string"/>
25                <element name="type" type="string"/>
26        </type>
27        <type name="style" context="style file">
28<description><![CDATA[General visual style properties.]]></description>
29                <element name="code" type="string"/>
30                <element name="info" type="string"/>
31                <element name="name" type="string"/>
32                <element name="neurons" type="integer" min="0" max="1"/>
33                <element name="smooth" type="integer" min="0" max="1"/>
34                <element name="style" type="string"/>
35                <element name="tex" type="integer" min="0" max="2"/>
36                <element name="rebuild" function="true"/>
37                <element name="streload" function="true"/>
38        </type>
39        <type name="show" context="show file">
40<description><![CDATA[Show properties for the Framsticks Theater (from the *.show file).]]></description>
41                <element name="code" type="string"/>
42                <element name="dispinfo" type="integer" min="0" max="2"/>
43                <element name="expdef" type="string"/>
44                <element name="info" type="string"/>
45                <element name="mode" type="integer" min="0" max="2"/>
46                <element name="name" type="string"/>
47                <element name="regname" type="string"/>
48                <element name="show" type="string"/>
49                <element name="showlog" type="integer" min="0" max="1"/>
50                <element name="switchmode" type="integer" min="0" max="2"/>
51                <element name="switchshows" type="string">
52                        <description><![CDATA[names of the shows participating in automatic switching (comma separated). Use * as a wildcard.]]></description>
53                </element>
54                <element name="switchtime" type="integer" min="0" max="9999">
55                        <description><![CDATA[time between switching (seconds)]]></description>
56                </element>
57                <element name="userspeed" type="integer" min="0" max="5" default="3"/>
58                <element name="about" function="true"/>
59                <element name="dummy" function="true">
60                        <description><![CDATA[This is the empty item in the Theater's menu]]></description>
61                </element>
62                <element name="reload" function="true"/>
63        </type>
64        <type name="class" context="neuro file">
65                <element name="code" type="string"/>
66                <element name="description" type="string"/>
67                <element name="icon" type="string"/>
68                <element name="longname" type="string"/>
69                <element name="name" type="string"/>
70                <element name="prefinputs" type="integer"/>
71                <element name="preflocation" type="integer" min="0" max="2"/>
72                <element name="prefoutput" type="integer" min="0" max="1"/>
73                <element name="vhints" type="integer"/>
74        </type>
75        <type name="script" context="script file">
76                <element name="code" type="string"/>
77                <element name="group" type="string"/>
78                <element name="help" type="string"/>
79                <element name="name" type="string"/>
80        </type>
81        <type name="Collision" context="Global context">
82<description><![CDATA[Used in collision handlers (On___Collision). Contains the detailed information about the colliding parts (Part1,Part2 and their associated MechParts and Creatures). See the onFoodCollision() function in standard.expdef]]></description>
83                <element name="Creature1" type="Object"/>
84                <element name="Creature2" type="Object"/>
85                <element name="MechPart1" type="Object"/>
86                <element name="MechPart2" type="Object"/>
87                <element name="Part1" type="Object"/>
88                <element name="Part2" type="Object"/>
89        </type>
90        <type name="CrCollision" context="Global context">
91<description><![CDATA[Used in creature collision handlers (On___CrCollision).]]></description>
92                <element name="Creature1" type="Object"/>
93                <element name="Creature2" type="Object"/>
94        </type>
95        <type name="Creature" context="Global context">
96<description><![CDATA[The object inside the simulated world, including its physical structure, neural network and performance data. Food pieces, obstacles and other movable objects can be implemented as Creatures even though the are not "alive". See also: Population.]]></description>
97                <element name="bodysim" type="integer" min="0" max="1" default="1">
98                        <description><![CDATA[(Physical) body simulation can be disabled for individual objects which makes them immovable. Disabled objects can still participate in collisions depending on their collisions masks.
99
100Bugs: the standard collision handler does not work for disabled objects when ODE simulation is used. It means that these objects won't physically interact with other objects. The custom (scripting) handlers work as expected.]]></description>
101                </element>
102                <element name="buildproblems" type="integer"/>
103                <element name="c_velocity" type="float"/>
104                <element name="c_vertpos" type="float"/>
105                <element name="c_vertvelocity" type="float"/>
106                <element name="center_x" type="float">
107                        <description><![CDATA[Center of gravity]]></description>
108                </element>
109                <element name="center_y" type="float">
110                        <description><![CDATA[Center of gravity]]></description>
111                </element>
112                <element name="center_z" type="float">
113                        <description><![CDATA[Center of gravity]]></description>
114                </element>
115                <element name="distance" type="float"/>
116                <element name="drive" type="XYZ">
117                        <description><![CDATA[Measured in global coordinates]]></description>
118                </element>
119                <element name="energ0" type="float"/>
120                <element name="energy" type="float"/>
121                <element name="energy_b" type="float"/>
122                <element name="energy_m" type="float"/>
123                <element name="energy_p" type="float"/>
124                <element name="geno" type="Geno">
125                        <description><![CDATA[Source genotype for this creature]]></description>
126                </element>
127                <element name="genotype" type="string"/>
128                <element name="gnum" type="integer"/>
129                <element name="group" type="untyped"/>
130                <element name="idleen" type="float"/>
131                <element name="index" type="integer">
132                        <description><![CDATA[Index of this Creature in its Population.]]></description>
133                </element>
134                <element name="info" type="string">
135                        <description><![CDATA[Additional info or comments]]></description>
136                </element>
137                <element name="lifespan" type="integer"/>
138                <element name="liveModel" type="Model">
139                        <description><![CDATA[A Model object that is a copy of the current (temporary) geometry of this creature]]></description>
140                </element>
141                <element name="localDrive" type="XYZ">
142                        <description><![CDATA[Measured in local coordinates, that is, with respect to the current orientation of the creature.
143See also: Creature.orient]]></description>
144                </element>
145                <element name="model" type="Model">
146                        <description><![CDATA[Source Model for this creature]]></description>
147                </element>
148                <element name="name" type="string"/>
149                <element name="nnenabled" type="integer" min="0" max="1"/>
150                <element name="numjoints" type="integer"/>
151                <element name="numneurons" type="integer"/>
152                <element name="numparts" type="integer"/>
153                <element name="orient" type="Orient">
154                        <description><![CDATA[By convention, the orientation of the creature is equal to the orientation of its first Part]]></description>
155                </element>
156                <element name="othermask" type="integer" min="0" max="2147483647" default="0"/>
157                <element name="perf" type="integer" min="0" max="2">
158                        <description><![CDATA[Initial value of this property is taken from Population.enableperf]]></description>
159                </element>
160                <element name="pos_x" type="float">
161                        <description><![CDATA[(pos_x,pos_y,pos_z) is the point of minimal coordinates ("bottom left corner") of the creature, including imaginary Part sizes (Part.s, usually 1.0). See also: Creature.moveAbs]]></description>
162                </element>
163                <element name="pos_y" type="float">
164                        <description><![CDATA[See Creature.pos_x]]></description>
165                </element>
166                <element name="pos_z" type="float">
167                        <description><![CDATA[See Creature.pos_x]]></description>
168                </element>
169                <element name="selfcol" type="integer" min="0" max="1">
170                        <description><![CDATA[Enable/disable detection of self-collisions (within a creature body). They can only occur when using the ODE simulation engine. If enabled, the creature will have its sticks collide during lifespan.]]></description>
171                </element>
172                <element name="selfcolstate" type="integer" min="0" max="1">
173                        <description><![CDATA[Current self-collision state]]></description>
174                </element>
175                <element name="selfmask" type="integer" min="0" max="2147483647" default="0"/>
176                <element name="signals" type="CreatureSignals"/>
177                <element name="size_x" type="float">
178                        <description><![CDATA[(size_x,size_y,size_z) are dimensions of the axis-aligned bounding box of the creature, including the imaginary part sizes (Part.s, usually 1.0). A creature consisting of a single default Part has the size of (2.0,2.0,2.0) - twice the Part.s value (like a sphere diameter is twice its radius).
179See also: Creature.moveAbs]]></description>
180                </element>
181                <element name="size_y" type="float">
182                        <description><![CDATA[See Creature.size_x]]></description>
183                </element>
184                <element name="size_z" type="float">
185                        <description><![CDATA[See Creature.size_x]]></description>
186                </element>
187                <element name="uid" type="string"/>
188                <element name="user1" type="untyped"/>
189                <element name="user2" type="untyped"/>
190                <element name="user3" type="untyped"/>
191                <element name="velocity" type="float"/>
192                <element name="vertpos" type="float"/>
193                <element name="vertvel" type="float"/>
194                <element name="currentGeometryAsF0" function="true" type="string"><arguments/></element>
195                <element name="getJoint" function="true" type="Joint">
196                        <arguments>
197                                <argument name="index" type="integer"/>
198                        </arguments>
199                </element>
200                <element name="getMechJoint" function="true" type="MechJoint">
201                        <arguments>
202                                <argument name="index" type="integer"/>
203                        </arguments>
204                </element>
205                <element name="getMechPart" function="true" type="MechPart">
206                        <arguments>
207                                <argument name="index" type="integer"/>
208                        </arguments>
209                </element>
210                <element name="getNeuro" function="true" type="Neuro">
211                        <arguments>
212                                <argument name="index" type="integer"/>
213                        </arguments>
214                </element>
215                <element name="getNeuroDef" function="true" type="NeuroDef">
216                        <arguments>
217                                <argument name="index" type="integer"/>
218                        </arguments>
219                </element>
220                <element name="getPart" function="true" type="Part">
221                        <arguments>
222                                <argument name="index" type="integer"/>
223                        </arguments>
224                </element>
225                <element name="localToWorld" function="true" type="XYZ">
226                        <description><![CDATA[Local coordinates are measured with respect to the position and orientation of the first Part]]></description>
227                        <arguments>
228                                <argument name="x" type="float"/>
229                                <argument name="y" type="float"/>
230                                <argument name="z" type="float"/>
231                        </arguments>
232                </element>
233                <element name="move" function="true" type="void">
234                        <description><![CDATA[Shift the creature by a given vector.]]></description>
235                        <arguments>
236                                <argument name="x" type="float"/>
237                                <argument name="y" type="float"/>
238                                <argument name="z" type="float"/>
239                        </arguments>
240                </element>
241                <element name="moveAbs" function="true" type="void">
242                        <description><![CDATA[Moves the creature so that its origin (pos_x,pos_y,pos_z) is placed at the given location. The origin is the point of minimal coordinates ("bottom left corner"), including imaginary part sizes (Part.s, usually 1.0).
243Assuming a simple single-stick creature "X" having parts at (0,0,0) and (1,0,0),
244
245origin (pos_x,pos_y,pos_z) = (-1,-1,-1)
246size (size_x,size_y,size_z) = (3,2,2)
247
248The following example places the bottom of a creature at a given location (x,y,z):
249Creature.moveAbs(x-(Creature.size_x/2),y-(Creature.size_y/2),z-1.0)
250(assuming that the part size is 1.0)]]></description>
251                        <arguments>
252                                <argument name="x" type="float"/>
253                                <argument name="y" type="float"/>
254                                <argument name="z" type="float"/>
255                        </arguments>
256                </element>
257                <element name="moveLocal" function="true" type="void">
258                        <description><![CDATA[Local coordinates are measured with respect to the position and orientation of the first Part]]></description>
259                        <arguments>
260                                <argument name="x" type="float"/>
261                                <argument name="y" type="float"/>
262                                <argument name="z" type="float"/>
263                        </arguments>
264                </element>
265                <element name="rotate" function="true" type="void">
266                        <description><![CDATA[Rotate the creature around X, Y and Z axes. Should only be used immediately after creating a new creature (before the first simulation step is performed for this creature), otherwise further simulation can be disturbed.]]></description>
267                        <arguments>
268                                <argument name="x" type="float"/>
269                                <argument name="y" type="float"/>
270                                <argument name="z" type="float"/>
271                        </arguments>
272                </element>
273                <element name="rotateLocal" function="true" type="void">
274                        <description><![CDATA[Rotate the creature around (local) X, Y and Z axes. Should only be used immediately after creating a new creature (before the first simulation step is performed for this creature), otherwise further simulation can be disturbed.]]></description>
275                        <arguments>
276                                <argument name="x" type="float"/>
277                                <argument name="y" type="float"/>
278                                <argument name="z" type="float"/>
279                        </arguments>
280                </element>
281                <element name="worldToLocal" function="true" type="XYZ">
282                        <description><![CDATA[Local coordinates are measured with respect to the position and orientation of the first Part]]></description>
283                        <arguments>
284                                <argument name="x" type="float"/>
285                                <argument name="y" type="float"/>
286                                <argument name="z" type="float"/>
287                        </arguments>
288                </element>
289        </type>
290        <type name="CreatureSettings" context="Global context">
291<description><![CDATA[Creature building parameters]]></description>
292                <element name="bnoise_struct" type="float" min="0" max="10" default="0">
293                        <description><![CDATA[When >0, body constructs of creatures (position of Parts) will be randomly disturbed when they are created.]]></description>
294                </element>
295                <element name="bnoise_vel" type="float" min="0" max="10" default="0">
296                        <description><![CDATA[Random velocities will be applied to all body Parts (in MechaStick) or rigid segments (in ODE) of newly created creatures.]]></description>
297                </element>
298                <element name="maxjoint" type="float" min="0" max="100" default="2"/>
299                <element name="minjoint" type="float" min="0" max="100" default="0"/>
300                <element name="randinit" type="float" min="0" max="10" default="0.01">
301                        <description><![CDATA[Allowed range for initializing all neuron states with uniform distribution random numbers and zero mean. Set 0 for deterministic initialization.]]></description>
302                </element>
303                <element name="touchrange" type="float" min="0" max="100" default="1"/>
304        </type>
305        <type name="CreaturesGroup" context="Global context">
306<description><![CDATA[A set of Creature objects, sharing some high level simulation properties (performance calculation, NN simulation, collision detection, event handling). The groups usually have different roles in the experiment (Creatures groups and Food group in standard.expdef).]]></description>
307                <element name="bodysim" type="integer" min="0" max="1" default="1">
308                        <description><![CDATA[Enable/disable physical body simulation. This is the initial value of Creature.bodysim for all objects created in this group. For details, see the documentation of Creature.bodysim.]]></description>
309                </element>
310                <element name="colmask" type="integer" min="0" max="65535" default="0">
311                        <description><![CDATA[DEPRECATED. You should use selfmask and othermask (these masks are also much easier to understand than the old colmask field).]]></description>
312                </element>
313                <element name="death" type="integer" min="0" max="1" default="1">
314                        <description><![CDATA[Do creatures die when no energy?]]></description>
315                </element>
316                <element name="em_dyn" type="float" min="0" max="1" default="0">
317                        <description><![CDATA[Energy requirements for a muscle
318moving a stick]]></description>
319                </element>
320                <element name="em_stat" type="float" min="0" max="1" default="0">
321                        <description><![CDATA[Energy requirements for a muscle
322resisting an external force]]></description>
323                </element>
324                <element name="en_assim" type="float" min="0" max="1" default="0">
325                        <description><![CDATA[Maximal energy gain produced by a vertical specialized stick.
326Horizontal specialized sticks get half of this value.]]></description>
327                </element>
328                <element name="enableperf" type="integer" min="0" max="2" default="1">
329                        <description><![CDATA[Stabilization means no significant movement during a specified period of time.]]></description>
330                </element>
331                <element name="energy" type="integer" min="0" max="1" default="1">
332                        <description><![CDATA[If turned off, creature's energy will be constant.]]></description>
333                </element>
334                <element name="index" type="integer"/>
335                <element name="killnostable" type="integer" min="0" max="10000000" default="1000000">
336                        <description><![CDATA[Creatures that fail to stabilize after the specified waiting period (e.g. because they are continuously rolling) will be killed. 0 disables this feature.]]></description>
337                </element>
338                <element name="name" type="string"/>
339                <element name="nnsim" type="integer" min="0" max="2" default="1">
340                        <description><![CDATA[Stabilization means no significant movement during a specified period of time.]]></description>
341                </element>
342                <element name="othermask" type="integer" min="0" max="2147483647" default="0">
343                        <description><![CDATA[See selfmask.]]></description>
344                </element>
345                <element name="perfperiod" type="integer" min="0" max="1000000" default="100">
346                        <description><![CDATA[Defines how often onUpdate() events are called. Also used to compute partial performance of creatures (distance, speed, etc.) and to determine stabilization.]]></description>
347                </element>
348                <element name="selfcol" type="integer" min="0" max="1" default="0">
349                        <description><![CDATA[Detect collisions within creature bodies (only applicable for the ODE simulation engine). This is the initial value of Creature.selfcol for all objects created in this group. If enabled, creatures with self-colliding genotypes are not born, and others will have their sticks collide during lifespan.]]></description>
350                </element>
351                <element name="selfmask" type="integer" min="0" max="2147483647" default="0">
352                        <description><![CDATA[Collisions between objects can be handled in two ways:
353 - standard 'mechanical' collision (simple 'rebound' effect)
354 - special script handler (On[GROUPNAME]Collision function)
355
356In the script handler function, use the Collision object to access the two colliding parts of two creatures.
357The first part in the Collision object (i.e. Collision.Creature1) always concerns the creature that belongs to [GROUPNAME].
358The handler is called once for each creature that collides with the creature from [GROUPNAME].
359
360Collision masks determine which one will be used (none and both are also possible). On each collision, selfmask and othermask of the colliding objects are logically ANDed. 16 lower bits (0xffff) enable the standard handler. 16 higher bits (0xffff0000) enable the custom handler.
361Examples:
362
3631.With one group, all possible combinations of the collision handlers are as follows:
364  - ignore collisions (e.g. selfmask=othermask=0)
365  - use standard handling (e.g. selfmask=othermask=1)
366  - use custom handling (e.g. selfmask=othermask=0x10000)
367  - use standard and custom handling (e.g. selfmask=othermask=0x10001)
368
3692.Two groups yield more interesting cases. Let us consider the 'standard.expdef' setting:
370  Creatures: selfmask=0x10001, othermask=0x20001
371  Food colmask = selfmask=0x20002, othermask=0x10002
372There are three possible scenarios:
373- creature and creature: collision value = 0x10001 & 0x20001 = 1 -> Standard handling will be used (1 is one of the lower 16 bits)
374- food and food: collision value = 0x20002 & 0x10002 = 2 -> As above.
375- creature and food: collision value = (0x10001 & 0x10002) or (0x20002 & 0x20001) = 0x10000 or 0x20000 -> Custom handling will be used (higher 16 bits).
376]]></description>
377                </element>
378                <element name="size" type="integer"/>
379                <element name="stabilperiod" type="integer" min="0" max="1000000" default="100">
380                        <description><![CDATA["Performance sampling period" for the stabilization phase.]]></description>
381                </element>
382                <element name="stabledist" type="float" min="0" max="1" default="0.01">
383                        <description><![CDATA[A creature is considered stabilized when its center of gravity stays within the specified distance after the "Sampling period while waiting" has elapsed.]]></description>
384                </element>
385                <element name="createFromGeno" function="true" type="Creature">
386                        <description><![CDATA[Uses the supplied Geno object]]></description>
387                        <arguments>
388                                <argument type="Geno"/>
389                        </arguments>
390                </element>
391                <element name="createFromGenotype" function="true" type="Creature">
392                        <description><![CDATA[Uses the selected Genotype object]]></description>
393<arguments/></element>
394                <element name="createFromString" function="true" type="Creature">
395                        <description><![CDATA[Uses the supplied string argument]]></description>
396                        <arguments>
397                                <argument name="genotype" type="string"/>
398                        </arguments>
399                </element>
400                <element name="delete" function="true" type="void">
401                        <description><![CDATA[delete creature]]></description>
402                        <arguments>
403                                <argument name="creature index" type="integer"/>
404                        </arguments>
405                </element>
406                <element name="findCreatureAt" function="true" type="Creature">
407                        <arguments>
408                                <argument name="point" type="Vector"/>
409                                <argument name="vector" type="Vector"/>
410                        </arguments>
411                </element>
412                <element name="findUID" function="true" type="integer">
413                        <arguments>
414                                <argument name="uid" type="string"/>
415                        </arguments>
416                </element>
417                <element name="get" function="true" type="Creature">
418                        <arguments>
419                                <argument name="index" type="integer"/>
420                        </arguments>
421                </element>
422                <element name="kill" function="true" type="void">
423                        <description><![CDATA[kill creature]]></description>
424                        <arguments>
425                                <argument name="creature index" type="integer"/>
426                        </arguments>
427                </element>
428                <element name="senseCreaturesProperty" function="true" type="float">
429                        <description><![CDATA[arguments:
430 - x,y,z (sensor position)
431 - property (name, name[index] or Class:id). name[index] can be used for Vector objects inside the user fields, eg "user2[10]"
432 - exclude (creature object)
433works like a smell sensor for a given property (for all creatures in this group except "exclude").
434The following function reproduces the "classic" framsticks "S" sensor:
435function smellReceptorValue(x,y,z,exclude)
436{
437var i,s=0; for(i=0;i<Populations.size;i++)
438        s+=Populations[0].senseCreaturesProperty(x,y,z,"energy",exclude);
439return s;
440}]]></description>
441                        <arguments>
442                                <argument name="x" type="float"/>
443                                <argument name="y" type="float"/>
444                                <argument name="z" type="float"/>
445                                <argument name="propertyname" type="string"/>
446                                <argument name="exclude" type="Creature"/>
447                        </arguments>
448                </element>
449        </type>
450        <type name="CreatureSignals" context="Global context">
451<description><![CDATA[Signal sources associated with the creature. See also: Signal, WorldSignals, NeuroSignals]]></description>
452                <element name="size" type="integer">
453                        <description><![CDATA[Number of signals in this set]]></description>
454                </element>
455                <element name="add" function="true" type="Signal">
456                        <description><![CDATA[Create a new signal]]></description>
457                        <arguments>
458                                <argument name="channel" type="string"/>
459                        </arguments>
460                </element>
461                <element name="addProperty" function="true" type="Signal">
462                        <description><![CDATA[Create a signal that automatically reflects one of the creature's properties (i.e. its power is equal to the property value).
463Example:
464Creature.signals.addProperty("energy","energy"); //then, Neuro.signals.receive("energy") in custom neuron would work similarly to the built-in smell sensor]]></description>
465                        <arguments>
466                                <argument name="channel" type="string"/>
467                                <argument name="property" type="untyped"/>
468                        </arguments>
469                </element>
470                <element name="clear" function="true" type="void">
471                        <description><![CDATA[Delete all signals]]></description>
472<arguments/></element>
473                <element name="get" function="true" type="Signal">
474                        <description><![CDATA[Access individual signals (index=0 .. size-1)]]></description>
475                        <arguments>
476                                <argument name="index" type="integer"/>
477                        </arguments>
478                </element>
479                <element name="receive" function="true" type="float">
480                        <description><![CDATA[Receive the aggregated signal power in a given channel.]]></description>
481                        <arguments>
482                                <argument name="channel" type="string"/>
483                        </arguments>
484                </element>
485                <element name="receiveFilter" function="true" type="float">
486                        <description><![CDATA[Receive the aggregated signal power in a given channel.
487
488Additional filtering options:
489- Max distance only receives the neighbor signals (based on their physical location)
490- Flavor filtering: only signals having the flavor close to the specified one will be received. The filter value is the maximum allowed difference.]]></description>
491                        <arguments>
492                                <argument name="channel" type="string"/>
493                                <argument name="max distance" type="float"/>
494                                <argument name="flavor" type="float"/>
495                                <argument name="filter" type="float"/>
496                        </arguments>
497                </element>
498                <element name="receiveSet" function="true" type="Vector">
499                        <description><![CDATA[Get all signals in the specified range. Returns a readonly vector object containing Signal objects (individual signals can be accessed as result[0], .., result[result.size-1]).]]></description>
500                        <arguments>
501                                <argument name="channel" type="string"/>
502                                <argument name="max distance" type="float"/>
503                        </arguments>
504                </element>
505                <element name="receiveSingle" function="true" type="Signal">
506                        <description><![CDATA[Find the signal source having the highest signal power (including the distance)]]></description>
507                        <arguments>
508                                <argument name="channel" type="string"/>
509                                <argument name="max distance" type="float"/>
510                        </arguments>
511                </element>
512        </type>
513        <type name="Dictionary" context="Global context">
514<description><![CDATA[Dictionary associates stored values with string keys ("key" is the first argument in get/set/remove functions). Integer "key" can be used to enumerate all elements.
515Example: var d=Dictionary.new(); d.set("name","John"); d.set("age",44);
516var i,element; for(i=0;i<d.size;i++) element=d.get(i);]]></description>
517                <element name="size" type="integer"/>
518                <element name="toString" type="string"/>
519                <element name="clear" function="true" type="void"><arguments/></element>
520                <element name="find" function="true" type="string">
521                        <description><![CDATA[returns the element key or null if not found]]></description>
522                        <arguments>
523                                <argument name="value" type="untyped"/>
524                        </arguments>
525                </element>
526                <element name="get" function="true" type="untyped">
527                        <arguments>
528                                <argument name="key" type="untyped"/>
529                        </arguments>
530                </element>
531                <element name="new" function="true" type="Dictionary"><arguments/></element>
532                <element name="remove" function="true" type="void">
533                        <arguments>
534                                <argument name="key" type="untyped"/>
535                        </arguments>
536                </element>
537                <element name="set" function="true" type="void">
538                        <arguments>
539                                <argument name="key" type="untyped"/>
540                                <argument name="value" type="untyped"/>
541                        </arguments>
542                </element>
543        </type>
544        <type name="File" context="Global context">
545<description><![CDATA[Provides read/write access to the filesystem. Can be used in the experiment definition to save the experiment state (onExpSave). Files are created in the "scripts_output" subdirectory of the directory where the Framsticks executable is located.]]></description>
546                <element name="EOF" type="integer" min="0" max="1"/>
547                <element name="info" type="string"/>
548                <element name="name" type="string"/>
549                <element name="path" type="string"/>
550                <element name="pathseparator" type="string"/>
551                <element name="append" function="true" type="File ">
552                        <arguments>
553                                <argument name="filename" type="string"/>
554                                <argument name="description" type="string"/>
555                        </arguments>
556                </element>
557                <element name="appendDirect" function="true" type="File ">
558                        <arguments>
559                                <argument name="filename" type="string"/>
560                                <argument name="description" type="string"/>
561                        </arguments>
562                </element>
563                <element name="close" function="true" type="string">
564                        <description><![CDATA[returns file contents if it has been buffered]]></description>
565<arguments/></element>
566                <element name="create" function="true" type="File">
567                        <arguments>
568                                <argument name="filename" type="string"/>
569                                <argument name="description" type="string"/>
570                        </arguments>
571                </element>
572                <element name="createDirect" function="true" type="File">
573                        <arguments>
574                                <argument name="filename" type="string"/>
575                                <argument name="description" type="string"/>
576                        </arguments>
577                </element>
578                <element name="exists" function="true" type="integer" min="0" max="1">
579                        <description><![CDATA[Sample:
580File.exists("default.sim") -> return 0 or 1]]></description>
581<arguments/></element>
582                <element name="flush" function="true" type="void">
583                        <description><![CDATA[useful for unbuffered disk files only (openDirect, appendDirect)]]></description>
584<arguments/></element>
585                <element name="new" function="true" type="File "><arguments/></element>
586                <element name="newFromString" function="true" type="File ">
587                        <arguments>
588                                <argument name="text" type="string"/>
589                        </arguments>
590                </element>
591                <element name="open" function="true" type="File ">
592                        <arguments>
593                                <argument name="filename" type="string"/>
594                        </arguments>
595                </element>
596                <element name="readLine" function="true" type="string"><arguments/></element>
597                <element name="readObject" function="true" type="void">
598                        <arguments>
599                                <argument type="Object"/>
600                        </arguments>
601                </element>
602                <element name="readUntilEOF" function="true" type="string"><arguments/></element>
603                <element name="system" function="true" type="integer">
604                        <description><![CDATA[Invokes a system command and returns its exit code (0 usually means the command was completed successfully).
605
606Example:
607File.system("wget",["-O","/tmp/filename","http://example.com/file"]);]]></description>
608                        <arguments>
609                                <argument name="executable" type="string"/>
610                                <argument name="string arguments" type="Vector"/>
611                        </arguments>
612                </element>
613                <element name="writeComment" function="true" type="void">
614                        <arguments>
615                                <argument name="anything" type="string"/>
616                        </arguments>
617                </element>
618                <element name="writeNameObject" function="true" type="void">
619                        <arguments>
620                                <argument name="name" type="string"/>
621                                <argument type="Object"/>
622                        </arguments>
623                </element>
624                <element name="writeObject" function="true" type="void">
625                        <arguments>
626                                <argument type="Object"/>
627                        </arguments>
628                </element>
629                <element name="writeObjectBegin" function="true" type="void">
630                        <arguments>
631                                <argument type="Object"/>
632                        </arguments>
633                </element>
634                <element name="writeObjectEnd" function="true" type="void"><arguments/></element>
635                <element name="writeObjectField" function="true" type="void">
636                        <arguments>
637                                <argument type="Object"/>
638                                <argument name="field index or name" type="untyped"/>
639                        </arguments>
640                </element>
641                <element name="writeObjectFieldForce" function="true" type="void">
642                        <arguments>
643                                <argument type="Object"/>
644                                <argument name="field index or name" type="untyped"/>
645                        </arguments>
646                </element>
647                <element name="writeObjectFields" function="true" type="void">
648                        <arguments>
649                                <argument type="Object"/>
650                        </arguments>
651                </element>
652                <element name="writeObjectFieldsForce" function="true" type="void">
653                        <arguments>
654                                <argument type="Object"/>
655                        </arguments>
656                </element>
657                <element name="writeString" function="true" type="void">
658                        <arguments>
659                                <argument name="anything" type="untyped"/>
660                        </arguments>
661                </element>
662        </type>
663        <type name="GenePool" context="Global context">
664<description><![CDATA[The static GenePool object refers to the "selected group" as described in GenePools.]]></description>
665                <element name="fitfun" type="integer" min="0" max="1" default="0">
666                        <description><![CDATA[Enables fitness scaling.]]></description>
667                </element>
668                <element name="fitm" type="float" min="0" max="10" default="2">
669                        <description><![CDATA[Lower threshold: how many standard deviations below average?
670(avg - n * stddev) - used for fitness shifting]]></description>
671                </element>
672                <element name="fitma" type="float" min="1" max="10" default="2">
673                        <description><![CDATA[The best genotype is as many times
674better than the average one.]]></description>
675                </element>
676                <element name="fitness" type="string">
677                        <description><![CDATA[(intended for advanced users)]]></description>
678                </element>
679                <element name="index" type="integer"/>
680                <element name="name" type="string"/>
681                <element name="size" type="integer">
682                        <description><![CDATA[In standard.expdef, this is equivalent to the number of unique genotypes. Standard experiment definition uses the Genotype.instances field to indicate that some genotypes exist in multiple instances despite having only one item in the group. Other experiment definitions may create multiple copies of the same genotype.]]></description>
683                </element>
684                <element name="totalpop" type="integer">
685                        <description><![CDATA[Takes into account the Genotype.instances field (which may give the total number of instances depending on the experiment definition).]]></description>
686                </element>
687                <element name="addGeno" function="true" type="Genotype">
688                        <description><![CDATA[Creates a new Genotype from the supplied Geno object.
689Returns the created Genotype.]]></description>
690                        <arguments>
691                                <argument type="Geno"/>
692                        </arguments>
693                </element>
694                <element name="delete" function="true" type="void">
695                        <description><![CDATA[Deletes a genotype.]]></description>
696                        <arguments>
697                                <argument name="genotype index" type="integer"/>
698                        </arguments>
699                </element>
700                <element name="findGeno" function="true" type="integer">
701                        <description><![CDATA[Finds the Genotype matching the supplied Geno object.
702returns genotype index or -1 if not found.]]></description>
703                        <arguments>
704                                <argument type="Geno"/>
705                        </arguments>
706                </element>
707                <element name="findUID" function="true" type="integer">
708                        <arguments>
709                                <argument name="uid" type="string"/>
710                        </arguments>
711                </element>
712                <element name="get" function="true" type="Genotype">
713                        <arguments>
714                                <argument name="index" type="integer"/>
715                        </arguments>
716                </element>
717        </type>
718        <type name="GenePools" context="Global context">
719<description><![CDATA[Manages all genotypes in the experiment, organized in one or more groups. Some functions refer to the "selected genotype" i.e. the genotype number "GenePools.genotype" in the pool number "GenePools.group". For example to access the first genoype in the first group you could do:
720GenePools.group=0; GenePools.genotype=0; var name=Genotype.name;
721However, the preferred way doesn't refer to the static Genotype object:
722 var name=GenePools[0][0].name;
723
724Apart from the Genotypes in the group, there is also one temporary Genotype object used by genetic operators and some functions from GenePools. Genotype points to that object when "GenePools.genotype"=-1. The following code accesses that object before adding it to the genotype group:
725GenePools.newGenotype("X");
726 //makes the temporary object from the "X" genotype, GenePools.genotype is now -1
727GenePools.mutateSelected();
728 //the temporary object is mutated
729Genotype.info="my favorite genotype";
730 //modify the temporary object
731GenePools.copySelected(0);
732 //copy the current, i.e. temporary genotype to the genotype group #0]]></description>
733                <element name="genotype" type="integer">
734                        <description><![CDATA[Index of the currently selected genotype or -1 if no genotype is selected.]]></description>
735                </element>
736                <element name="group" type="integer">
737                        <description><![CDATA[Index of the currently selected group (GenePool).]]></description>
738                </element>
739                <element name="size" type="integer"/>
740                <element name="addGroup" function="true" type="void">
741                        <description><![CDATA[Adds a new gene pool.]]></description>
742                        <arguments>
743                                <argument name="name" type="string"/>
744                        </arguments>
745                </element>
746                <element name="addPerformanceFromCreature" function="true" type="void">
747                        <description><![CDATA[Updates the current Genotype's performance values merging them with the current Creture's performance. It assumes the Genotype.instances has a reasonable value and performs the proper weighting. Use your own function instead if these conditions are not met in your experiment.]]></description>
748<arguments/></element>
749                <element name="clear" function="true" type="void">
750                        <description><![CDATA[Removes all gene pools except the first one.]]></description>
751<arguments/></element>
752                <element name="clearGroup" function="true" type="void">
753                        <arguments>
754                                <argument name="index" type="integer"/>
755                        </arguments>
756                </element>
757                <element name="copySelected" function="true" type="void">
758                        <description><![CDATA[Copies the selected genotype to another group.]]></description>
759                        <arguments>
760                                <argument name="groupindex" type="integer"/>
761                        </arguments>
762                </element>
763                <element name="crossoverSelected" function="true" type="void">
764                        <description><![CDATA[Crossovers the selected genotype with another one (from the genotype group). The resulting genotype is stored in the static Genotype object detached from the genotype group. After calling this function GenePools.genotype is -1 indicating that no genotype from the group is selected.]]></description>
765                        <arguments>
766                                <argument name="other index" type="integer"/>
767                        </arguments>
768                </element>
769                <element name="deleteGroup" function="true" type="void">
770                        <description><![CDATA[Removes a gene pool.]]></description>
771                        <arguments>
772                                <argument name="index" type="integer"/>
773                        </arguments>
774                </element>
775                <element name="deleteOne" function="true" type="void">
776                        <description><![CDATA[Deletes one individual from the gene pool = decreases 'instances' and deletes the genotype if the 'instances' goes to 0.]]></description>
777                        <arguments>
778                                <argument name="genotype index" type="integer"/>
779                        </arguments>
780                </element>
781                <element name="deleteSelected" function="true" type="void">
782                        <description><![CDATA[Deletes selected genotype from the gene pool (uses the selected genotype object).]]></description>
783<arguments/></element>
784                <element name="findGenotype" function="true" type="integer">
785                        <description><![CDATA[Finds a genotype matching the current genotype. It only makes sense when the current genotype is a result of the genetic operator.]]></description>
786<arguments/></element>
787                <element name="findGenotypeForCreature" function="true" type="integer">
788                        <description><![CDATA[Finds a genotype matching the selected creature.]]></description>
789<arguments/></element>
790                <element name="get" function="true" type="GenePool">
791                        <arguments>
792                                <argument name="index" type="integer"/>
793                        </arguments>
794                </element>
795                <element name="getFromCreature" function="true" type="void">
796                        <description><![CDATA[Copies a genotype from the selected creature. The resulting genotype is stored in the static Genotype object detached from the genotype group.]]></description>
797<arguments/></element>
798                <element name="getFromCreatureObject" function="true" type="void">
799                        <description><![CDATA[Copies a genotype from the creature object passed in argument. The resulting genotype is stored in the static Genotype object detached from the genotype group.]]></description>
800                        <arguments>
801                                <argument type="Creature"/>
802                        </arguments>
803                </element>
804                <element name="likeThisRoulette" function="true" type="integer">
805                        <description><![CDATA[Gets a random genotype similar to the selected one, fitness-proportional.]]></description>
806                        <arguments>
807                                <argument name="minimum similarity" type="float"/>
808                        </arguments>
809                </element>
810                <element name="mutateSelected" function="true" type="void">
811                        <description><![CDATA[Mutates the selected genotype. The resulting genotype is stored in the static Genotype object detached from the genotype group. After calling this function GenePools.genotype is -1 indicating that no genotype from the group is selected.]]></description>
812<arguments/></element>
813                <element name="newGenotype" function="true" type="void">
814                        <description><![CDATA[Makes a new genotype from the supplied string and select the genotype. The resulting genotype is stored in the static Genotype object detached from the genotype group. After calling this function GenePools.genotype is -1 indicating that no genotype from the group is selected. (call "copySelected" if you want to add this gentype to the genotype group).]]></description>
815                        <arguments>
816                                <argument name="genotype" type="string"/>
817                        </arguments>
818                </element>
819                <element name="random" function="true" type="integer">
820                        <description><![CDATA[Gets random genotype.]]></description>
821<arguments/></element>
822                <element name="randomLikeThis" function="true" type="integer">
823                        <description><![CDATA[Gets a random genotype similar to the selected one.]]></description>
824                        <arguments>
825                                <argument name="minimum similarity" type="float"/>
826                        </arguments>
827                </element>
828                <element name="revroulette" function="true" type="integer">
829                        <description><![CDATA[Get reverse fitness-proportional genotype.]]></description>
830<arguments/></element>
831                <element name="roulette" function="true" type="integer">
832                        <description><![CDATA[Gets fitness-proportional genotype.]]></description>
833<arguments/></element>
834                <element name="tournament" function="true" type="integer">
835                        <description><![CDATA[Gets tournament winner genotype.]]></description>
836                        <arguments>
837                                <argument name="genotypes in tournament" type="integer"/>
838                        </arguments>
839                </element>
840                <element name="worst" function="true" type="integer">
841                        <description><![CDATA[Gets worst genotype.]]></description>
842<arguments/></element>
843        </type>
844        <type name="GenMan" context="Global context">
845<description><![CDATA[Manages various genetic operations, using appropriate operators for the argument genotype format.]]></description>
846                <element name="changedProperty" type="integer"/>
847                <element name="changedPropertyId" type="string"/>
848                <element name="f0_c_del" type="float" min="0" max="100" default="5">
849                        <description><![CDATA[]]></description>
850                </element>
851                <element name="f0_c_new" type="float" min="0" max="100" default="5">
852                        <description><![CDATA[]]></description>
853                </element>
854                <element name="f0_c_wei" type="float" min="0" max="100" default="10">
855                        <description><![CDATA[]]></description>
856                </element>
857                <element name="f0_j_del" type="float" min="0" max="100" default="5">
858                        <description><![CDATA[]]></description>
859                </element>
860                <element name="f0_j_new" type="float" min="0" max="100" default="5">
861                        <description><![CDATA[]]></description>
862                </element>
863                <element name="f0_j_rsf" type="float" min="0" max="100" default="10">
864                        <description><![CDATA[]]></description>
865                </element>
866                <element name="f0_j_stf" type="float" min="0" max="100" default="10">
867                        <description><![CDATA[]]></description>
868                </element>
869                <element name="f0_j_stm" type="float" min="0" max="100" default="10">
870                        <description><![CDATA[]]></description>
871                </element>
872                <element name="f0_n_del" type="float" min="0" max="100" default="5">
873                        <description><![CDATA[]]></description>
874                </element>
875                <element name="f0_n_new" type="float" min="0" max="100" default="5">
876                        <description><![CDATA[]]></description>
877                </element>
878                <element name="f0_n_prp" type="float" min="0" max="100" default="10">
879                        <description><![CDATA[]]></description>
880                </element>
881                <element name="f0_nodel_tag" type="integer" min="0" max="1" default="1">
882                        <description><![CDATA[You can tag elements using their 'i' field and the i="mi=d" tag.
883Mutations will not delete such elements.
884The i="mi=dm" combination is allowed.]]></description>
885                </element>
886                <element name="f0_nomod_tag" type="integer" min="0" max="1" default="1">
887                        <description><![CDATA[You can tag elements using their 'i' field and the i="mi=m" tag.
888Mutations will not modify properties of such elements.
889The i="mi=md" combination is allowed.]]></description>
890                </element>
891                <element name="f0_p_asm" type="float" min="0" max="100" default="10">
892                        <description><![CDATA[]]></description>
893                </element>
894                <element name="f0_p_del" type="float" min="0" max="100" default="5">
895                        <description><![CDATA[]]></description>
896                </element>
897                <element name="f0_p_frc" type="float" min="0" max="100" default="10">
898                        <description><![CDATA[]]></description>
899                </element>
900                <element name="f0_p_ing" type="float" min="0" max="100" default="10">
901                        <description><![CDATA[]]></description>
902                </element>
903                <element name="f0_p_mas" type="float" min="0" max="100" default="10">
904                        <description><![CDATA[]]></description>
905                </element>
906                <element name="f0_p_new" type="float" min="0" max="100" default="5">
907                        <description><![CDATA[]]></description>
908                </element>
909                <element name="f0_p_pos" type="float" min="0" max="100" default="10">
910                        <description><![CDATA[]]></description>
911                </element>
912                <element name="f0_p_swp" type="float" min="0" max="100" default="10">
913                        <description><![CDATA[]]></description>
914                </element>
915                <element name="f1_mut_exmod" type="string">
916                        <description><![CDATA[Modifiers that will not be added nor deleted during mutation
917(all: RrLlAaCcFfMmSsIiQqWwEe)]]></description>
918                </element>
919                <element name="f1_nmConn" type="float" min="0" max="100" default="0.1">
920                        <description><![CDATA[]]></description>
921                </element>
922                <element name="f1_nmNeu" type="float" min="0" max="100" default="0.05">
923                        <description><![CDATA[Adds a (connected) neuron or removes a neuron]]></description>
924                </element>
925                <element name="f1_nmProp" type="float" min="0" max="100" default="0.1">
926                        <description><![CDATA[]]></description>
927                </element>
928                <element name="f1_nmVal" type="float" min="0" max="100" default="0.05"/>
929                <element name="f1_nmWei" type="float" min="0" max="100" default="1"/>
930                <element name="f1_smComma" type="float" min="0" max="100" default="0.02"/>
931                <element name="f1_smJunct" type="float" min="0" max="100" default="0.02"/>
932                <element name="f1_smModif" type="float" min="0" max="100" default="0.1">
933                        <description><![CDATA[Modifiers: RrLlAaCcFfMmSsIiQqWwEe]]></description>
934                </element>
935                <element name="f1_smX" type="float" min="0" max="100" default="0.05"/>
936                <element name="f1_xo_propor" type="integer" min="0" max="1" default="1">
937                        <description><![CDATA[Cross over (exchange) corresponding segments of the two parent genotypes?
938
939f1 uses a two-point crossing over.
940If this option is turned on, cut points will be selected proportionally to neural genes.
941Thus, if both parents have the same number of neurons, then this will be preserved in their children.]]></description>
942                </element>
943                <element name="f2_mutAddOper" type="float" min="0" max="1" default="0.4">
944                        <description><![CDATA[]]></description>
945                </element>
946                <element name="f2_mutConnElem" type="float" min="0" max="1" default="0.33">
947                        <description><![CDATA[]]></description>
948                </element>
949                <element name="f2_mutDelOper" type="float" min="0" max="1" default="0.1">
950                        <description><![CDATA[]]></description>
951                </element>
952                <element name="f2_mutHandleOper" type="float" min="0" max="1" default="0.3">
953                        <description><![CDATA[]]></description>
954                </element>
955                <element name="f2_mutJointElem" type="float" min="0" max="1" default="0.33">
956                        <description><![CDATA[]]></description>
957                </element>
958                <element name="f2_mutNeuroElem" type="float" min="0" max="1" default="0.33">
959                        <description><![CDATA[]]></description>
960                </element>
961                <element name="f2_mutPropOper" type="float" min="0" max="1" default="0.2">
962                        <description><![CDATA[]]></description>
963                </element>
964                <element name="f3_mutDelIns" type="float" min="0" max="1" default="0.1">
965                        <description><![CDATA[]]></description>
966                </element>
967                <element name="f3_mutDelInsLength" type="integer" min="1" max="100" default="5">
968                        <description><![CDATA[]]></description>
969                </element>
970                <element name="f3_mutDelInsPerChar" type="float" min="0" max="1" default="0.05">
971                        <description><![CDATA[]]></description>
972                </element>
973                <element name="f3_mutDuplication" type="float" min="0" max="1" default="0.05">
974                        <description><![CDATA[]]></description>
975                </element>
976                <element name="f3_mutSubstitution" type="float" min="0" max="1" default="0.6">
977                        <description><![CDATA[]]></description>
978                </element>
979                <element name="f3_mutSubstPerChar" type="float" min="0" max="1" default="0.1">
980                        <description><![CDATA[]]></description>
981                </element>
982                <element name="f3_mutTranslocation" type="float" min="0" max="1" default="0.15">
983                        <description><![CDATA[]]></description>
984                </element>
985                <element name="f3_xovCrossingOver" type="float" min="0" max="1" default="0.2">
986                        <description><![CDATA[]]></description>
987                </element>
988                <element name="f3_xovGeneTransfer" type="float" min="0" max="1" default="0.8">
989                        <description><![CDATA[]]></description>
990                </element>
991                <element name="f4_mut_add" type="float" min="0" max="100" default="50">
992                        <description><![CDATA[mutation: probability of adding a node]]></description>
993                </element>
994                <element name="f4_mut_add_conn" type="float" min="0" max="100" default="15">
995                        <description><![CDATA[add node mutation: probability of adding a neural connection]]></description>
996                </element>
997                <element name="f4_mut_add_div" type="float" min="0" max="100" default="20">
998                        <description><![CDATA[add node mutation: probability of adding a division]]></description>
999                </element>
1000                <element name="f4_mut_add_neupar" type="float" min="0" max="100" default="5">
1001                        <description><![CDATA[add node mutation: probability of adding a neuron property/modifier]]></description>
1002                </element>
1003                <element name="f4_mut_add_rep" type="float" min="0" max="100" default="10">
1004                        <description><![CDATA[add node mutation: probability of adding a repetition]]></description>
1005                </element>
1006                <element name="f4_mut_add_simp" type="float" min="0" max="100" default="50">
1007                        <description><![CDATA[add node mutation: probability of adding a random, simple gene]]></description>
1008                </element>
1009                <element name="f4_mut_del" type="float" min="0" max="100" default="20">
1010                        <description><![CDATA[mutation: probability of deleting a node]]></description>
1011                </element>
1012                <element name="f4_mut_mod" type="float" min="0" max="100" default="30">
1013                        <description><![CDATA[mutation: probability of changing a node]]></description>
1014                </element>
1015                <element name="gen_extmutinfo" type="integer" min="0" max="2" default="0">
1016                        <description><![CDATA[If active, information about employed mutation method will be stored in the 'info' field of each mutated genotype.]]></description>
1017                </element>
1018                <element name="gen_hilite" type="integer" min="0" max="1" default="1">
1019                        <description><![CDATA[Use colors for genes?
1020(slows down viewing/editing of huge genotypes)]]></description>
1021                </element>
1022                <element name="gen_hist" type="integer" min="0" max="1" default="0">
1023                        <description><![CDATA[Required for phylogenetic analysis]]></description>
1024                </element>
1025                <element name="genoper_f0" type="integer" min="0" max="0">
1026                        <description><![CDATA[]]></description>
1027                </element>
1028                <element name="genoper_f1" type="integer" min="0" max="0">
1029                        <description><![CDATA[]]></description>
1030                </element>
1031                <element name="genoper_f2" type="integer" min="0" max="0">
1032                        <description><![CDATA[]]></description>
1033                </element>
1034                <element name="genoper_f3" type="integer" min="0" max="0">
1035                        <description><![CDATA[]]></description>
1036                </element>
1037                <element name="genoper_f4" type="integer" min="0" max="0">
1038                        <description><![CDATA[]]></description>
1039                </element>
1040                <element name="neuadd_N" type="integer" min="0" max="1">
1041                        <description><![CDATA[Standard neuron
1042
1043Characteristics:
1044   supports any number of inputs
1045   provides output value
1046   does not require location in body
1047
1048
1049Properties:
1050   Inertia (in) float 0..1
1051   Force (fo) float 0..999
1052   Sigmoid (si) float -99999..99999
1053   State (s) float -1..1]]></description>
1054                </element>
1055                <element name="neuadd_Nu" type="integer" min="0" max="1">
1056                        <description><![CDATA[Works like standard neuron (N) but the output value is scaled to 0...+1 instead of -1...+1.
1057Having 0 as one of the saturation states should help in "gate circuits", where input signal is passed through or blocked depending on the other singal.
1058
1059Characteristics:
1060   supports any number of inputs
1061   provides output value
1062   does not require location in body
1063
1064
1065Properties:
1066   Inertia (in) float 0..1
1067   Force (fo) float 0..999
1068   Sigmoid (si) float -99999..99999
1069   State (s) float -1..1]]></description>
1070                </element>
1071                <element name="neuadd_G" type="integer" min="0" max="1">
1072                        <description><![CDATA[Equilibrium sensor.
10730=the stick is horizontal
1074+1/-1=the stick is vertical
1075
1076Characteristics:
1077   does not use inputs
1078   provides output value
1079   should be located on a Joint
1080]]></description>
1081                </element>
1082                <element name="neuadd_T" type="integer" min="0" max="1">
1083                        <description><![CDATA[Touch sensor.
1084-1=no contact
10850=just touching
1086>0=pressing, value depends on the force applied
1087
1088Characteristics:
1089   does not use inputs
1090   provides output value
1091   should be located on a Part
1092
1093
1094Properties:
1095   Range (r) float 0..1]]></description>
1096                </element>
1097                <element name="neuadd_S" type="integer" min="0" max="1">
1098                        <description><![CDATA[Smell sensor. Aggregated "smell of energy" experienced from all energy objects (creatures and food pieces).
1099Close objects have bigger influence than the distant ones: for each energy source, its partial feeling is proportional to its energy/(distance^2)
1100
1101Characteristics:
1102   does not use inputs
1103   provides output value
1104   should be located on a Part
1105]]></description>
1106                </element>
1107                <element name="neuadd_*" type="integer" min="0" max="1">
1108                        <description><![CDATA[Constant value
1109
1110Characteristics:
1111   does not use inputs
1112   provides output value
1113   does not require location in body
1114]]></description>
1115                </element>
1116                <element name="neuadd_|" type="integer" min="0" max="1">
1117                        <description><![CDATA[Characteristics:
1118   uses single input
1119   does not provide output value
1120   should be located on a Joint
1121
1122
1123Properties:
1124   power (p) float 0.01..1
1125   bending range (r) float 0..1]]></description>
1126                </element>
1127                <element name="neuadd_@" type="integer" min="0" max="1">
1128                        <description><![CDATA[Characteristics:
1129   uses single input
1130   does not provide output value
1131   should be located on a Joint
1132
1133
1134Properties:
1135   power (p) float 0.01..1]]></description>
1136                </element>
1137                <element name="neuadd_D" type="integer" min="0" max="1">
1138                        <description><![CDATA[Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights
1139
1140Characteristics:
1141   supports any number of inputs
1142   provides output value
1143   does not require location in body
1144]]></description>
1145                </element>
1146                <element name="neuadd_Fuzzy" type="integer" min="0" max="1">
1147                        <description><![CDATA[Refer to publications to learn more about this neuron.
1148
1149Characteristics:
1150   supports any number of inputs
1151   provides output value
1152   does not require location in body
1153
1154
1155Properties:
1156   number of fuzzy sets (ns) integer
1157   number of rules (nr) integer
1158   fuzzy sets (fs) string
1159   fuzzy rules (fr) string]]></description>
1160                </element>
1161                <element name="neuadd_VEye" type="integer" min="0" max="1">
1162                        <description><![CDATA[Refer to publications to learn more about this neuron.
1163
1164Characteristics:
1165   uses single input
1166   provides output value
1167   should be located on a Part
1168
1169
1170Properties:
1171   target.x (tx) float
1172   target.y (ty) float
1173   target.z (tz) float
1174   target shape (ts) string
1175   perspective (p) float 0.1..10
1176   scale (s) float 0.1..100
1177   show hidden lines (h) integer 0..1
1178   output lines count (each line needs four channels) (o) integer 0..99
1179   debug (d) integer 0..1]]></description>
1180                </element>
1181                <element name="neuadd_VMotor" type="integer" min="0" max="1">
1182                        <description><![CDATA[Must be connected to the VEye and properly set up. Refer to publications to learn more about this neuron.
1183
1184Characteristics:
1185   supports any number of inputs
1186   provides output value
1187   does not require location in body
1188
1189
1190Properties:
1191   number of basic features (noIF) integer
1192   number of degrees of freedom (noDim) integer
1193   parameters (params) string]]></description>
1194                </element>
1195                <element name="neuadd_Sti" type="integer" min="0" max="1">
1196                        <description><![CDATA[Characteristics:
1197   uses single input
1198   does not provide output value
1199   should be located on a Part
1200]]></description>
1201                </element>
1202                <element name="neuadd_LMu" type="integer" min="0" max="1">
1203                        <description><![CDATA[Characteristics:
1204   uses single input
1205   does not provide output value
1206   should be located on a Joint
1207
1208
1209Properties:
1210   power (p) float 0.01..1]]></description>
1211                </element>
1212                <element name="neuadd_Water" type="integer" min="0" max="1">
1213                        <description><![CDATA[Output signal:
12140=on or above water surface
12151=under water (deeper than 1)
12160..1=in the transient area just below water surface
1217
1218Characteristics:
1219   does not use inputs
1220   provides output value
1221   should be located on a Part
1222]]></description>
1223                </element>
1224                <element name="neuadd_Energy" type="integer" min="0" max="1">
1225                        <description><![CDATA[The current energy level divided by the initial energy level.
1226Usually falls from initial 1.0 down to 0.0 and then the creature dies. It can rise above 1.0 if enough food is ingested
1227
1228Characteristics:
1229   does not use inputs
1230   provides output value
1231   does not require location in body
1232]]></description>
1233                </element>
1234                <element name="neuadd_Ch" type="integer" min="0" max="1">
1235                        <description><![CDATA[Combines all input signals into a single multichannel output; Note: ChSel and ChMux are the only neurons which support multiple channels. Other neurons discard everything except the first channel.
1236
1237Characteristics:
1238   supports any number of inputs
1239   provides output value
1240   does not require location in body
1241]]></description>
1242                </element>
1243                <element name="neuadd_ChMux" type="integer" min="0" max="1">
1244                        <description><![CDATA[Outputs the selected channel from the second (multichannel) input. The first input is used as the selector value (-1=select first channel, .., 1=last channel)
1245
1246Characteristics:
1247   uses 2 inputs
1248   provides output value
1249   does not require location in body
1250]]></description>
1251                </element>
1252                <element name="neuadd_ChSel" type="integer" min="0" max="1">
1253                        <description><![CDATA[Outputs a single channel (selected by the "ch" parameter) from multichannel input
1254
1255Characteristics:
1256   uses single input
1257   provides output value
1258   does not require location in body
1259
1260
1261Properties:
1262   channel (ch) integer]]></description>
1263                </element>
1264                <element name="neuadd_Rnd" type="integer" min="0" max="1">
1265                        <description><![CDATA[Generates random noise (subsequent random values in the range of -1..+1)
1266
1267Characteristics:
1268   does not use inputs
1269   provides output value
1270   does not require location in body
1271]]></description>
1272                </element>
1273                <element name="neuadd_Sin" type="integer" min="0" max="1">
1274                        <description><![CDATA[Output frequency = f0+input
1275
1276Characteristics:
1277   uses single input
1278   provides output value
1279   does not require location in body
1280
1281
1282Properties:
1283   base frequency (f0) float -1..1
1284   time (t) float 0..6.28319]]></description>
1285                </element>
1286                <element name="add" function="true"/>
1287                <element name="addGroup" function="true"/>
1288                <element name="clear" function="true"/>
1289                <element name="crossOver" function="true" type="Geno">
1290                        <description><![CDATA[returns crossed over genotype]]></description>
1291                        <arguments>
1292                                <argument type="Geno"/>
1293                                <argument type="Geno"/>
1294                        </arguments>
1295                </element>
1296                <element name="getSimplest" function="true" type="Geno">
1297                        <description><![CDATA[returns the simplest genotype for a given encoding (format). 0 means f0, 4 means f4, etc.]]></description>
1298                        <arguments>
1299                                <argument name="format" type="integer"/>
1300                        </arguments>
1301                </element>
1302                <element name="mutate" function="true" type="Geno">
1303                        <description><![CDATA[returns mutated Geno object from supplied Geno]]></description>
1304                        <arguments>
1305                                <argument type="Geno"/>
1306                        </arguments>
1307                </element>
1308                <element name="operReport" function="true" type="void">
1309                        <description><![CDATA[Show available genetic operators]]></description>
1310<arguments/></element>
1311                <element name="remove" function="true"/>
1312                <element name="removeGroup" function="true"/>
1313                <element name="toHTML" function="true" type="string">
1314                        <description><![CDATA[returns genotype expressed as colored HTML]]></description>
1315                        <arguments>
1316                                <argument type="string"/>
1317                        </arguments>
1318                </element>
1319                <element name="toHTMLshort" function="true" type="string">
1320                        <description><![CDATA[returns genotype (abbreviated if needed) expressed as colored HTML]]></description>
1321                        <arguments>
1322                                <argument type="string"/>
1323                        </arguments>
1324                </element>
1325                <element name="validate" function="true" type="Geno">
1326                        <description><![CDATA[returns validated (if possible) Geno object from supplied Geno]]></description>
1327                        <arguments>
1328                                <argument type="Geno"/>
1329                        </arguments>
1330                </element>
1331        </type>
1332        <type name="GenManStats" context="Global context">
1333<description><![CDATA[Statistics for genetic operations.]]></description>
1334                <element name="gen_count" type="integer">
1335                        <description><![CDATA[]]></description>
1336                </element>
1337                <element name="gen_mfailed" type="integer">
1338                        <description><![CDATA[couldn't be performed]]></description>
1339                </element>
1340                <element name="gen_minvalid" type="integer">
1341                        <description><![CDATA[couldn't be repaired]]></description>
1342                </element>
1343                <element name="gen_mutimpr" type="float">
1344                        <description><![CDATA[total cumulative mutation change]]></description>
1345                </element>
1346                <element name="gen_mvalid" type="integer">
1347                        <description><![CDATA[]]></description>
1348                </element>
1349                <element name="gen_mvalidated" type="integer">
1350                        <description><![CDATA[]]></description>
1351                </element>
1352                <element name="gen_xofailed" type="integer">
1353                        <description><![CDATA[couldn't be performed]]></description>
1354                </element>
1355                <element name="gen_xoimpr" type="float">
1356                        <description><![CDATA[total cumulative crossover change]]></description>
1357                </element>
1358                <element name="gen_xoinvalid" type="integer">
1359                        <description><![CDATA[couldn't be repaired]]></description>
1360                </element>
1361                <element name="gen_xovalid" type="integer">
1362                        <description><![CDATA[]]></description>
1363                </element>
1364                <element name="gen_xovalidated" type="integer">
1365                        <description><![CDATA[]]></description>
1366                </element>
1367                <element name="clrstats" function="true" type="void">
1368                        <description><![CDATA[]]></description>
1369<arguments/></element>
1370        </type>
1371        <type name="Geno" context="Global context">
1372<description><![CDATA[All information about a single genotype.
1373This is a genetics-only object which does not contain any performance data. See also: Genotype class]]></description>
1374                <element name="autoname" type="string"/>
1375                <element name="f0genotype" type="string">
1376                        <description><![CDATA[converted to f0 genotype]]></description>
1377                </element>
1378                <element name="format" type="integer">
1379                        <description><![CDATA[Genotype format]]></description>
1380                </element>
1381                <element name="genotype" type="string"/>
1382                <element name="info" type="string">
1383                        <description><![CDATA[Additional information or comments]]></description>
1384                </element>
1385                <element name="isValid" type="integer" min="0" max="1"/>
1386                <element name="name" type="string"/>
1387                <element name="rawgenotype" type="string">
1388                        <description><![CDATA[Genotype, excluding the format specifier]]></description>
1389                </element>
1390                <element name="getConverted" function="true" type="Geno">
1391                        <arguments>
1392                                <argument name="format" type="integer"/>
1393                        </arguments>
1394                </element>
1395                <element name="new" function="true" type="Geno"><arguments/></element>
1396                <element name="newFrom" function="true" type="Geno">
1397                        <arguments>
1398                                <argument name="genotype" type="string"/>
1399                                <argument name="format" type="integer"/>
1400                                <argument name="name" type="string"/>
1401                                <argument name="description" type="string"/>
1402                        </arguments>
1403                </element>
1404                <element name="newFromString" function="true" type="Geno">
1405                        <arguments>
1406                                <argument name="genotype" type="string"/>
1407                        </arguments>
1408                </element>
1409        </type>
1410        <type name="Genotype" context="Global context">
1411<description><![CDATA[A Genotype with the associated performance information. All but one Genotype objects are placed in Genotype Groups. There is also a single static Genotype object not associated with a group, which is used as a temporary storage by genetic operators and some functions from GenePools.]]></description>
1412                <element name="convtrace1" type="string"/>
1413                <element name="distance" type="float"/>
1414                <element name="energ0" type="float"/>
1415                <element name="f0genotype" type="string">
1416                        <description><![CDATA[converted to f0 genotype]]></description>
1417                </element>
1418                <element name="fit" type="float"/>
1419                <element name="fit2" type="float">
1420                        <description><![CDATA[Fitness shifted by (avg-n*stddev)]]></description>
1421                </element>
1422                <element name="geno" type="Geno">
1423                        <description><![CDATA[Geno object for this Genotype]]></description>
1424                </element>
1425                <element name="genotype" type="string"/>
1426                <element name="gnum" type="integer"/>
1427                <element name="info" type="string">
1428                        <description><![CDATA[Additional information or comments]]></description>
1429                </element>
1430                <element name="instances" type="integer">
1431                        <description><![CDATA[Copies of this genotype]]></description>
1432                </element>
1433                <element name="isValid" type="integer" min="0" max="1"/>
1434                <element name="lifespan" type="float">
1435                        <description><![CDATA[Average life span]]></description>
1436                </element>
1437                <element name="name" type="string"/>
1438                <element name="nncon" type="float"/>
1439                <element name="nnsiz" type="float"/>
1440                <element name="num" type="integer"/>
1441                <element name="numconnections" type="float"/>
1442                <element name="numjoints" type="float"/>
1443                <element name="numneurons" type="float"/>
1444                <element name="numparts" type="float"/>
1445                <element name="popsiz" type="integer"/>
1446                <element name="simi" type="float"/>
1447                <element name="strjoints" type="float"/>
1448                <element name="strsiz" type="float"/>
1449                <element name="uid" type="string">
1450                        <description><![CDATA[Unique identifier]]></description>
1451                </element>
1452                <element name="user1" type="untyped"/>
1453                <element name="user2" type="untyped"/>
1454                <element name="user3" type="untyped"/>
1455                <element name="velocity" type="float">
1456                        <description><![CDATA[Average velocity]]></description>
1457                </element>
1458                <element name="vertpos" type="float"/>
1459                <element name="vertvel" type="float"/>
1460                <element name="getModel" function="true" type="Model"><arguments/></element>
1461                <element name="getNormalized" function="true" type="float">
1462                        <arguments>
1463                                <argument name="property name or index" type="untyped"/>
1464                        </arguments>
1465                </element>
1466                <element name="mutate" function="true" type="void"><arguments/></element>
1467        </type>
1468        <type name="GenotypeGroup" context="Global context">
1469<description><![CDATA[The static GenePool object refers to the "selected group" as described in GenePools.]]></description>
1470                <element name="fitfun" type="integer" min="0" max="1" default="0">
1471                        <description><![CDATA[Enables fitness scaling.]]></description>
1472                </element>
1473                <element name="fitm" type="float" min="0" max="10" default="2">
1474                        <description><![CDATA[Lower threshold: how many standard deviations below average?
1475(avg - n * stddev) - used for fitness shifting]]></description>
1476                </element>
1477                <element name="fitma" type="float" min="1" max="10" default="2">
1478                        <description><![CDATA[The best genotype is as many times
1479better than the average one.]]></description>
1480                </element>
1481                <element name="fitness" type="string">
1482                        <description><![CDATA[(intended for advanced users)]]></description>
1483                </element>
1484                <element name="index" type="integer"/>
1485                <element name="name" type="string"/>
1486                <element name="size" type="integer">
1487                        <description><![CDATA[In standard.expdef, this is equivalent to the number of unique genotypes. Standard experiment definition uses the Genotype.instances field to indicate that some genotypes exist in multiple instances despite having only one item in the group. Other experiment definitions may create multiple copies of the same genotype.]]></description>
1488                </element>
1489                <element name="totalpop" type="integer">
1490                        <description><![CDATA[Takes into account the Genotype.instances field (which may give the total number of instances depending on the experiment definition).]]></description>
1491                </element>
1492                <element name="addGeno" function="true" type="Genotype">
1493                        <description><![CDATA[Creates a new Genotype from the supplied Geno object.
1494Returns the created Genotype.]]></description>
1495                        <arguments>
1496                                <argument type="Geno"/>
1497                        </arguments>
1498                </element>
1499                <element name="delete" function="true" type="void">
1500                        <description><![CDATA[Deletes a genotype.]]></description>
1501                        <arguments>
1502                                <argument name="genotype index" type="integer"/>
1503                        </arguments>
1504                </element>
1505                <element name="findGeno" function="true" type="integer">
1506                        <description><![CDATA[Finds the Genotype matching the supplied Geno object.
1507returns genotype index or -1 if not found.]]></description>
1508                        <arguments>
1509                                <argument type="Geno"/>
1510                        </arguments>
1511                </element>
1512                <element name="findUID" function="true" type="integer">
1513                        <arguments>
1514                                <argument name="uid" type="string"/>
1515                        </arguments>
1516                </element>
1517                <element name="get" function="true" type="Genotype">
1518                        <arguments>
1519                                <argument name="index" type="integer"/>
1520                        </arguments>
1521                </element>
1522        </type>
1523        <type name="Interface" context="Global context">
1524<description><![CDATA[Used to query for object member descriptions. Example:
1525var iface=Interface.makeFrom(someobject); var description="this object has "+iface.properties+" properties, first property is "+iface.getId(0);]]></description>
1526                <element name="groups" type="integer"/>
1527                <element name="name" type="string"/>
1528                <element name="properties" type="integer"/>
1529                <element name="findGroupId" function="true" type="integer">
1530                        <arguments>
1531                                <argument name="name" type="string"/>
1532                        </arguments>
1533                </element>
1534                <element name="findId" function="true" type="integer">
1535                        <arguments>
1536                                <argument name="name" type="string"/>
1537                        </arguments>
1538                </element>
1539                <element name="findIdInGroup" function="true" type="integer">
1540                        <arguments>
1541                                <argument name="name" type="string"/>
1542                                <argument name="group name or index" type="untyped"/>
1543                        </arguments>
1544                </element>
1545                <element name="get" function="true" type="untyped">
1546                        <arguments>
1547                                <argument name="index" type="integer"/>
1548                        </arguments>
1549                </element>
1550                <element name="getFlags" function="true" type="integer">
1551                        <arguments>
1552                                <argument name="index" type="integer"/>
1553                        </arguments>
1554                </element>
1555                <element name="getGroup" function="true" type="integer">
1556                        <arguments>
1557                                <argument name="index" type="integer"/>
1558                        </arguments>
1559                </element>
1560                <element name="getGroupName" function="true" type="string">
1561                        <arguments>
1562                                <argument name="index" type="integer"/>
1563                        </arguments>
1564                </element>
1565                <element name="getHelp" function="true" type="string">
1566                        <arguments>
1567                                <argument name="index" type="integer"/>
1568                        </arguments>
1569                </element>
1570                <element name="getId" function="true" type="string">
1571                        <arguments>
1572                                <argument name="index" type="integer"/>
1573                        </arguments>
1574                </element>
1575                <element name="getName" function="true" type="string">
1576                        <arguments>
1577                                <argument name="index" type="integer"/>
1578                        </arguments>
1579                </element>
1580                <element name="getType" function="true" type="string">
1581                        <arguments>
1582                                <argument name="index" type="integer"/>
1583                        </arguments>
1584                </element>
1585                <element name="invoke" function="true" type="void">
1586                        <arguments>
1587                                <argument name="function name or index" type="untyped"/>
1588                                <argument name="arguments" type="Vector"/>
1589                        </arguments>
1590                </element>
1591                <element name="makeFrom" function="true" type="Interface">
1592                        <arguments>
1593                                <argument type="Object"/>
1594                        </arguments>
1595                </element>
1596                <element name="set" function="true" type="void">
1597                        <arguments>
1598                                <argument name="index" type="integer"/>
1599                                <argument name="value" type="untyped"/>
1600                        </arguments>
1601                </element>
1602                <element name="setAllDefault" function="true" type="void"><arguments/></element>
1603                <element name="setDefault" function="true" type="void">
1604                        <arguments>
1605                                <argument name="index" type="integer"/>
1606                        </arguments>
1607                </element>
1608        </type>
1609        <type name="Joint" context="Global context">
1610                <element name="dx" type="float" min="-2" max="2" default="0"/>
1611                <element name="dy" type="float" min="-2" max="2" default="0"/>
1612                <element name="dz" type="float" min="-2" max="2" default="0"/>
1613                <element name="i" type="string"/>
1614                <element name="p1" type="integer" min="-1" max="999999" default="-1"/>
1615                <element name="p2" type="integer" min="-1" max="999999" default="-1"/>
1616                <element name="rotstif" type="float" min="0" max="1" default="1"/>
1617                <element name="rx" type="float"/>
1618                <element name="ry" type="float"/>
1619                <element name="rz" type="float"/>
1620                <element name="stam" type="float" min="0" max="1" default="0.25"/>
1621                <element name="stif" type="float" min="0" max="1" default="1"/>
1622                <element name="Vstyle" type="string"/>
1623        </type>
1624        <type name="Loader" context="Global context">
1625<description><![CDATA[Support for loading files in the Framsticks format. Used in the experiment definition to retrieve experiment state (see OnExpLoad function in standard.expdef). Registered objects (addClass) are handled automaticaly. Loader can call user functions defined by setBreakLabel.]]></description>
1626                <element name="AfterObject" type="integer"/>
1627                <element name="BeforeObject" type="integer"/>
1628                <element name="BeforeUnknown" type="integer"/>
1629                <element name="comment" type="string"/>
1630                <element name="currentObject" type="Object"/>
1631                <element name="firstComment" type="integer" min="0" max="1"/>
1632                <element name="objectName" type="string"/>
1633                <element name="OnComment" type="integer"/>
1634                <element name="OnError" type="integer"/>
1635                <element name="status" type="integer"/>
1636                <element name="abort" function="true" type="void"><arguments/></element>
1637                <element name="addClass" function="true" type="void">
1638                        <arguments>
1639                                <argument type="Object"/>
1640                        </arguments>
1641                </element>
1642                <element name="clearClasses" function="true" type="void"><arguments/></element>
1643                <element name="go" function="true" type="integer"><arguments/></element>
1644                <element name="loadObject" function="true" type="void"><arguments/></element>
1645                <element name="removeClass" function="true" type="void">
1646                        <arguments>
1647                                <argument type="Object"/>
1648                        </arguments>
1649                </element>
1650                <element name="run" function="true" type="integer"><arguments/></element>
1651                <element name="setBreak" function="true" type="void">
1652                        <arguments>
1653                                <argument name="break conditions" type="integer"/>
1654                        </arguments>
1655                </element>
1656                <element name="setBreakLabel" function="true" type="void">
1657                        <arguments>
1658                                <argument name="break condition" type="integer"/>
1659                                <argument name="label" type="string"/>
1660                        </arguments>
1661                </element>
1662                <element name="skipObject" function="true" type="void"><arguments/></element>
1663        </type>
1664        <type name="Math" context="Global context">
1665<description><![CDATA[Mathematical functions library.]]></description>
1666                <element name="pi" type="float"/>
1667                <element name="pi2" type="float"/>
1668                <element name="pi4" type="float"/>
1669                <element name="rnd01" type="float"/>
1670                <element name="rndGaussStd" type="float"/>
1671                <element name="seed" type="integer">
1672                        <description><![CDATA[Random number generator seed.
1673Note: Math.seed influences all future random activity in the simulator, not only Math.rnd01 results.]]></description>
1674                </element>
1675                <element name="time" type="float">
1676                        <description><![CDATA[Number of seconds since the Epoch (00:00:00 UTC/GMT, January 1, 1970)]]></description>
1677                </element>
1678                <element name="twopi" type="float"/>
1679                <element name="abs" function="true" type="float">
1680                        <arguments>
1681                                <argument type="float"/>
1682                        </arguments>
1683                </element>
1684                <element name="acos" function="true" type="float">
1685                        <arguments>
1686                                <argument type="float"/>
1687                        </arguments>
1688                </element>
1689                <element name="asin" function="true" type="float">
1690                        <arguments>
1691                                <argument type="float"/>
1692                        </arguments>
1693                </element>
1694                <element name="atan" function="true" type="float">
1695                        <arguments>
1696                                <argument type="float"/>
1697                        </arguments>
1698                </element>
1699                <element name="atan2" function="true" type="float">
1700                        <arguments>
1701                                <argument name="y" type="float"/>
1702                                <argument name="x" type="float"/>
1703                        </arguments>
1704                </element>
1705                <element name="cos" function="true" type="float">
1706                        <arguments>
1707                                <argument type="float"/>
1708                        </arguments>
1709                </element>
1710                <element name="exp" function="true" type="float">
1711                        <arguments>
1712                                <argument type="float"/>
1713                        </arguments>
1714                </element>
1715                <element name="log" function="true" type="float">
1716                        <arguments>
1717                                <argument type="float"/>
1718                        </arguments>
1719                </element>
1720                <element name="max" function="true" type="untyped">
1721                        <arguments>
1722                                <argument type="untyped"/>
1723                                <argument type="untyped"/>
1724                        </arguments>
1725                </element>
1726                <element name="min" function="true" type="untyped">
1727                        <arguments>
1728                                <argument type="untyped"/>
1729                                <argument type="untyped"/>
1730                        </arguments>
1731                </element>
1732                <element name="pow" function="true" type="float">
1733                        <arguments>
1734                                <argument name="a" type="float"/>
1735                                <argument name="b" type="float"/>
1736                        </arguments>
1737                </element>
1738                <element name="random" function="true" type="integer">
1739                        <description><![CDATA[0..num-1]]></description>
1740                        <arguments>
1741                                <argument name="num" type="integer"/>
1742                        </arguments>
1743                </element>
1744                <element name="rndCustom" function="true" type="float">
1745                        <description><![CDATA[the parameter describes the desired random distribution, being a sum of uniform distributions, eg. rndCustom([-10,-1, -1,1, 1,10]) defines 3 uniform distribution intervals [-1,10) [-1,1), [1,10)]]></description>
1746                        <arguments>
1747                                <argument type="Vector"/>
1748                        </arguments>
1749                </element>
1750                <element name="rndGauss" function="true" type="float">
1751                        <description><![CDATA[rndGaussStd is rndGauss(0,1)]]></description>
1752                        <arguments>
1753                                <argument name="center" type="float"/>
1754                                <argument name="stdandard deviation" type="float"/>
1755                        </arguments>
1756                </element>
1757                <element name="rndUni" function="true" type="float">
1758                        <description><![CDATA[[begin..end)]]></description>
1759                        <arguments>
1760                                <argument name="begin" type="float"/>
1761                                <argument name="end" type="float"/>
1762                        </arguments>
1763                </element>
1764                <element name="sigmoid" function="true" type="float">
1765                        <arguments>
1766                                <argument type="float"/>
1767                        </arguments>
1768                </element>
1769                <element name="sign" function="true" type="integer">
1770                        <arguments>
1771                                <argument type="float"/>
1772                        </arguments>
1773                </element>
1774                <element name="sin" function="true" type="float">
1775                        <arguments>
1776                                <argument type="float"/>
1777                        </arguments>
1778                </element>
1779                <element name="sqrt" function="true" type="float">
1780                        <arguments>
1781                                <argument type="float"/>
1782                        </arguments>
1783                </element>
1784        </type>
1785        <type name="MechJoint" context="Global context">
1786                <element name="dx" type="float"/>
1787                <element name="dy" type="float"/>
1788                <element name="dz" type="float"/>
1789                <element name="part1" type="MechPart"/>
1790                <element name="part2" type="MechPart"/>
1791                <element name="rotstif" type="float"/>
1792                <element name="rotstress" type="float"/>
1793                <element name="rx" type="float"/>
1794                <element name="ry" type="float"/>
1795                <element name="rz" type="float"/>
1796                <element name="stif" type="float"/>
1797                <element name="stress" type="float"/>
1798        </type>
1799        <type name="MechPart" context="Global context">
1800                <element name="fr" type="float"/>
1801                <element name="m" type="float"/>
1802                <element name="orient" type="Orient"/>
1803                <element name="oxx" type="float"/>
1804                <element name="oxy" type="float"/>
1805                <element name="oxz" type="float"/>
1806                <element name="oyx" type="float"/>
1807                <element name="oyy" type="float"/>
1808                <element name="oyz" type="float"/>
1809                <element name="ozx" type="float"/>
1810                <element name="ozy" type="float"/>
1811                <element name="ozz" type="float"/>
1812                <element name="pos" type="XYZ"/>
1813                <element name="s" type="float"/>
1814                <element name="v" type="XYZ"/>
1815                <element name="vol" type="float"/>
1816                <element name="vx" type="float"/>
1817                <element name="vy" type="float"/>
1818                <element name="vz" type="float"/>
1819                <element name="x" type="float"/>
1820                <element name="y" type="float"/>
1821                <element name="z" type="float"/>
1822                <element name="applyForce" function="true" type="void">
1823                        <arguments>
1824                                <argument name="x" type="float"/>
1825                                <argument name="y" type="float"/>
1826                                <argument name="z" type="float"/>
1827                        </arguments>
1828                </element>
1829        </type>
1830        <type name="Model" context="Global context">
1831                <element name="geno" type="Geno"/>
1832                <element name="numconnections" type="integer"/>
1833                <element name="numjoints" type="integer"/>
1834                <element name="numneurons" type="integer"/>
1835                <element name="numparts" type="integer"/>
1836                <element name="se" type="float"/>
1837                <element name="size_x" type="float">
1838                        <description><![CDATA[(size_x,size_y,size_z) are dimensions of the axis-aligned bounding box of the creature, including imaginary Part sizes (Part.s, usually 1.0). A creature consisting of a single default part has the size of (2.0,2.0,2.0) - twice the Part.s value (like a sphere diameter is twice its radius).
1839See also: Creature.moveAbs]]></description>
1840                </element>
1841                <element name="size_y" type="float">
1842                        <description><![CDATA[See Model.size_x]]></description>
1843                </element>
1844                <element name="size_z" type="float">
1845                        <description><![CDATA[See Model.size_x]]></description>
1846                </element>
1847                <element name="Vstyle" type="string"/>
1848                <element name="getJoint" function="true" type="Joint">
1849                        <arguments>
1850                                <argument name="index" type="integer"/>
1851                        </arguments>
1852                </element>
1853                <element name="getNeuroDef" function="true" type="NeuroDef">
1854                        <arguments>
1855                                <argument name="index" type="integer"/>
1856                        </arguments>
1857                </element>
1858                <element name="getPart" function="true" type="Part">
1859                        <arguments>
1860                                <argument name="index" type="integer"/>
1861                        </arguments>
1862                </element>
1863                <element name="newFromGeno" function="true" type="Model">
1864                        <arguments>
1865                                <argument type="Geno"/>
1866                        </arguments>
1867                </element>
1868                <element name="newFromString" function="true" type="Model">
1869                        <arguments>
1870                                <argument name="genotype" type="string"/>
1871                        </arguments>
1872                </element>
1873        </type>
1874        <type name="Neuro" context="Global context">
1875<description><![CDATA[Live Neuron object.]]></description>
1876                <element name="channelCount" type="integer"/>
1877                <element name="creature" type="Creature"/>
1878                <element name="currState" type="float">
1879                        <description><![CDATA[The only difference from the "state" field is that currState, when written, changes the internal neuron state immediately (which disturbs the regular synchronous NN operation). This feature should only be used while controlling the neuron 'from outside' (like a neuro probe) and not in the neuron definition. See also: Neuro.hold]]></description>
1880                </element>
1881                <element name="def" type="NeuroDef"/>
1882                <element name="fields" type="Fields">
1883                        <description><![CDATA[Neurons can have different fields depending on their class. Script neurons have their fields defined using the "prop:" syntax. If you develop a custom neuron script you should use the Fields object for accessing your own neuron fields. The Neuro.fields property is meant for accessing the neuron fields from the outside script.
1884Examples:
1885var c=Populations.createFromString("X[N]");
1886Simulator.print("standard neuron inertia="+c.getNeuro(0).fields.in);
1887c=Populations.createFromString("X[Nn,e:0.1]");
1888Simulator.print("noisy neuron error rate="+c.getNeuro(0).fields.e);
1889
1890The Interface object can be used to discover which fields are available for a certain neuron object:
1891c=Populations.createFromString("X[N]");
1892var iobj=Interface.makeFrom(c.getNeuro(0).fields);
1893var i;
1894for(i=0;i<iobj.properties;i++)
1895 Simulator.print(iobj.getId(i)+" ("+iobj.getName(i)+")");]]></description>
1896                </element>
1897                <element name="getInputCount" type="integer"/>
1898                <element name="hold" type="integer" min="0" max="1">
1899                        <description><![CDATA["Holding" means keeping the neuron state as is, blocking the regular neuron operation. This is useful when your script needs to inject some control signals into the NN. Without "holding", live neurons would be constantly overwriting your changes, and the rest of the NN could see inconsistent states, depending on the connections. Setting hold=1 ensures the neuron state will be only set by you, and not by the neuron. The enforced signal value can be set using Neuro.currState before or after setting hold=1. Set hold=0 to resume normal operation.]]></description>
1900                </element>
1901                <element name="inputSum" type="float"/>
1902                <element name="joint" type="MechJoint"/>
1903                <element name="part" type="MechPart"/>
1904                <element name="position_x" type="float"/>
1905                <element name="position_y" type="float"/>
1906                <element name="position_z" type="float"/>
1907                <element name="signals" type="NeuroSignals"/>
1908                <element name="state" type="float">
1909                        <description><![CDATA[When read, returns the current neuron state.
1910When written, sets the next neuron state (for use in the neuron definition)]]></description>
1911                </element>
1912                <element name="weightedInputSum" type="float"/>
1913                <element name="getInputChannelCount" function="true" type="integer">
1914                        <arguments>
1915                                <argument name="input" type="integer"/>
1916                        </arguments>
1917                </element>
1918                <element name="getInputState" function="true" type="float">
1919                        <arguments>
1920                                <argument name="input" type="integer"/>
1921                        </arguments>
1922                </element>
1923                <element name="getInputStateChannel" function="true" type="float">
1924                        <arguments>
1925                                <argument name="input" type="integer"/>
1926                                <argument name="channel" type="integer"/>
1927                        </arguments>
1928                </element>
1929                <element name="getInputSum" function="true" type="float">
1930                        <arguments>
1931                                <argument name="input" type="integer"/>
1932                        </arguments>
1933                </element>
1934                <element name="getInputWeight" function="true" type="float">
1935                        <arguments>
1936                                <argument name="input" type="integer"/>
1937                        </arguments>
1938                </element>
1939                <element name="getStateChannel" function="true" type="float">
1940                        <arguments>
1941                                <argument name="channel" type="integer"/>
1942                        </arguments>
1943                </element>
1944                <element name="getWeightedInputState" function="true" type="float">
1945                        <arguments>
1946                                <argument name="input" type="integer"/>
1947                        </arguments>
1948                </element>
1949                <element name="getWeightedInputStateChannel" function="true" type="float">
1950                        <arguments>
1951                                <argument name="input" type="integer"/>
1952                                <argument name="channel" type="integer"/>
1953                        </arguments>
1954                </element>
1955                <element name="getWeightedInputSum" function="true" type="float">
1956                        <description><![CDATA[Uses any number of inputs starting with the specified input. getWeightedInputSum(0)=weightedInputSum]]></description>
1957                        <arguments>
1958                                <argument name="input" type="integer"/>
1959                        </arguments>
1960                </element>
1961                <element name="setCurrStateChannel" function="true" type="void">
1962                        <description><![CDATA[Analogous to "currState".]]></description>
1963                        <arguments>
1964                                <argument name="channel" type="integer"/>
1965                                <argument name="value" type="float"/>
1966                        </arguments>
1967                </element>
1968                <element name="setStateChannel" function="true" type="void">
1969                        <arguments>
1970                                <argument name="channel" type="integer"/>
1971                                <argument name="value" type="float"/>
1972                        </arguments>
1973                </element>
1974        </type>
1975        <type name="NeuroClass" context="Global context">
1976<description><![CDATA[The static NeuroClass object refers to class selected in the NeuroClassLibrary.]]></description>
1977                <element name="description" type="string"/>
1978                <element name="glyph" type="string"/>
1979                <element name="longname" type="string"/>
1980                <element name="name" type="string"/>
1981                <element name="prefinputs" type="integer"/>
1982                <element name="preflocation" type="integer" min="0" max="2"/>
1983                <element name="prefoutput" type="integer" min="0" max="1"/>
1984                <element name="properties" type="Interface"/>
1985                <element name="summary" type="string">
1986                        <description><![CDATA[Textual summary of all features]]></description>
1987                </element>
1988                <element name="visualhints" type="integer"/>
1989        </type>
1990        <type name="NeuroClassLibrary" context="Global context">
1991<description><![CDATA[Set of Neuron classes. You can access the selected class in the static NeuroClass object.]]></description>
1992                <element name="class" type="integer">
1993                        <description><![CDATA[0 ... count-1]]></description>
1994                </element>
1995                <element name="count" type="integer"/>
1996                <element name="findClass" function="true" type="void">
1997                        <arguments>
1998                                <argument name="class name" type="string"/>
1999                        </arguments>
2000                </element>
2001        </type>
2002        <type name="NeuroDef" context="Global context">
2003                <element name="d" type="string"/>
2004                <element name="getInputCount" type="integer"/>
2005                <element name="i" type="string"/>
2006                <element name="j" type="integer" min="-1" max="999999" default="-1"/>
2007                <element name="p" type="integer" min="-1" max="999999" default="-1"/>
2008                <element name="Vstyle" type="string"/>
2009                <element name="getInputNeuroDef" function="true" type="NeuroDef">
2010                        <arguments>
2011                                <argument type="integer"/>
2012                        </arguments>
2013                </element>
2014                <element name="getInputNeuroIndex" function="true" type="integer">
2015                        <arguments>
2016                                <argument type="integer"/>
2017                        </arguments>
2018                </element>
2019                <element name="getInputWeight" function="true" type="float">
2020                        <arguments>
2021                                <argument type="integer"/>
2022                        </arguments>
2023                </element>
2024        </type>
2025        <type name="NeuronsSimEnabled" context="Global context">
2026                <element name="ncl_N" type="integer" min="0" max="1">
2027                        <description><![CDATA[Standard neuron
2028
2029Characteristics:
2030   supports any number of inputs
2031   provides output value
2032   does not require location in body
2033
2034
2035Properties:
2036   Inertia (in) float 0..1
2037   Force (fo) float 0..999
2038   Sigmoid (si) float -99999..99999
2039   State (s) float -1..1]]></description>
2040                </element>
2041                <element name="ncl_Nu" type="integer" min="0" max="1">
2042                        <description><![CDATA[Works like standard neuron (N) but the output value is scaled to 0...+1 instead of -1...+1.
2043Having 0 as one of the saturation states should help in "gate circuits", where input signal is passed through or blocked depending on the other singal.
2044
2045Characteristics:
2046   supports any number of inputs
2047   provides output value
2048   does not require location in body
2049
2050
2051Properties:
2052   Inertia (in) float 0..1
2053   Force (fo) float 0..999
2054   Sigmoid (si) float -99999..99999
2055   State (s) float -1..1]]></description>
2056                </element>
2057                <element name="ncl_G" type="integer" min="0" max="1">
2058                        <description><![CDATA[Equilibrium sensor.
20590=the stick is horizontal
2060+1/-1=the stick is vertical
2061
2062Characteristics:
2063   does not use inputs
2064   provides output value
2065   should be located on a Joint
2066]]></description>
2067                </element>
2068                <element name="ncl_T" type="integer" min="0" max="1">
2069                        <description><![CDATA[Touch sensor.
2070-1=no contact
20710=just touching
2072>0=pressing, value depends on the force applied
2073
2074Characteristics:
2075   does not use inputs
2076   provides output value
2077   should be located on a Part
2078
2079
2080Properties:
2081   Range (r) float 0..1]]></description>
2082                </element>
2083                <element name="ncl_S" type="integer" min="0" max="1">
2084                        <description><![CDATA[Smell sensor. Aggregated "smell of energy" experienced from all energy objects (creatures and food pieces).
2085Close objects have bigger influence than the distant ones: for each energy source, its partial feeling is proportional to its energy/(distance^2)
2086
2087Characteristics:
2088   does not use inputs
2089   provides output value
2090   should be located on a Part
2091]]></description>
2092                </element>
2093                <element name="ncl_*" type="integer" min="0" max="1">
2094                        <description><![CDATA[Constant value
2095
2096Characteristics:
2097   does not use inputs
2098   provides output value
2099   does not require location in body
2100]]></description>
2101                </element>
2102                <element name="ncl_|" type="integer" min="0" max="1">
2103                        <description><![CDATA[Characteristics:
2104   uses single input
2105   does not provide output value
2106   should be located on a Joint
2107
2108
2109Properties:
2110   power (p) float 0.01..1
2111   bending range (r) float 0..1]]></description>
2112                </element>
2113                <element name="ncl_@" type="integer" min="0" max="1">
2114                        <description><![CDATA[Characteristics:
2115   uses single input
2116   does not provide output value
2117   should be located on a Joint
2118
2119
2120Properties:
2121   power (p) float 0.01..1]]></description>
2122                </element>
2123                <element name="ncl_D" type="integer" min="0" max="1">
2124                        <description><![CDATA[Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights
2125
2126Characteristics:
2127   supports any number of inputs
2128   provides output value
2129   does not require location in body
2130]]></description>
2131                </element>
2132                <element name="ncl_Fuzzy" type="integer" min="0" max="1">
2133                        <description><![CDATA[Refer to publications to learn more about this neuron.
2134
2135Characteristics:
2136   supports any number of inputs
2137   provides output value
2138   does not require location in body
2139
2140
2141Properties:
2142   number of fuzzy sets (ns) integer
2143   number of rules (nr) integer
2144   fuzzy sets (fs) string
2145   fuzzy rules (fr) string]]></description>
2146                </element>
2147                <element name="ncl_VEye" type="integer" min="0" max="1">
2148                        <description><![CDATA[Refer to publications to learn more about this neuron.
2149
2150Characteristics:
2151   uses single input
2152   provides output value
2153   should be located on a Part
2154
2155
2156Properties:
2157   target.x (tx) float
2158   target.y (ty) float
2159   target.z (tz) float
2160   target shape (ts) string
2161   perspective (p) float 0.1..10
2162   scale (s) float 0.1..100
2163   show hidden lines (h) integer 0..1
2164   output lines count (each line needs four channels) (o) integer 0..99
2165   debug (d) integer 0..1]]></description>
2166                </element>
2167                <element name="ncl_VMotor" type="integer" min="0" max="1">
2168                        <description><![CDATA[Must be connected to the VEye and properly set up. Refer to publications to learn more about this neuron.
2169
2170Characteristics:
2171   supports any number of inputs
2172   provides output value
2173   does not require location in body
2174
2175
2176Properties:
2177   number of basic features (noIF) integer
2178   number of degrees of freedom (noDim) integer
2179   parameters (params) string]]></description>
2180                </element>
2181                <element name="ncl_Sti" type="integer" min="0" max="1">
2182                        <description><![CDATA[Characteristics:
2183   uses single input
2184   does not provide output value
2185   should be located on a Part
2186]]></description>
2187                </element>
2188                <element name="ncl_LMu" type="integer" min="0" max="1">
2189                        <description><![CDATA[Characteristics:
2190   uses single input
2191   does not provide output value
2192   should be located on a Joint
2193
2194
2195Properties:
2196   power (p) float 0.01..1]]></description>
2197                </element>
2198                <element name="ncl_Water" type="integer" min="0" max="1">
2199                        <description><![CDATA[Output signal:
22000=on or above water surface
22011=under water (deeper than 1)
22020..1=in the transient area just below water surface
2203
2204Characteristics:
2205   does not use inputs
2206   provides output value
2207   should be located on a Part
2208]]></description>
2209                </element>
2210                <element name="ncl_Energy" type="integer" min="0" max="1">
2211                        <description><![CDATA[The current energy level divided by the initial energy level.
2212Usually falls from initial 1.0 down to 0.0 and then the creature dies. It can rise above 1.0 if enough food is ingested
2213
2214Characteristics:
2215   does not use inputs
2216   provides output value
2217   does not require location in body
2218]]></description>
2219                </element>
2220                <element name="ncl_Ch" type="integer" min="0" max="1">
2221                        <description><![CDATA[Combines all input signals into a single multichannel output; Note: ChSel and ChMux are the only neurons which support multiple channels. Other neurons discard everything except the first channel.
2222
2223Characteristics:
2224   supports any number of inputs
2225   provides output value
2226   does not require location in body
2227]]></description>
2228                </element>
2229                <element name="ncl_ChMux" type="integer" min="0" max="1">
2230                        <description><![CDATA[Outputs the selected channel from the second (multichannel) input. The first input is used as the selector value (-1=select first channel, .., 1=last channel)
2231
2232Characteristics:
2233   uses 2 inputs
2234   provides output value
2235   does not require location in body
2236]]></description>
2237                </element>
2238                <element name="ncl_ChSel" type="integer" min="0" max="1">
2239                        <description><![CDATA[Outputs a single channel (selected by the "ch" parameter) from multichannel input
2240
2241Characteristics:
2242   uses single input
2243   provides output value
2244   does not require location in body
2245
2246
2247Properties:
2248   channel (ch) integer]]></description>
2249                </element>
2250                <element name="ncl_Rnd" type="integer" min="0" max="1">
2251                        <description><![CDATA[Generates random noise (subsequent random values in the range of -1..+1)
2252
2253Characteristics:
2254   does not use inputs
2255   provides output value
2256   does not require location in body
2257]]></description>
2258                </element>
2259                <element name="ncl_Sin" type="integer" min="0" max="1">
2260                        <description><![CDATA[Output frequency = f0+input
2261
2262Characteristics:
2263   uses single input
2264   provides output value
2265   does not require location in body
2266
2267
2268Properties:
2269   base frequency (f0) float -1..1
2270   time (t) float 0..6.28319]]></description>
2271                </element>
2272        </type>
2273        <type name="NeuroSignals" context="Global context">
2274<description><![CDATA[Signals attached to the neuron.
2275See also: Signal, WorldSignals, CreatureSignals.
2276scripts/light.neuro and scripts/seelight.neuro are simple custom neuron examples demonstrating how to send/receive signals between creatures.]]></description>
2277                <element name="size" type="integer"/>
2278                <element name="add" function="true" type="void">
2279                        <description><![CDATA[Create a new signal]]></description>
2280                        <arguments>
2281                                <argument name="channel" type="string"/>
2282                        </arguments>
2283                </element>
2284                <element name="clear" function="true" type="void"><arguments/></element>
2285                <element name="get" function="true" type="Signal">
2286                        <arguments>
2287                                <argument name="index" type="integer"/>
2288                        </arguments>
2289                </element>
2290                <element name="receive" function="true" type="float">
2291                        <description><![CDATA[Receive the aggregated signal power in a given channel.]]></description>
2292                        <arguments>
2293                                <argument name="channel" type="string"/>
2294                        </arguments>
2295                </element>
2296                <element name="receiveFilter" function="true" type="float">
2297                        <description><![CDATA[Receive the aggregated signal power in a given channel.
2298
2299Additional filtering options:
2300- Max distance only receives the neighbor signals (based on their physical location)
2301- Flavor filtering: only signals having the flavor close to the specified one will be received. The filter value is the maximum allowed difference.]]></description>
2302                        <arguments>
2303                                <argument name="channel" type="string"/>
2304                                <argument name="max distance" type="float"/>
2305                                <argument name="flavor" type="float"/>
2306                                <argument name="filter" type="float"/>
2307                        </arguments>
2308                </element>
2309                <element name="receiveSet" function="true" type="Vector">
2310                        <description><![CDATA[Get all signals in the specified range. Returns a readonly vector object containing Signal objects (individual signals can be accessed as result[0] throught result[result.size-1]).]]></description>
2311                        <arguments>
2312                                <argument name="channel" type="string"/>
2313                                <argument name="max distance" type="float"/>
2314                        </arguments>
2315                </element>
2316                <element name="receiveSingle" function="true" type="Signal">
2317                        <description><![CDATA[Find the signal source having the highest signal power (including the distance)]]></description>
2318                        <arguments>
2319                                <argument name="channel" type="string"/>
2320                                <argument name="range" type="float"/>
2321                        </arguments>
2322                </element>
2323        </type>
2324        <type name="ODE" context="Global context">
2325<description><![CDATA[ODE Parameters.]]></description>
2326                <element name="odeairdrag" type="float" min="0" max="0.5" default="0.01">
2327                        <description><![CDATA[A drag force ("air drag") proportional to the velocity of mass centers of moving parts]]></description>
2328                </element>
2329                <element name="odecol2bounce" type="float" min="0" max="1" default="0.1"/>
2330                <element name="odecol2bouncevel" type="float" min="0" max="1" default="0.01"/>
2331                <element name="odecol2mumax" type="float" min="0" max="10" default="1">
2332                        <description><![CDATA[Mu coefficient for Parts with maximal friction (i.e. "FFFFF" in f1)]]></description>
2333                </element>
2334                <element name="odecol2mumin" type="float" min="0" max="10" default="0.1">
2335                        <description><![CDATA[Mu coefficient for Parts with minimal friction (i.e. "fffff" in f1)]]></description>
2336                </element>
2337                <element name="odecol2softcfm" type="float" min="0" max="1" default="0"/>
2338                <element name="odecolbounce" type="float" min="0" max="1" default="0.1"/>
2339                <element name="odecolbouncevel" type="float" min="0" max="1" default="0.01"/>
2340                <element name="odecolmumax" type="float" min="0" max="10" default="5">
2341                        <description><![CDATA[Mu coefficient for Parts with maximal friction (i.e. "FFFFF" in f1)]]></description>
2342                </element>
2343                <element name="odecolmumin" type="float" min="0" max="10" default="0.1">
2344                        <description><![CDATA[Mu coefficient for Parts with minimal friction (i.e. "fffff" in f1)]]></description>
2345                </element>
2346                <element name="odecolsoftcfm" type="float" min="0" max="1" default="0"/>
2347                <element name="odemusclemax" type="float" min="0" max="100" default="10">
2348                        <description><![CDATA[i.e. "MMMMM" if f1]]></description>
2349                </element>
2350                <element name="odemusclemin" type="float" min="0" max="100" default="0">
2351                        <description><![CDATA[i.e. "mmmmm" in f1]]></description>
2352                </element>
2353                <element name="odemusclespeed" type="float" min="0" max="10" default="1">
2354                        <description><![CDATA[Muscle state cannot change faster than the supplied value]]></description>
2355                </element>
2356                <element name="odeseed" type="integer" min="0" max="2">
2357                        <description><![CDATA[Affects collisions.
2358- 'Truly random' is closest to the standard ODE operation. Use Math.seed to influence randomness in ODE collisions
2359- 'Deterministic' automatically calculates random seed in each step based on the current simulation (world) state, which makes the simulation repeatable but more random than 'Fixed'
2360- 'Fixed' is completely deterministic and does not depend on Math.seed. This might negatively affect ODE accuracy
2361]]></description>
2362                </element>
2363                <element name="odeshape" type="integer" min="0" max="1"/>
2364                <element name="odestep" type="float" min="0.001" max="1" default="0.05"/>
2365                <element name="odewaterbuoy" type="float" min="0" max="2" default="1"/>
2366                <element name="odewaterdrag" type="float" min="0.001" max="1" default="0.5"/>
2367                <element name="rayIntersection" function="true" type="float">
2368                        <arguments>
2369                                <argument name="position x" type="float"/>
2370                                <argument name="position y" type="float"/>
2371                                <argument name="position z" type="float"/>
2372                                <argument name="direction x" type="float"/>
2373                                <argument name="direction y" type="float"/>
2374                                <argument name="direction z" type="float"/>
2375                                <argument name="max distance" type="float"/>
2376                        </arguments>
2377                </element>
2378        </type>
2379        <type name="Orient" context="Global context">
2380<description><![CDATA[3D orientation, stored as 3x3 matrix.]]></description>
2381                <element name="x" type="XYZ"/>
2382                <element name="xx" type="float"/>
2383                <element name="xy" type="float"/>
2384                <element name="xz" type="float"/>
2385                <element name="y" type="XYZ"/>
2386                <element name="yx" type="float"/>
2387                <element name="yy" type="float"/>
2388                <element name="yz" type="float"/>
2389                <element name="z" type="XYZ"/>
2390                <element name="zx" type="float"/>
2391                <element name="zy" type="float"/>
2392                <element name="zz" type="float"/>
2393                <element name="between2" function="true" type="void">
2394                        <arguments>
2395                                <argument type="Orient"/>
2396                                <argument type="Orient"/>
2397                                <argument name="amount" type="float"/>
2398                        </arguments>
2399                </element>
2400                <element name="betweenOV" function="true" type="void">
2401                        <arguments>
2402                                <argument type="Orient"/>
2403                                <argument type="XYZ"/>
2404                                <argument name="amount" type="float"/>
2405                        </arguments>
2406                </element>
2407                <element name="clone" function="true" type="Orient"><arguments/></element>
2408                <element name="localToWorld" function="true">
2409                        <arguments>
2410                                <argument name="point" type="XYZ"/>
2411                                <argument name="center" type="XYZ"/>
2412                        </arguments>
2413                </element>
2414                <element name="lookAt" function="true" type="void">
2415                        <arguments>
2416                                <argument name="direction" type="XYZ"/>
2417                                <argument name="up" type="XYZ"/>
2418                        </arguments>
2419                </element>
2420                <element name="new" function="true" type="Orient">
2421                        <arguments>
2422                                <argument name="x" type="float"/>
2423                                <argument name="y" type="float"/>
2424                                <argument name="z" type="float"/>
2425                        </arguments>
2426                </element>
2427                <element name="normalize" function="true" type="void"><arguments/></element>
2428                <element name="reset" function="true" type="void"><arguments/></element>
2429                <element name="revRotate" function="true" type="void">
2430                        <arguments>
2431                                <argument type="Orient"/>
2432                        </arguments>
2433                </element>
2434                <element name="rotate" function="true" type="void">
2435                        <arguments>
2436                                <argument type="Orient"/>
2437                        </arguments>
2438                </element>
2439                <element name="rotate3" function="true" type="void">
2440                        <arguments>
2441                                <argument name="x" type="float"/>
2442                                <argument name="y" type="float"/>
2443                                <argument name="z" type="float"/>
2444                        </arguments>
2445                </element>
2446                <element name="set" function="true" type="void">
2447                        <arguments>
2448                                <argument type="Orient"/>
2449                        </arguments>
2450                </element>
2451                <element name="worldToLocal" function="true">
2452                        <arguments>
2453                                <argument name="point" type="XYZ"/>
2454                                <argument name="center" type="XYZ"/>
2455                        </arguments>
2456                </element>
2457        </type>
2458        <type name="Part" context="Global context">
2459                <element name="as" type="float" min="0" max="1" default="0.25"/>
2460                <element name="dn" type="float" min="0.2" max="5" default="1"/>
2461                <element name="fr" type="float" min="0" max="4" default="0.4"/>
2462                <element name="i" type="string"/>
2463                <element name="ing" type="float" min="0" max="1" default="0.25"/>
2464                <element name="m" type="float" min="0.1" max="999" default="1"/>
2465                <element name="rx" type="float"/>
2466                <element name="ry" type="float"/>
2467                <element name="rz" type="float"/>
2468                <element name="s" type="float" min="0.1" max="10" default="1"/>
2469                <element name="Vstyle" type="string"/>
2470                <element name="x" type="float"/>
2471                <element name="y" type="float"/>
2472                <element name="z" type="float"/>
2473        </type>
2474        <type name="Population" context="Global context">
2475<description><![CDATA[A set of Creature objects, sharing some high level simulation properties (performance calculation, NN simulation, collision detection, event handling). The groups usually have different roles in the experiment (Creatures groups and Food group in standard.expdef).]]></description>
2476                <element name="bodysim" type="integer" min="0" max="1" default="1">
2477                        <description><![CDATA[Enable/disable physical body simulation. This is the initial value of Creature.bodysim for all objects created in this group. For details, see the documentation of Creature.bodysim.]]></description>
2478                </element>
2479                <element name="colmask" type="integer" min="0" max="65535" default="0">
2480                        <description><![CDATA[DEPRECATED. You should use selfmask and othermask (these masks are also much easier to understand than the old colmask field).]]></description>
2481                </element>
2482                <element name="death" type="integer" min="0" max="1" default="1">
2483                        <description><![CDATA[Do creatures die when no energy?]]></description>
2484                </element>
2485                <element name="em_dyn" type="float" min="0" max="1" default="0">
2486                        <description><![CDATA[Energy requirements for a muscle
2487moving a stick]]></description>
2488                </element>
2489                <element name="em_stat" type="float" min="0" max="1" default="0">
2490                        <description><![CDATA[Energy requirements for a muscle
2491resisting an external force]]></description>
2492                </element>
2493                <element name="en_assim" type="float" min="0" max="1" default="0">
2494                        <description><![CDATA[Maximal energy gain produced by a vertical specialized stick.
2495Horizontal specialized sticks get half of this value.]]></description>
2496                </element>
2497                <element name="enableperf" type="integer" min="0" max="2" default="1">
2498                        <description><![CDATA[Stabilization means no significant movement during a specified period of time.]]></description>
2499                </element>
2500                <element name="energy" type="integer" min="0" max="1" default="1">
2501                        <description><![CDATA[If turned off, creature's energy will be constant.]]></description>
2502                </element>
2503                <element name="index" type="integer"/>
2504                <element name="killnostable" type="integer" min="0" max="10000000" default="1000000">
2505                        <description><![CDATA[Creatures that fail to stabilize after the specified waiting period (e.g. because they are continuously rolling) will be killed. 0 disables this feature.]]></description>
2506                </element>
2507                <element name="name" type="string"/>
2508                <element name="nnsim" type="integer" min="0" max="2" default="1">
2509                        <description><![CDATA[Stabilization means no significant movement during a specified period of time.]]></description>
2510                </element>
2511                <element name="othermask" type="integer" min="0" max="2147483647" default="0">
2512                        <description><![CDATA[See selfmask.]]></description>
2513                </element>
2514                <element name="perfperiod" type="integer" min="0" max="1000000" default="100">
2515                        <description><![CDATA[Defines how often onUpdate() events are called. Also used to compute partial performance of creatures (distance, speed, etc.) and to determine stabilization.]]></description>
2516                </element>
2517                <element name="selfcol" type="integer" min="0" max="1" default="0">
2518                        <description><![CDATA[Detect collisions within creature bodies (only applicable for the ODE simulation engine). This is the initial value of Creature.selfcol for all objects created in this group. If enabled, creatures with self-colliding genotypes are not born, and others will have their sticks collide during lifespan.]]></description>
2519                </element>
2520                <element name="selfmask" type="integer" min="0" max="2147483647" default="0">
2521                        <description><![CDATA[Collisions between objects can be handled in two ways:
2522 - standard 'mechanical' collision (simple 'rebound' effect)
2523 - special script handler (On[GROUPNAME]Collision function)
2524
2525In the script handler function, use the Collision object to access the two colliding parts of two creatures.
2526The first part in the Collision object (i.e. Collision.Creature1) always concerns the creature that belongs to [GROUPNAME].
2527The handler is called once for each creature that collides with the creature from [GROUPNAME].
2528
2529Collision masks determine which one will be used (none and both are also possible). On each collision, selfmask and othermask of the colliding objects are logically ANDed. 16 lower bits (0xffff) enable the standard handler. 16 higher bits (0xffff0000) enable the custom handler.
2530Examples:
2531
25321.With one group, all possible combinations of the collision handlers are as follows:
2533  - ignore collisions (e.g. selfmask=othermask=0)
2534  - use standard handling (e.g. selfmask=othermask=1)
2535  - use custom handling (e.g. selfmask=othermask=0x10000)
2536  - use standard and custom handling (e.g. selfmask=othermask=0x10001)
2537
25382.Two groups yield more interesting cases. Let us consider the 'standard.expdef' setting:
2539  Creatures: selfmask=0x10001, othermask=0x20001
2540  Food colmask = selfmask=0x20002, othermask=0x10002
2541There are three possible scenarios:
2542- creature and creature: collision value = 0x10001 & 0x20001 = 1 -> Standard handling will be used (1 is one of the lower 16 bits)
2543- food and food: collision value = 0x20002 & 0x10002 = 2 -> As above.
2544- creature and food: collision value = (0x10001 & 0x10002) or (0x20002 & 0x20001) = 0x10000 or 0x20000 -> Custom handling will be used (higher 16 bits).
2545]]></description>
2546                </element>
2547                <element name="size" type="integer"/>
2548                <element name="stabilperiod" type="integer" min="0" max="1000000" default="100">
2549                        <description><![CDATA["Performance sampling period" for the stabilization phase.]]></description>
2550                </element>
2551                <element name="stabledist" type="float" min="0" max="1" default="0.01">
2552                        <description><![CDATA[A creature is considered stabilized when its center of gravity stays within the specified distance after the "Sampling period while waiting" has elapsed.]]></description>
2553                </element>
2554                <element name="createFromGeno" function="true" type="Creature">
2555                        <description><![CDATA[Uses the supplied Geno object]]></description>
2556                        <arguments>
2557                                <argument type="Geno"/>
2558                        </arguments>
2559                </element>
2560                <element name="createFromGenotype" function="true" type="Creature">
2561                        <description><![CDATA[Uses the selected Genotype object]]></description>
2562<arguments/></element>
2563                <element name="createFromString" function="true" type="Creature">
2564                        <description><![CDATA[Uses the supplied string argument]]></description>
2565                        <arguments>
2566                                <argument name="genotype" type="string"/>
2567                        </arguments>
2568                </element>
2569                <element name="delete" function="true" type="void">
2570                        <description><![CDATA[delete creature]]></description>
2571                        <arguments>
2572                                <argument name="creature index" type="integer"/>
2573                        </arguments>
2574                </element>
2575                <element name="findCreatureAt" function="true" type="Creature">
2576                        <arguments>
2577                                <argument name="point" type="Vector"/>
2578                                <argument name="vector" type="Vector"/>
2579                        </arguments>
2580                </element>
2581                <element name="findUID" function="true" type="integer">
2582                        <arguments>
2583                                <argument name="uid" type="string"/>
2584                        </arguments>
2585                </element>
2586                <element name="get" function="true" type="Creature">
2587                        <arguments>
2588                                <argument name="index" type="integer"/>
2589                        </arguments>
2590                </element>
2591                <element name="kill" function="true" type="void">
2592                        <description><![CDATA[kill creature]]></description>
2593                        <arguments>
2594                                <argument name="creature index" type="integer"/>
2595                        </arguments>
2596                </element>
2597                <element name="senseCreaturesProperty" function="true" type="float">
2598                        <description><![CDATA[arguments:
2599 - x,y,z (sensor position)
2600 - property (name, name[index] or Class:id). name[index] can be used for Vector objects inside the user fields, eg "user2[10]"
2601 - exclude (creature object)
2602works like a smell sensor for a given property (for all creatures in this group except "exclude").
2603The following function reproduces the "classic" framsticks "S" sensor:
2604function smellReceptorValue(x,y,z,exclude)
2605{
2606var i,s=0; for(i=0;i<Populations.size;i++)
2607        s+=Populations[0].senseCreaturesProperty(x,y,z,"energy",exclude);
2608return s;
2609}]]></description>
2610                        <arguments>
2611                                <argument name="x" type="float"/>
2612                                <argument name="y" type="float"/>
2613                                <argument name="z" type="float"/>
2614                                <argument name="propertyname" type="string"/>
2615                                <argument name="exclude" type="Creature"/>
2616                        </arguments>
2617                </element>
2618        </type>
2619        <type name="Populations" context="Global context">
2620<description><![CDATA[Manages all Creature objects in the experiment, organized in one or more groups. See also: Creature, Population.]]></description>
2621                <element name="creature" type="integer"/>
2622                <element name="group" type="integer">
2623                        <description><![CDATA[Index of the currently selected group (Population).]]></description>
2624                </element>
2625                <element name="size" type="integer"/>
2626                <element name="addGroup" function="true" type="void">
2627                        <description><![CDATA[Adds a new population.]]></description>
2628                        <arguments>
2629                                <argument name="name" type="string"/>
2630                        </arguments>
2631                </element>
2632                <element name="clear" function="true" type="void">
2633                        <description><![CDATA[Removes all populations except the first one.]]></description>
2634<arguments/></element>
2635                <element name="clearGroup" function="true" type="void">
2636                        <arguments>
2637                                <argument name="index" type="integer"/>
2638                        </arguments>
2639                </element>
2640                <element name="creatBBCollisions" function="true" type="integer">
2641                        <description><![CDATA[Checks approximate collisions for the selected creature.
2642Returns the collision mask calculated as in the regular simulation. The argument is the collision mask substituted for the selected creature (defaults to group colmask for 0).]]></description>
2643                        <arguments>
2644                                <argument name="mask" type="integer"/>
2645                        </arguments>
2646                </element>
2647                <element name="createFromGenotype" function="true" type="Creature">
2648                        <description><![CDATA[Uses the selected Genotype object.]]></description>
2649<arguments/></element>
2650                <element name="createFromString" function="true" type="Creature">
2651                        <description><![CDATA[Uses the supplied string argument.]]></description>
2652                        <arguments>
2653                                <argument name="genotype" type="string"/>
2654                        </arguments>
2655                </element>
2656                <element name="deleteGroup" function="true" type="void">
2657                        <description><![CDATA[Removes a population.]]></description>
2658                        <arguments>
2659                                <argument name="index" type="integer"/>
2660                        </arguments>
2661                </element>
2662                <element name="deleteSelected" function="true" type="void">
2663                        <description><![CDATA[Applies to the selected Creature.]]></description>
2664<arguments/></element>
2665                <element name="findCreatureAt" function="true" type="Creature">
2666                        <arguments>
2667                                <argument name="point" type="Vector"/>
2668                                <argument name="vector" type="Vector"/>
2669                        </arguments>
2670                </element>
2671                <element name="get" function="true" type="Population">
2672                        <arguments>
2673                                <argument name="index" type="integer"/>
2674                        </arguments>
2675                </element>
2676                <element name="killSelected" function="true" type="void">
2677                        <description><![CDATA[Applies to the selected Creature.]]></description>
2678<arguments/></element>
2679        </type>
2680        <type name="Ref" context="Global context">
2681<description><![CDATA[Reference objects. Useful for returning things from functions.
2682
2683Example:
2684var x=111;
2685square(&x);// '&' creates the Reference object
2686Simulator.print(x);//x is now 12321
2687
2688function square(r)
2689{r.value=r.value*r.value;}
2690//square receives the Reference objects and changes its 'value' field]]></description>
2691                <element name="toString" type="string"/>
2692                <element name="value" type="untyped"/>
2693                <element name="copyFrom" function="true" type="void">
2694                        <description><![CDATA[make the reference point to the same target,]]></description>
2695                        <arguments>
2696                                <argument type="Ref"/>
2697                        </arguments>
2698                </element>
2699                <element name="newO" function="true">
2700                        <description><![CDATA[(for internal use only) use &variablename to create Ref objects.]]></description>
2701                </element>
2702                <element name="newS" function="true">
2703                        <description><![CDATA[(for internal use only) use &variablename to create Ref objects.]]></description>
2704                </element>
2705        </type>
2706        <type name="Shapes" context="Global context">
2707<description><![CDATA[This object defines appearance of the elements of creatures (applies to the 'wireframe' display mode). Default shape definitions make food's "p:" look like a sphere, and manipulator's "p:" look like a robot hand. The model's Vstyle property is the name of the shape. Developers of experiment definitions can introduce new Vstyle(s) for their expdef and provide appropriate shape definitions by calling Shapes.set(...) in the onExpDefLoad() function.]]></description>
2708                <element name="clear" function="true" type="void"><arguments/></element>
2709                <element name="set" function="true" type="void">
2710                        <description><![CDATA[Arguments:
2711
2712- "id" - can be
2713  "1p_STYLENAME": affects a single-Part creature (without Joints)
2714  "p_STYLENAME": affects all normal Parts
2715  "j_STYLENAME": affects Joints
2716     (STYLENAME corresponds to the Model.Vstyle value, and it can be empty).
2717
2718- "definition" is a genotype describing the object shape
2719
2720- "color" can be 0xRRGGBB or one of the special values: -3 = default creature color, -4 = default food color, -5 = default manipulator color
2721
2722Examples:
2723Shapes.set("j_predator","X",0xff0000);//make all predators (i.e. creatures with Vstyle=predator) red
2724Shapes.set("1p_food","...some...genotype...",-4);//change food appearance
2725Shapes.set("p_","//0\np:0,0,0\np:-0.1,0,0\np:0.1,0,0\np:0,-0.1,0\np:0,0.1,0\np:0,0,-0.1\np:0,0,0.1\nj:0,1\nj:0,2\nj:0,3\nj:0,4\nj:0,5\nj:0,6\n",0);//make Parts' orientation axes visible]]></description>
2726                        <arguments>
2727                                <argument name="id" type="string"/>
2728                                <argument name="definition" type="string"/>
2729                                <argument name="color" type="integer"/>
2730                        </arguments>
2731                </element>
2732        </type>
2733        <type name="Signal" context="Global context">
2734<description><![CDATA[Signals broadcast information in a channel (being an abstract communication medium that could be imagined as sound, smell, vision or anything else). There are no sender-receiver associations, although the receiving party can filter out signals (two standard filtering methods are: physical neighborhood and one-dimensional attribute called flavor). Signals attached to neurons and creatures (created in Creature.signals and Neuro.signals) automatically follow the owner's location. Environmental signals (in World.signals) are stationary.
2735
2736Receiving:
2737There are 2 kinds of data you can receive:
27381. aggregating functions (receive and receiveFilter) calculate the overall power of the received signal (based on the distance and the source power).
27392. receiveSet and receiveSingle fetch the individual Signal object(s) so it is possible to transmit something else than just a single number (by using Signal.value) and do more sophisticated processing.
2740
2741Creating: Use "add" in Creature.signals, Neuro.signals, or World.signals.]]></description>
2742                <element name="channel" type="string">
2743                        <description><![CDATA[Channel name, readonly.]]></description>
2744                </element>
2745                <element name="flavor" type="float">
2746                        <description><![CDATA[Signal flavor is can be used to differentiate between signals in a single channel. ]]></description>
2747                </element>
2748                <element name="pos" type="XYZ">
2749                        <description><![CDATA[Signal position, readonly.]]></description>
2750                </element>
2751                <element name="power" type="float">
2752                        <description><![CDATA[Signal power affects the aggregated signal value returned from receive() and receiveFilter().]]></description>
2753                </element>
2754                <element name="value" type="untyped">
2755                        <description><![CDATA[Signal value can be any type. On the receiver side it is only available by accessing the individual Signal objects, i.e. after calling receiveSet() or receiveSingle(). The aggregating function receive() and receiveFilter() ignore this attribute.]]></description>
2756                </element>
2757                <element name="remove" function="true">
2758                        <description><![CDATA[Deletes the signal]]></description>
2759                </element>
2760        </type>
2761        <type name="SignalView" context="Global context">
2762                <element name="labels" type="string">
2763                        <description><![CDATA[The label formula should return text to be displayed over the signal source, presumably by reading some values from the supplied Signal object. It is especially useful for more sophisticated signal usage scenarios, when Signal.value keeps a reference to an object (the default signal label only shows <XXX Object at xxxxx> in such cases).
2764
2765Examples: (switch to "Automatic" mode to see labels, then remove the label formula and compare the effect)
2766
2767return "x";
2768return "val="+Signal.value;
2769return "power="+Signal.power;]]></description>
2770                </element>
2771                <element name="mode" type="integer" min="0" max="2">
2772                        <description><![CDATA["Automatic" labels all signal sources in all channels and shows the intensity map of the first channel. This is sufficient for many simple setups, but as the number of signals and channels grows, the display becomes cluttered. In such cases, the experiment definition can define "Custom" signal visualization tailored for the particular experiment.]]></description>
2773                </element>
2774                <element name="addMap" function="true" type="void">
2775                        <arguments>
2776                                <argument name="channel" type="string"/>
2777                                <argument name="color" type="integer"/>
2778                        </arguments>
2779                </element>
2780                <element name="addSignals" function="true" type="void">
2781                        <arguments>
2782                                <argument name="channel" type="string"/>
2783                                <argument name="color" type="integer"/>
2784                                <argument name="angle_x" type="integer"/>
2785                                <argument name="angle_y" type="integer"/>
2786                                <argument name="angle_z" type="integer"/>
2787                        </arguments>
2788                </element>
2789                <element name="addSignalsFilter" function="true" type="void">
2790                        <arguments>
2791                                <argument name="channel" type="string"/>
2792                                <argument name="color" type="integer"/>
2793                                <argument name="angle_x" type="integer"/>
2794                                <argument name="angle_y" type="integer"/>
2795                                <argument name="angle_z" type="integer"/>
2796                                <argument name="flavor" type="integer"/>
2797                                <argument name="filter" type="integer"/>
2798                        </arguments>
2799                </element>
2800                <element name="clear" function="true">
2801                        <description><![CDATA[Removes custom display settings that might have been defined by various scripts (expdef or show).]]></description>
2802                </element>
2803        </type>
2804        <type name="sim_params" context="Global context">
2805<description><![CDATA[This object groups all simulator parameters so they can be loaded or saved with a single call (see scripts/standard_loadsave.inc). For other purposes please use specific objects, like Simulator, World, Populations, etc.]]></description>
2806                <element name="autosaveperiod" type="integer" min="0" max="100000">
2807                        <description><![CDATA[Save simulation state once every n-th event
2808(events are defined by the script. For 'standard.expdef' it is after each death).
2809Save EXPT file first to initialize name for autosave files.]]></description>
2810                </element>
2811                <element name="bnoise_struct" type="float" min="0" max="10" default="0">
2812                        <description><![CDATA[When >0, body constructs of creatures (position of Parts) will be randomly disturbed when they are created.]]></description>
2813                </element>
2814                <element name="bnoise_vel" type="float" min="0" max="10" default="0">
2815                        <description><![CDATA[Random velocities will be applied to all body Parts (in MechaStick) or rigid segments (in ODE) of newly created creatures.]]></description>
2816                </element>
2817                <element name="changedProperty" type="integer"/>
2818                <element name="changedPropertyId" type="string"/>
2819                <element name="createrr" type="integer" min="0" max="2" default="1"/>
2820                <element name="creatwarnfail" type="integer" min="0" max="1">
2821                        <description><![CDATA[Creatures grown with warnings will not be simulated.]]></description>
2822                </element>
2823                <element name="expdef" type="string">
2824                        <description><![CDATA[Choose the experiment framework
2825(in Windows GUI, confirm by pressing 'Apply')
2826
2827Stop the simulation before selecting another experiment definition.
2828It is a good practice to initialize the experiment before running the simulation.]]></description>
2829                </element>
2830                <element name="expdef_info" type="string"/>
2831                <element name="expdef_title" type="string"/>
2832                <element name="f0_c_del" type="float" min="0" max="100" default="5">
2833                        <description><![CDATA[]]></description>
2834                </element>
2835                <element name="f0_c_new" type="float" min="0" max="100" default="5">
2836                        <description><![CDATA[]]></description>
2837                </element>
2838                <element name="f0_c_wei" type="float" min="0" max="100" default="10">
2839                        <description><![CDATA[]]></description>
2840                </element>
2841                <element name="f0_j_del" type="float" min="0" max="100" default="5">
2842                        <description><![CDATA[]]></description>
2843                </element>
2844                <element name="f0_j_new" type="float" min="0" max="100" default="5">
2845                        <description><![CDATA[]]></description>
2846                </element>
2847                <element name="f0_j_rsf" type="float" min="0" max="100" default="10">
2848                        <description><![CDATA[]]></description>
2849                </element>
2850                <element name="f0_j_stf" type="float" min="0" max="100" default="10">
2851                        <description><![CDATA[]]></description>
2852                </element>
2853                <element name="f0_j_stm" type="float" min="0" max="100" default="10">
2854                        <description><![CDATA[]]></description>
2855                </element>
2856                <element name="f0_n_del" type="float" min="0" max="100" default="5">
2857                        <description><![CDATA[]]></description>
2858                </element>
2859                <element name="f0_n_new" type="float" min="0" max="100" default="5">
2860                        <description><![CDATA[]]></description>
2861                </element>
2862                <element name="f0_n_prp" type="float" min="0" max="100" default="10">
2863                        <description><![CDATA[]]></description>
2864                </element>
2865                <element name="f0_nodel_tag" type="integer" min="0" max="1" default="1">
2866                        <description><![CDATA[You can tag elements using their 'i' field and the i="mi=d" tag.
2867Mutations will not delete such elements.
2868The i="mi=dm" combination is allowed.]]></description>
2869                </element>
2870                <element name="f0_nomod_tag" type="integer" min="0" max="1" default="1">
2871                        <description><![CDATA[You can tag elements using their 'i' field and the i="mi=m" tag.
2872Mutations will not modify properties of such elements.
2873The i="mi=md" combination is allowed.]]></description>
2874                </element>
2875                <element name="f0_p_asm" type="float" min="0" max="100" default="10">
2876                        <description><![CDATA[]]></description>
2877                </element>
2878                <element name="f0_p_del" type="float" min="0" max="100" default="5">
2879                        <description><![CDATA[]]></description>
2880                </element>
2881                <element name="f0_p_frc" type="float" min="0" max="100" default="10">
2882                        <description><![CDATA[]]></description>
2883                </element>
2884                <element name="f0_p_ing" type="float" min="0" max="100" default="10">
2885                        <description><![CDATA[]]></description>
2886                </element>
2887                <element name="f0_p_mas" type="float" min="0" max="100" default="10">
2888                        <description><![CDATA[]]></description>
2889                </element>
2890                <element name="f0_p_new" type="float" min="0" max="100" default="5">
2891                        <description><![CDATA[]]></description>
2892                </element>
2893                <element name="f0_p_pos" type="float" min="0" max="100" default="10">
2894                        <description><![CDATA[]]></description>
2895                </element>
2896                <element name="f0_p_swp" type="float" min="0" max="100" default="10">
2897                        <description><![CDATA[]]></description>
2898                </element>
2899                <element name="f1_mut_exmod" type="string">
2900                        <description><![CDATA[Modifiers that will not be added nor deleted during mutation
2901(all: RrLlAaCcFfMmSsIiQqWwEe)]]></description>
2902                </element>
2903                <element name="f1_nmConn" type="float" min="0" max="100" default="0.1">
2904                        <description><![CDATA[]]></description>
2905                </element>
2906                <element name="f1_nmNeu" type="float" min="0" max="100" default="0.05">
2907                        <description><![CDATA[Adds a (connected) neuron or removes a neuron]]></description>
2908                </element>
2909                <element name="f1_nmProp" type="float" min="0" max="100" default="0.1">
2910                        <description><![CDATA[]]></description>
2911                </element>
2912                <element name="f1_nmVal" type="float" min="0" max="100" default="0.05"/>
2913                <element name="f1_nmWei" type="float" min="0" max="100" default="1"/>
2914                <element name="f1_smComma" type="float" min="0" max="100" default="0.02"/>
2915                <element name="f1_smJunct" type="float" min="0" max="100" default="0.02"/>
2916                <element name="f1_smModif" type="float" min="0" max="100" default="0.1">
2917                        <description><![CDATA[Modifiers: RrLlAaCcFfMmSsIiQqWwEe]]></description>
2918                </element>
2919                <element name="f1_smX" type="float" min="0" max="100" default="0.05"/>
2920                <element name="f1_xo_propor" type="integer" min="0" max="1" default="1">
2921                        <description><![CDATA[Cross over (exchange) corresponding segments of the two parent genotypes?
2922
2923f1 uses a two-point crossing over.
2924If this option is turned on, cut points will be selected proportionally to neural genes.
2925Thus, if both parents have the same number of neurons, then this will be preserved in their children.]]></description>
2926                </element>
2927                <element name="f2_mutAddOper" type="float" min="0" max="1" default="0.4">
2928                        <description><![CDATA[]]></description>
2929                </element>
2930                <element name="f2_mutConnElem" type="float" min="0" max="1" default="0.33">
2931                        <description><![CDATA[]]></description>
2932                </element>
2933                <element name="f2_mutDelOper" type="float" min="0" max="1" default="0.1">
2934                        <description><![CDATA[]]></description>
2935                </element>
2936                <element name="f2_mutHandleOper" type="float" min="0" max="1" default="0.3">
2937                        <description><![CDATA[]]></description>
2938                </element>
2939                <element name="f2_mutJointElem" type="float" min="0" max="1" default="0.33">
2940                        <description><![CDATA[]]></description>
2941                </element>
2942                <element name="f2_mutNeuroElem" type="float" min="0" max="1" default="0.33">
2943                        <description><![CDATA[]]></description>
2944                </element>
2945                <element name="f2_mutPropOper" type="float" min="0" max="1" default="0.2">
2946                        <description><![CDATA[]]></description>
2947                </element>
2948                <element name="f3_mutDelIns" type="float" min="0" max="1" default="0.1">
2949                        <description><![CDATA[]]></description>
2950                </element>
2951                <element name="f3_mutDelInsLength" type="integer" min="1" max="100" default="5">
2952                        <description><![CDATA[]]></description>
2953                </element>
2954                <element name="f3_mutDelInsPerChar" type="float" min="0" max="1" default="0.05">
2955                        <description><![CDATA[]]></description>
2956                </element>
2957                <element name="f3_mutDuplication" type="float" min="0" max="1" default="0.05">
2958                        <description><![CDATA[]]></description>
2959                </element>
2960                <element name="f3_mutSubstitution" type="float" min="0" max="1" default="0.6">
2961                        <description><![CDATA[]]></description>
2962                </element>
2963                <element name="f3_mutSubstPerChar" type="float" min="0" max="1" default="0.1">
2964                        <description><![CDATA[]]></description>
2965                </element>
2966                <element name="f3_mutTranslocation" type="float" min="0" max="1" default="0.15">
2967                        <description><![CDATA[]]></description>
2968                </element>
2969                <element name="f3_xovCrossingOver" type="float" min="0" max="1" default="0.2">
2970                        <description><![CDATA[]]></description>
2971                </element>
2972                <element name="f3_xovGeneTransfer" type="float" min="0" max="1" default="0.8">
2973                        <description><![CDATA[]]></description>
2974                </element>
2975                <element name="f4_mut_add" type="float" min="0" max="100" default="50">
2976                        <description><![CDATA[mutation: probability of adding a node]]></description>
2977                </element>
2978                <element name="f4_mut_add_conn" type="float" min="0" max="100" default="15">
2979                        <description><![CDATA[add node mutation: probability of adding a neural connection]]></description>
2980                </element>
2981                <element name="f4_mut_add_div" type="float" min="0" max="100" default="20">
2982                        <description><![CDATA[add node mutation: probability of adding a division]]></description>
2983                </element>
2984                <element name="f4_mut_add_neupar" type="float" min="0" max="100" default="5">
2985                        <description><![CDATA[add node mutation: probability of adding a neuron property/modifier]]></description>
2986                </element>
2987                <element name="f4_mut_add_rep" type="float" min="0" max="100" default="10">
2988                        <description><![CDATA[add node mutation: probability of adding a repetition]]></description>
2989                </element>
2990                <element name="f4_mut_add_simp" type="float" min="0" max="100" default="50">
2991                        <description><![CDATA[add node mutation: probability of adding a random, simple gene]]></description>
2992                </element>
2993                <element name="f4_mut_del" type="float" min="0" max="100" default="20">
2994                        <description><![CDATA[mutation: probability of deleting a node]]></description>
2995                </element>
2996                <element name="f4_mut_mod" type="float" min="0" max="100" default="30">
2997                        <description><![CDATA[mutation: probability of changing a node]]></description>
2998                </element>
2999                <element name="filecomm" type="integer" min="0" max="1" default="1">
3000                        <description><![CDATA[Display comments encountered in opened files]]></description>
3001                </element>
3002                <element name="gen_extmutinfo" type="integer" min="0" max="2" default="0">
3003                        <description><![CDATA[If active, information about employed mutation method will be stored in the 'info' field of each mutated genotype.]]></description>
3004                </element>
3005                <element name="gen_hilite" type="integer" min="0" max="1" default="1">
3006                        <description><![CDATA[Use colors for genes?
3007(slows down viewing/editing of huge genotypes)]]></description>
3008                </element>
3009                <element name="gen_hist" type="integer" min="0" max="1" default="0">
3010                        <description><![CDATA[Required for phylogenetic analysis]]></description>
3011                </element>
3012                <element name="genkonw0" type="integer" min="0" max="1">
3013                        <description><![CDATA[]]></description>
3014                </element>
3015                <element name="genkonw1" type="integer" min="0" max="1">
3016                        <description><![CDATA[]]></description>
3017                </element>
3018                <element name="genkonw2" type="integer" min="0" max="1">
3019                        <description><![CDATA[]]></description>
3020                </element>
3021                <element name="genkonw3" type="integer" min="0" max="1">
3022                        <description><![CDATA[]]></description>
3023                </element>
3024                <element name="genolib" type="GenePools"/>
3025                <element name="genoper_f0" type="integer" min="0" max="0">
3026                        <description><![CDATA[]]></description>
3027                </element>
3028                <element name="genoper_f1" type="integer" min="0" max="0">
3029                        <description><![CDATA[]]></description>
3030                </element>
3031                <element name="genoper_f2" type="integer" min="0" max="0">
3032                        <description><![CDATA[]]></description>
3033                </element>
3034                <element name="genoper_f3" type="integer" min="0" max="0">
3035                        <description><![CDATA[]]></description>
3036                </element>
3037                <element name="genoper_f4" type="integer" min="0" max="0">
3038                        <description><![CDATA[]]></description>
3039                </element>
3040                <element name="groupchk" type="integer" min="0" max="1"/>
3041                <element name="importchk" type="integer" min="0" max="1"/>
3042                <element name="livelib" type="Populations"/>
3043                <element name="loadchk" type="integer" min="0" max="1"/>
3044                <element name="maxjoint" type="float" min="0" max="100" default="2"/>
3045                <element name="minjoint" type="float" min="0" max="100" default="0"/>
3046                <element name="neuadd_N" type="integer" min="0" max="1">
3047                        <description><![CDATA[Standard neuron
3048
3049Characteristics:
3050   supports any number of inputs
3051   provides output value
3052   does not require location in body
3053
3054
3055Properties:
3056   Inertia (in) float 0..1
3057   Force (fo) float 0..999
3058   Sigmoid (si) float -99999..99999
3059   State (s) float -1..1]]></description>
3060                </element>
3061                <element name="neuadd_Nu" type="integer" min="0" max="1">
3062                        <description><![CDATA[Works like standard neuron (N) but the output value is scaled to 0...+1 instead of -1...+1.
3063Having 0 as one of the saturation states should help in "gate circuits", where input signal is passed through or blocked depending on the other singal.
3064
3065Characteristics:
3066   supports any number of inputs
3067   provides output value
3068   does not require location in body
3069
3070
3071Properties:
3072   Inertia (in) float 0..1
3073   Force (fo) float 0..999
3074   Sigmoid (si) float -99999..99999
3075   State (s) float -1..1]]></description>
3076                </element>
3077                <element name="neuadd_G" type="integer" min="0" max="1">
3078                        <description><![CDATA[Equilibrium sensor.
30790=the stick is horizontal
3080+1/-1=the stick is vertical
3081
3082Characteristics:
3083   does not use inputs
3084   provides output value
3085   should be located on a Joint
3086]]></description>
3087                </element>
3088                <element name="neuadd_T" type="integer" min="0" max="1">
3089                        <description><![CDATA[Touch sensor.
3090-1=no contact
30910=just touching
3092>0=pressing, value depends on the force applied
3093
3094Characteristics:
3095   does not use inputs
3096   provides output value
3097   should be located on a Part
3098
3099
3100Properties:
3101   Range (r) float 0..1]]></description>
3102                </element>
3103                <element name="neuadd_S" type="integer" min="0" max="1">
3104                        <description><![CDATA[Smell sensor. Aggregated "smell of energy" experienced from all energy objects (creatures and food pieces).
3105Close objects have bigger influence than the distant ones: for each energy source, its partial feeling is proportional to its energy/(distance^2)
3106
3107Characteristics:
3108   does not use inputs
3109   provides output value
3110   should be located on a Part
3111]]></description>
3112                </element>
3113                <element name="neuadd_*" type="integer" min="0" max="1">
3114                        <description><![CDATA[Constant value
3115
3116Characteristics:
3117   does not use inputs
3118   provides output value
3119   does not require location in body
3120]]></description>
3121                </element>
3122                <element name="neuadd_|" type="integer" min="0" max="1">
3123                        <description><![CDATA[Characteristics:
3124   uses single input
3125   does not provide output value
3126   should be located on a Joint
3127
3128
3129Properties:
3130   power (p) float 0.01..1
3131   bending range (r) float 0..1]]></description>
3132                </element>
3133                <element name="neuadd_@" type="integer" min="0" max="1">
3134                        <description><![CDATA[Characteristics:
3135   uses single input
3136   does not provide output value
3137   should be located on a Joint
3138
3139
3140Properties:
3141   power (p) float 0.01..1]]></description>
3142                </element>
3143                <element name="neuadd_D" type="integer" min="0" max="1">
3144                        <description><![CDATA[Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights
3145
3146Characteristics:
3147   supports any number of inputs
3148   provides output value
3149   does not require location in body
3150]]></description>
3151                </element>
3152                <element name="neuadd_Fuzzy" type="integer" min="0" max="1">
3153                        <description><![CDATA[Refer to publications to learn more about this neuron.
3154
3155Characteristics:
3156   supports any number of inputs
3157   provides output value
3158   does not require location in body
3159
3160
3161Properties:
3162   number of fuzzy sets (ns) integer
3163   number of rules (nr) integer
3164   fuzzy sets (fs) string
3165   fuzzy rules (fr) string]]></description>
3166                </element>
3167                <element name="neuadd_VEye" type="integer" min="0" max="1">
3168                        <description><![CDATA[Refer to publications to learn more about this neuron.
3169
3170Characteristics:
3171   uses single input
3172   provides output value
3173   should be located on a Part
3174
3175
3176Properties:
3177   target.x (tx) float
3178   target.y (ty) float
3179   target.z (tz) float
3180   target shape (ts) string
3181   perspective (p) float 0.1..10
3182   scale (s) float 0.1..100
3183   show hidden lines (h) integer 0..1
3184   output lines count (each line needs four channels) (o) integer 0..99
3185   debug (d) integer 0..1]]></description>
3186                </element>
3187                <element name="neuadd_VMotor" type="integer" min="0" max="1">
3188                        <description><![CDATA[Must be connected to the VEye and properly set up. Refer to publications to learn more about this neuron.
3189
3190Characteristics:
3191   supports any number of inputs
3192   provides output value
3193   does not require location in body
3194
3195
3196Properties:
3197   number of basic features (noIF) integer
3198   number of degrees of freedom (noDim) integer
3199   parameters (params) string]]></description>
3200                </element>
3201                <element name="neuadd_Sti" type="integer" min="0" max="1">
3202                        <description><![CDATA[Characteristics:
3203   uses single input
3204   does not provide output value
3205   should be located on a Part
3206]]></description>
3207                </element>
3208                <element name="neuadd_LMu" type="integer" min="0" max="1">
3209                        <description><![CDATA[Characteristics:
3210   uses single input
3211   does not provide output value
3212   should be located on a Joint
3213
3214
3215Properties:
3216   power (p) float 0.01..1]]></description>
3217                </element>
3218                <element name="neuadd_Water" type="integer" min="0" max="1">
3219                        <description><![CDATA[Output signal:
32200=on or above water surface
32211=under water (deeper than 1)
32220..1=in the transient area just below water surface
3223
3224Characteristics:
3225   does not use inputs
3226   provides output value
3227   should be located on a Part
3228]]></description>
3229                </element>
3230                <element name="neuadd_Energy" type="integer" min="0" max="1">
3231                        <description><![CDATA[The current energy level divided by the initial energy level.
3232Usually falls from initial 1.0 down to 0.0 and then the creature dies. It can rise above 1.0 if enough food is ingested
3233
3234Characteristics:
3235   does not use inputs
3236   provides output value
3237   does not require location in body
3238]]></description>
3239                </element>
3240                <element name="neuadd_Ch" type="integer" min="0" max="1">
3241                        <description><![CDATA[Combines all input signals into a single multichannel output; Note: ChSel and ChMux are the only neurons which support multiple channels. Other neurons discard everything except the first channel.
3242
3243Characteristics:
3244   supports any number of inputs
3245   provides output value
3246   does not require location in body
3247]]></description>
3248                </element>
3249                <element name="neuadd_ChMux" type="integer" min="0" max="1">
3250                        <description><![CDATA[Outputs the selected channel from the second (multichannel) input. The first input is used as the selector value (-1=select first channel, .., 1=last channel)
3251
3252Characteristics:
3253   uses 2 inputs
3254   provides output value
3255   does not require location in body
3256]]></description>
3257                </element>
3258                <element name="neuadd_ChSel" type="integer" min="0" max="1">
3259                        <description><![CDATA[Outputs a single channel (selected by the "ch" parameter) from multichannel input
3260
3261Characteristics:
3262   uses single input
3263   provides output value
3264   does not require location in body
3265
3266
3267Properties:
3268   channel (ch) integer]]></description>
3269                </element>
3270                <element name="neuadd_Rnd" type="integer" min="0" max="1">
3271                        <description><![CDATA[Generates random noise (subsequent random values in the range of -1..+1)
3272
3273Characteristics:
3274   does not use inputs
3275   provides output value
3276   does not require location in body
3277]]></description>
3278                </element>
3279                <element name="neuadd_Sin" type="integer" min="0" max="1">
3280                        <description><![CDATA[Output frequency = f0+input
3281
3282Characteristics:
3283   uses single input
3284   provides output value
3285   does not require location in body
3286
3287
3288Properties:
3289   base frequency (f0) float -1..1
3290   time (t) float 0..6.28319]]></description>
3291                </element>
3292                <element name="ncl_N" type="integer" min="0" max="1">
3293                        <description><![CDATA[Standard neuron
3294
3295Characteristics:
3296   supports any number of inputs
3297   provides output value
3298   does not require location in body
3299
3300
3301Properties:
3302   Inertia (in) float 0..1
3303   Force (fo) float 0..999
3304   Sigmoid (si) float -99999..99999
3305   State (s) float -1..1]]></description>
3306                </element>
3307                <element name="ncl_Nu" type="integer" min="0" max="1">
3308                        <description><![CDATA[Works like standard neuron (N) but the output value is scaled to 0...+1 instead of -1...+1.
3309Having 0 as one of the saturation states should help in "gate circuits", where input signal is passed through or blocked depending on the other singal.
3310
3311Characteristics:
3312   supports any number of inputs
3313   provides output value
3314   does not require location in body
3315
3316
3317Properties:
3318   Inertia (in) float 0..1
3319   Force (fo) float 0..999
3320   Sigmoid (si) float -99999..99999
3321   State (s) float -1..1]]></description>
3322                </element>
3323                <element name="ncl_G" type="integer" min="0" max="1">
3324                        <description><![CDATA[Equilibrium sensor.
33250=the stick is horizontal
3326+1/-1=the stick is vertical
3327
3328Characteristics:
3329   does not use inputs
3330   provides output value
3331   should be located on a Joint
3332]]></description>
3333                </element>
3334                <element name="ncl_T" type="integer" min="0" max="1">
3335                        <description><![CDATA[Touch sensor.
3336-1=no contact
33370=just touching
3338>0=pressing, value depends on the force applied
3339
3340Characteristics:
3341   does not use inputs
3342   provides output value
3343   should be located on a Part
3344
3345
3346Properties:
3347   Range (r) float 0..1]]></description>
3348                </element>
3349                <element name="ncl_S" type="integer" min="0" max="1">
3350                        <description><![CDATA[Smell sensor. Aggregated "smell of energy" experienced from all energy objects (creatures and food pieces).
3351Close objects have bigger influence than the distant ones: for each energy source, its partial feeling is proportional to its energy/(distance^2)
3352
3353Characteristics:
3354   does not use inputs
3355   provides output value
3356   should be located on a Part
3357]]></description>
3358                </element>
3359                <element name="ncl_*" type="integer" min="0" max="1">
3360                        <description><![CDATA[Constant value
3361
3362Characteristics:
3363   does not use inputs
3364   provides output value
3365   does not require location in body
3366]]></description>
3367                </element>
3368                <element name="ncl_|" type="integer" min="0" max="1">
3369                        <description><![CDATA[Characteristics:
3370   uses single input
3371   does not provide output value
3372   should be located on a Joint
3373
3374
3375Properties:
3376   power (p) float 0.01..1
3377   bending range (r) float 0..1]]></description>
3378                </element>
3379                <element name="ncl_@" type="integer" min="0" max="1">
3380                        <description><![CDATA[Characteristics:
3381   uses single input
3382   does not provide output value
3383   should be located on a Joint
3384
3385
3386Properties:
3387   power (p) float 0.01..1]]></description>
3388                </element>
3389                <element name="ncl_D" type="integer" min="0" max="1">
3390                        <description><![CDATA[Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights
3391
3392Characteristics:
3393   supports any number of inputs
3394   provides output value
3395   does not require location in body
3396]]></description>
3397                </element>
3398                <element name="ncl_Fuzzy" type="integer" min="0" max="1">
3399                        <description><![CDATA[Refer to publications to learn more about this neuron.
3400
3401Characteristics:
3402   supports any number of inputs
3403   provides output value
3404   does not require location in body
3405
3406
3407Properties:
3408   number of fuzzy sets (ns) integer
3409   number of rules (nr) integer
3410   fuzzy sets (fs) string
3411   fuzzy rules (fr) string]]></description>
3412                </element>
3413                <element name="ncl_VEye" type="integer" min="0" max="1">
3414                        <description><![CDATA[Refer to publications to learn more about this neuron.
3415
3416Characteristics:
3417   uses single input
3418   provides output value
3419   should be located on a Part
3420
3421
3422Properties:
3423   target.x (tx) float
3424   target.y (ty) float
3425   target.z (tz) float
3426   target shape (ts) string
3427   perspective (p) float 0.1..10
3428   scale (s) float 0.1..100
3429   show hidden lines (h) integer 0..1
3430   output lines count (each line needs four channels) (o) integer 0..99
3431   debug (d) integer 0..1]]></description>
3432                </element>
3433                <element name="ncl_VMotor" type="integer" min="0" max="1">
3434                        <description><![CDATA[Must be connected to the VEye and properly set up. Refer to publications to learn more about this neuron.
3435
3436Characteristics:
3437   supports any number of inputs
3438   provides output value
3439   does not require location in body
3440
3441
3442Properties:
3443   number of basic features (noIF) integer
3444   number of degrees of freedom (noDim) integer
3445   parameters (params) string]]></description>
3446                </element>
3447                <element name="ncl_Sti" type="integer" min="0" max="1">
3448                        <description><![CDATA[Characteristics:
3449   uses single input
3450   does not provide output value
3451   should be located on a Part
3452]]></description>
3453                </element>
3454                <element name="ncl_LMu" type="integer" min="0" max="1">
3455                        <description><![CDATA[Characteristics:
3456   uses single input
3457   does not provide output value
3458   should be located on a Joint
3459
3460
3461Properties:
3462   power (p) float 0.01..1]]></description>
3463                </element>
3464                <element name="ncl_Water" type="integer" min="0" max="1">
3465                        <description><![CDATA[Output signal:
34660=on or above water surface
34671=under water (deeper than 1)
34680..1=in the transient area just below water surface
3469
3470Characteristics:
3471   does not use inputs
3472   provides output value
3473   should be located on a Part
3474]]></description>
3475                </element>
3476                <element name="ncl_Energy" type="integer" min="0" max="1">
3477                        <description><![CDATA[The current energy level divided by the initial energy level.
3478Usually falls from initial 1.0 down to 0.0 and then the creature dies. It can rise above 1.0 if enough food is ingested
3479
3480Characteristics:
3481   does not use inputs
3482   provides output value
3483   does not require location in body
3484]]></description>
3485                </element>
3486                <element name="ncl_Ch" type="integer" min="0" max="1">
3487                        <description><![CDATA[Combines all input signals into a single multichannel output; Note: ChSel and ChMux are the only neurons which support multiple channels. Other neurons discard everything except the first channel.
3488
3489Characteristics:
3490   supports any number of inputs
3491   provides output value
3492   does not require location in body
3493]]></description>
3494                </element>
3495                <element name="ncl_ChMux" type="integer" min="0" max="1">
3496                        <description><![CDATA[Outputs the selected channel from the second (multichannel) input. The first input is used as the selector value (-1=select first channel, .., 1=last channel)
3497
3498Characteristics:
3499   uses 2 inputs
3500   provides output value
3501   does not require location in body
3502]]></description>
3503                </element>
3504                <element name="ncl_ChSel" type="integer" min="0" max="1">
3505                        <description><![CDATA[Outputs a single channel (selected by the "ch" parameter) from multichannel input
3506
3507Characteristics:
3508   uses single input
3509   provides output value
3510   does not require location in body
3511
3512
3513Properties:
3514   channel (ch) integer]]></description>
3515                </element>
3516                <element name="ncl_Rnd" type="integer" min="0" max="1">
3517                        <description><![CDATA[Generates random noise (subsequent random values in the range of -1..+1)
3518
3519Characteristics:
3520   does not use inputs
3521   provides output value
3522   does not require location in body
3523]]></description>
3524                </element>
3525                <element name="ncl_Sin" type="integer" min="0" max="1">
3526                        <description><![CDATA[Output frequency = f0+input
3527
3528Characteristics:
3529   uses single input
3530   provides output value
3531   does not require location in body
3532
3533
3534Properties:
3535   base frequency (f0) float -1..1
3536   time (t) float 0..6.28319]]></description>
3537                </element>
3538                <element name="nnspeed" type="float" min="0" max="1000" default="1">
3539                        <description><![CDATA[Number of neural network simulation steps in each physics simulation step]]></description>
3540                </element>
3541                <element name="odeairdrag" type="float" min="0" max="0.5" default="0.01">
3542                        <description><![CDATA[A drag force ("air drag") proportional to the velocity of mass centers of moving parts]]></description>
3543                </element>
3544                <element name="odecol2bounce" type="float" min="0" max="1" default="0.1"/>
3545                <element name="odecol2bouncevel" type="float" min="0" max="1" default="0.01"/>
3546                <element name="odecol2mumax" type="float" min="0" max="10" default="1">
3547                        <description><![CDATA[Mu coefficient for Parts with maximal friction (i.e. "FFFFF" in f1)]]></description>
3548                </element>
3549                <element name="odecol2mumin" type="float" min="0" max="10" default="0.1">
3550                        <description><![CDATA[Mu coefficient for Parts with minimal friction (i.e. "fffff" in f1)]]></description>
3551                </element>
3552                <element name="odecol2softcfm" type="float" min="0" max="1" default="0"/>
3553                <element name="odecolbounce" type="float" min="0" max="1" default="0.1"/>
3554                <element name="odecolbouncevel" type="float" min="0" max="1" default="0.01"/>
3555                <element name="odecolmumax" type="float" min="0" max="10" default="5">
3556                        <description><![CDATA[Mu coefficient for Parts with maximal friction (i.e. "FFFFF" in f1)]]></description>
3557                </element>
3558                <element name="odecolmumin" type="float" min="0" max="10" default="0.1">
3559                        <description><![CDATA[Mu coefficient for Parts with minimal friction (i.e. "fffff" in f1)]]></description>
3560                </element>
3561                <element name="odecolsoftcfm" type="float" min="0" max="1" default="0"/>
3562                <element name="odemusclemax" type="float" min="0" max="100" default="10">
3563                        <description><![CDATA[i.e. "MMMMM" if f1]]></description>
3564                </element>
3565                <element name="odemusclemin" type="float" min="0" max="100" default="0">
3566                        <description><![CDATA[i.e. "mmmmm" in f1]]></description>
3567                </element>
3568                <element name="odemusclespeed" type="float" min="0" max="10" default="1">
3569                        <description><![CDATA[Muscle state cannot change faster than the supplied value]]></description>
3570                </element>
3571                <element name="odeseed" type="integer" min="0" max="2">
3572                        <description><![CDATA[Affects collisions.
3573- 'Truly random' is closest to the standard ODE operation. Use Math.seed to influence randomness in ODE collisions
3574- 'Deterministic' automatically calculates random seed in each step based on the current simulation (world) state, which makes the simulation repeatable but more random than 'Fixed'
3575- 'Fixed' is completely deterministic and does not depend on Math.seed. This might negatively affect ODE accuracy
3576]]></description>
3577                </element>
3578                <element name="odeshape" type="integer" min="0" max="1"/>
3579                <element name="odestep" type="float" min="0.001" max="1" default="0.05"/>
3580                <element name="odewaterbuoy" type="float" min="0" max="2" default="1"/>
3581                <element name="odewaterdrag" type="float" min="0.001" max="1" default="0.5"/>
3582                <element name="overwrite" type="integer" min="0" max="1">
3583                        <description><![CDATA[Overwite existing files or create their backups]]></description>
3584                </element>
3585                <element name="randinit" type="float" min="0" max="10" default="0.01">
3586                        <description><![CDATA[Allowed range for initializing all neuron states with uniform distribution random numbers and zero mean. Set 0 for deterministic initialization.]]></description>
3587                </element>
3588                <element name="resetonexpdef" type="integer" min="0" max="1" default="1">
3589                        <description><![CDATA[If turned on: when a new experiment definition is selected, default values are loaded for most of the simulator parameters, and gene pools and populations are cleared.
3590When turned off: parameters from previous experiment definition will remain.]]></description>
3591                </element>
3592                <element name="running" type="integer" min="0" max="1">
3593                        <description><![CDATA[for synchronizing the user interface state]]></description>
3594                </element>
3595                <element name="signals" type="WorldSignals"/>
3596                <element name="simil_method" type="integer" min="0" max="1" default="0">
3597                        <description><![CDATA[]]></description>
3598                </element>
3599                <element name="simil_neuro" type="float" min="0" max="100" default="0.5">
3600                        <description><![CDATA[]]></description>
3601                </element>
3602                <element name="simil_partdeg" type="float" min="0" max="100" default="1">
3603                        <description><![CDATA[]]></description>
3604                </element>
3605                <element name="simil_parts" type="float" min="0" max="100" default="0">
3606                        <description><![CDATA[Differing number of parts is also handled by the 'part degree' similarity component.]]></description>
3607                </element>
3608                <element name="simspeed" type="integer">
3609                        <description><![CDATA[steps/second]]></description>
3610                </element>
3611                <element name="simtype" type="integer" min="0" max="1" default="0">
3612                        <description><![CDATA[MechaStick is a fast and simple primary Framsticks simulation engine.
3613ODE is Open Dynamics Engine by Russel Smith et al.
3614
3615NOTE: switching between simulation engines causes removal of all objects in the world (e.g. creatures).]]></description>
3616                </element>
3617                <element name="symAlphaSteps" type="integer" min="2" max="50" default="20">
3618                        <description><![CDATA[Default number of samples per full angle (#1)]]></description>
3619                </element>
3620                <element name="symBetaSteps" type="integer" min="2" max="50" default="20">
3621                        <description><![CDATA[Default number of samples per full angle (#2)]]></description>
3622                </element>
3623                <element name="symPosSteps" type="integer" min="2" max="50" default="10">
3624                        <description><![CDATA[Default number of samples per stick length]]></description>
3625                </element>
3626                <element name="symResultA" type="float"/>
3627                <element name="symResultB" type="float"/>
3628                <element name="symResultC" type="float"/>
3629                <element name="symResultD" type="float"/>
3630                <element name="time" type="integer"/>
3631                <element name="touchrange" type="float" min="0" max="100" default="1"/>
3632                <element name="usercode" type="string">
3633                        <description><![CDATA[This script overrides the experiment definition]]></description>
3634                </element>
3635                <element name="vmdebug" type="integer" min="0" max="1"/>
3636                <element name="world" type="World"/>
3637                <element name="wrldbnd" type="integer" min="0" max="2" default="1"/>
3638                <element name="wrldg" type="float" min="0" max="10" default="1">
3639                        <description><![CDATA[You can adjust gravity for your experiments.
3640The "official" setting used to evaluate and compare creatures is 1.]]></description>
3641                </element>
3642                <element name="wrldmap" type="string">
3643                        <description><![CDATA[Description of the world (Type: Blocks or Heighfield). Enter
3644   r <sizex> <sizey> [seed]
3645to generate a random landscape, or
3646   m <sizex> <sizey> digits
3647   M <sizex> <sizey> numbers
3648to provide height values.
3649
3650See also the WorldMap object.]]></description>
3651                </element>
3652                <element name="wrldsiz" type="float" min="10" max="1000" default="20">
3653                        <description><![CDATA[Side length of the world]]></description>
3654                </element>
3655                <element name="wrldtyp" type="integer" min="0" max="2" default="0"/>
3656                <element name="wrldwat" type="float" min="-20" max="30" default="-1"/>
3657                <element name="add" function="true"/>
3658                <element name="addGroup" function="true"/>
3659                <element name="beep" function="true" type="void">
3660                        <description><![CDATA[Plays a default system sound]]></description>
3661<arguments/></element>
3662                <element name="calculateSymmetry" function="true" type="float">
3663                        <description><![CDATA[Returns bilateral symmetry (0.0 .. 1.0) for a given Model using default precision parameters (symPosSteps,symAlphaSteps,symBetaSteps). Returns the symmetry plane, too (sets symResultA,B,C,D).
3664Note: may take a long time for large creatures.]]></description>
3665                        <arguments>
3666                                <argument name="model" type="Model"/>
3667                        </arguments>
3668                </element>
3669                <element name="calculateSymmetry2" function="true" type="float">
3670                        <description><![CDATA[Returns bilateral symmetry (0.0 .. 1.0) for a given Model using specified precision parameters. Returns the symmetry plane, too (sets symResultA,B,C,D).
3671Note: may take a long time for large creatures.]]></description>
3672                        <arguments>
3673                                <argument name="model" type="Model"/>
3674                                <argument name="posSteps" type="integer"/>
3675                                <argument name="alphaSteps" type="integer"/>
3676                                <argument name="betaSteps" type="integer"/>
3677                        </arguments>
3678                </element>
3679                <element name="calculateSymmetryForPlane" function="true" type="float">
3680                        <description><![CDATA[Returns bilateral symmetry (0.0 .. 1.0) for a given Model and given a specific plane defined by coefficients A, B, C, D.]]></description>
3681                        <arguments>
3682                                <argument name="model" type="Model"/>
3683                                <argument name="A" type="float"/>
3684                                <argument name="B" type="float"/>
3685                                <argument name="C" type="float"/>
3686                                <argument name="D" type="float"/>
3687                        </arguments>
3688                </element>
3689                <element name="checkpoint" function="true" type="void">
3690                        <description><![CDATA[This function was previously called "autosave".]]></description>
3691<arguments/></element>
3692                <element name="clear" function="true"/>
3693                <element name="crossOver" function="true" type="Geno">
3694                        <description><![CDATA[returns crossed over genotype]]></description>
3695                        <arguments>
3696                                <argument type="Geno"/>
3697                                <argument type="Geno"/>
3698                        </arguments>
3699                </element>
3700                <element name="eval" function="true" type="void">
3701                        <arguments>
3702                                <argument name="script expression" type="string"/>
3703                        </arguments>
3704                </element>
3705                <element name="evaluateDistance" function="true" type="float">
3706                        <description><![CDATA[calculate dissimilarity between two models created from Geno objects]]></description>
3707                        <arguments>
3708                                <argument type="Geno"/>
3709                                <argument type="Geno"/>
3710                        </arguments>
3711                </element>
3712                <element name="export" function="true" type="void">
3713                        <description><![CDATA[Save some data to file. arguments:
3714- filename
3715- flags: composed of the following bit values:
3716   1 - experiment (works like "save" and all other bits are ignored)
3717   2 - genotypes
3718   4 - simulator parameters
3719   8 - simulator stats
3720   16 - genepool settings
3721   32 - population settings
3722   64 - do autosave
3723- selected genepool
3724- selected population]]></description>
3725                        <arguments>
3726                                <argument name="filename" type="string"/>
3727                                <argument name="options" type="integer"/>
3728                                <argument name="genepool" type="integer"/>
3729                                <argument name="population" type="integer"/>
3730                        </arguments>
3731                </element>
3732                <element name="getSimplest" function="true" type="Geno">
3733                        <description><![CDATA[returns the simplest genotype for a given encoding (format). 0 means f0, 4 means f4, etc.]]></description>
3734                        <arguments>
3735                                <argument name="format" type="integer"/>
3736                        </arguments>
3737                </element>
3738                <element name="import" function="true" type="void">
3739                        <description><![CDATA[Load some data from file. The second optional argument selects what section(s) will be imported:
3740 1 - experiment (works like "load" and can reset the simulator state!)
3741 2 - genotypes
3742 4 - simulator parameters
3743 8 - genepool settings
3744 16 - population settings
3745 32 - new groups will be created for imported genepools and populations
374664 - allow switching to a different expdef while importing parameters (4)
3747
3748The standard behavior (without the second argument) is to import genotypes, parameters, and genepool and population settings (2+4+8+16). Note that "64" is not included by default, because the expdef change resets all simulator parameters, which contradicts the usual meaning of "import" in Framsticks ("add data", as opposed to "load" meaning "replace data"). Moreover, using the "64" option in scripts can be dengerous, especially all expdef and show scripts should always declare the proper expdef name in their header rather than change the expdef directly. Without the "64" option, it is always safe to "import" any file in a script regardless of the current simulator state.]]></description>
3749                        <arguments>
3750                                <argument name="filename" type="string"/>
3751                                <argument name="options" type="integer"/>
3752                        </arguments>
3753                </element>
3754                <element name="init" function="true" type="void">
3755                        <description><![CDATA[Performs initialization procedures, like resetting counters, states, gene pools, etc.]]></description>
3756<arguments/></element>
3757                <element name="load" function="true" type="void">
3758                        <description><![CDATA[Load experiment file (calls onExpLoad() in the current experiment definition). This function is intended to replace the simulator state; the old state is cleared by automatically calling "resetToDefaults()" (only if "resetonexpdef" is enabled). Use "import" if you don't want to loose the old simulator state.]]></description>
3759                        <arguments>
3760                                <argument name="filename" type="string"/>
3761                        </arguments>
3762                </element>
3763                <element name="loadexpdef" function="true" type="void"><arguments/></element>
3764                <element name="loadNeurons" function="true" type="void">
3765                        <arguments>
3766                                <argument name="directory path" type="string"/>
3767                        </arguments>
3768                </element>
3769                <element name="message" function="true" type="void">
3770                        <description><![CDATA[The second argument can be:
3771 -1 = debugging message
3772 0 = information
3773 1 = warning
3774 2 = error
3775 3 = critical error]]></description>
3776                        <arguments>
3777                                <argument name="text" type="string"/>
3778                                <argument name="level" type="integer"/>
3779                        </arguments>
3780                </element>
3781                <element name="mutate" function="true" type="Geno">
3782                        <description><![CDATA[returns mutated Geno object from supplied Geno]]></description>
3783                        <arguments>
3784                                <argument type="Geno"/>
3785                        </arguments>
3786                </element>
3787                <element name="new" function="true" type="Simulator"><arguments/></element>
3788                <element name="operReport" function="true" type="void">
3789                        <description><![CDATA[Show available genetic operators]]></description>
3790<arguments/></element>
3791                <element name="print" function="true" type="void">
3792                        <description><![CDATA[One argument: message to be printed]]></description>
3793                        <arguments>
3794                                <argument name="text" type="string"/>
3795                        </arguments>
3796                </element>
3797                <element name="rayIntersection" function="true" type="float">
3798                        <arguments>
3799                                <argument name="position x" type="float"/>
3800                                <argument name="position y" type="float"/>
3801                                <argument name="position z" type="float"/>
3802                                <argument name="direction x" type="float"/>
3803                                <argument name="direction y" type="float"/>
3804                                <argument name="direction z" type="float"/>
3805                                <argument name="max distance" type="float"/>
3806                        </arguments>
3807                </element>
3808                <element name="remove" function="true"/>
3809                <element name="removeGroup" function="true"/>
3810                <element name="resetToDefaults" function="true" type="void">
3811                        <description><![CDATA[Clears groups and loads default values for simulator parameters, then calls onExpDefLoad() of the current experiment definition.]]></description>
3812<arguments/></element>
3813                <element name="save" function="true" type="void">
3814                        <description><![CDATA[Save experiment file (calls onExpSave() in the current experiment definition)]]></description>
3815                        <arguments>
3816                                <argument name="filename" type="string"/>
3817                        </arguments>
3818                </element>
3819                <element name="sleep" function="true" type="void">
3820                        <description><![CDATA[Suspends the execution for a specified interval]]></description>
3821                        <arguments>
3822                                <argument name="milliseconds" type="integer"/>
3823                        </arguments>
3824                </element>
3825                <element name="sound" function="true" type="void">
3826                        <description><![CDATA[Generates a simple tone on the speaker]]></description>
3827                        <arguments>
3828                                <argument name="freqency in Hz" type="integer"/>
3829                                <argument name="length in milliseconds" type="integer"/>
3830                        </arguments>
3831                </element>
3832                <element name="start" function="true" type="void">
3833                        <description><![CDATA[called by the user interface]]></description>
3834<arguments/></element>
3835                <element name="step" function="true" type="void"><arguments/></element>
3836                <element name="stop" function="true" type="void">
3837                        <description><![CDATA[the expdef script calls this to stop simulation]]></description>
3838<arguments/></element>
3839                <element name="toHTML" function="true" type="string">
3840                        <description><![CDATA[returns genotype expressed as colored HTML]]></description>
3841                        <arguments>
3842                                <argument type="string"/>
3843                        </arguments>
3844                </element>
3845                <element name="toHTMLshort" function="true" type="string">
3846                        <description><![CDATA[returns genotype (abbreviated if needed) expressed as colored HTML]]></description>
3847                        <arguments>
3848                                <argument type="string"/>
3849                        </arguments>
3850                </element>
3851                <element name="validate" function="true" type="Geno">
3852                        <description><![CDATA[returns validated (if possible) Geno object from supplied Geno]]></description>
3853                        <arguments>
3854                                <argument type="Geno"/>
3855                        </arguments>
3856                </element>
3857                <element name="wrldchg" function="true" type="void"><arguments/></element>
3858        </type>
3859        <type name="Similarity" context="Global context">
3860                <element name="simil_method" type="integer" min="0" max="1" default="0">
3861                        <description><![CDATA[]]></description>
3862                </element>
3863                <element name="simil_neuro" type="float" min="0" max="100" default="0.5">
3864                        <description><![CDATA[]]></description>
3865                </element>
3866                <element name="simil_partdeg" type="float" min="0" max="100" default="1">
3867                        <description><![CDATA[]]></description>
3868                </element>
3869                <element name="simil_parts" type="float" min="0" max="100" default="0">
3870                        <description><![CDATA[Differing number of parts is also handled by the 'part degree' similarity component.]]></description>
3871                </element>
3872                <element name="evaluateDistance" function="true" type="float">
3873                        <description><![CDATA[calculate dissimilarity between two models created from Geno objects]]></description>
3874                        <arguments>
3875                                <argument type="Geno"/>
3876                                <argument type="Geno"/>
3877                        </arguments>
3878                </element>
3879        </type>
3880        <type name="Simulator" context="Global context">
3881<description><![CDATA[The Framsticks simulator.]]></description>
3882                <element name="autosaveperiod" type="integer" min="0" max="100000">
3883                        <description><![CDATA[Save simulation state once every n-th event
3884(events are defined by the script. For 'standard.expdef' it is after each death).
3885Save EXPT file first to initialize name for autosave files.]]></description>
3886                </element>
3887                <element name="createrr" type="integer" min="0" max="2" default="1"/>
3888                <element name="creatwarnfail" type="integer" min="0" max="1">
3889                        <description><![CDATA[Creatures grown with warnings will not be simulated.]]></description>
3890                </element>
3891                <element name="expdef" type="string">
3892                        <description><![CDATA[Choose the experiment framework
3893(in Windows GUI, confirm by pressing 'Apply')
3894
3895Stop the simulation before selecting another experiment definition.
3896It is a good practice to initialize the experiment before running the simulation.]]></description>
3897                </element>
3898                <element name="expdef_info" type="string"/>
3899                <element name="expdef_title" type="string"/>
3900                <element name="filecomm" type="integer" min="0" max="1" default="1">
3901                        <description><![CDATA[Display comments encountered in opened files]]></description>
3902                </element>
3903                <element name="genolib" type="GenePools"/>
3904                <element name="groupchk" type="integer" min="0" max="1"/>
3905                <element name="importchk" type="integer" min="0" max="1"/>
3906                <element name="livelib" type="Populations"/>
3907                <element name="loadchk" type="integer" min="0" max="1"/>
3908                <element name="overwrite" type="integer" min="0" max="1">
3909                        <description><![CDATA[Overwite existing files or create their backups]]></description>
3910                </element>
3911                <element name="resetonexpdef" type="integer" min="0" max="1" default="1">
3912                        <description><![CDATA[If turned on: when a new experiment definition is selected, default values are loaded for most of the simulator parameters, and gene pools and populations are cleared.
3913When turned off: parameters from previous experiment definition will remain.]]></description>
3914                </element>
3915                <element name="running" type="integer" min="0" max="1">
3916                        <description><![CDATA[for synchronizing the user interface state]]></description>
3917                </element>
3918                <element name="simspeed" type="integer">
3919                        <description><![CDATA[steps/second]]></description>
3920                </element>
3921                <element name="time" type="integer"/>
3922                <element name="usercode" type="string">
3923                        <description><![CDATA[This script overrides the experiment definition]]></description>
3924                </element>
3925                <element name="vmdebug" type="integer" min="0" max="1"/>
3926                <element name="world" type="World"/>
3927                <element name="beep" function="true" type="void">
3928                        <description><![CDATA[Plays a default system sound]]></description>
3929<arguments/></element>
3930                <element name="checkpoint" function="true" type="void">
3931                        <description><![CDATA[This function was previously called "autosave".]]></description>
3932<arguments/></element>
3933                <element name="eval" function="true" type="void">
3934                        <arguments>
3935                                <argument name="script expression" type="string"/>
3936                        </arguments>
3937                </element>
3938                <element name="export" function="true" type="void">
3939                        <description><![CDATA[Save some data to file. arguments:
3940- filename
3941- flags: composed of the following bit values:
3942   1 - experiment (works like "save" and all other bits are ignored)
3943   2 - genotypes
3944   4 - simulator parameters
3945   8 - simulator stats
3946   16 - genepool settings
3947   32 - population settings
3948   64 - do autosave
3949- selected genepool
3950- selected population]]></description>
3951                        <arguments>
3952                                <argument name="filename" type="string"/>
3953                                <argument name="options" type="integer"/>
3954                                <argument name="genepool" type="integer"/>
3955                                <argument name="population" type="integer"/>
3956                        </arguments>
3957                </element>
3958                <element name="import" function="true" type="void">
3959                        <description><![CDATA[Load some data from file. The second optional argument selects what section(s) will be imported:
3960 1 - experiment (works like "load" and can reset the simulator state!)
3961 2 - genotypes
3962 4 - simulator parameters
3963 8 - genepool settings
3964 16 - population settings
3965 32 - new groups will be created for imported genepools and populations
396664 - allow switching to a different expdef while importing parameters (4)
3967
3968The standard behavior (without the second argument) is to import genotypes, parameters, and genepool and population settings (2+4+8+16). Note that "64" is not included by default, because the expdef change resets all simulator parameters, which contradicts the usual meaning of "import" in Framsticks ("add data", as opposed to "load" meaning "replace data"). Moreover, using the "64" option in scripts can be dengerous, especially all expdef and show scripts should always declare the proper expdef name in their header rather than change the expdef directly. Without the "64" option, it is always safe to "import" any file in a script regardless of the current simulator state.]]></description>
3969                        <arguments>
3970                                <argument name="filename" type="string"/>
3971                                <argument name="options" type="integer"/>
3972                        </arguments>
3973                </element>
3974                <element name="init" function="true" type="void">
3975                        <description><![CDATA[Performs initialization procedures, like resetting counters, states, gene pools, etc.]]></description>
3976<arguments/></element>
3977                <element name="load" function="true" type="void">
3978                        <description><![CDATA[Load experiment file (calls onExpLoad() in the current experiment definition). This function is intended to replace the simulator state; the old state is cleared by automatically calling "resetToDefaults()" (only if "resetonexpdef" is enabled). Use "import" if you don't want to loose the old simulator state.]]></description>
3979                        <arguments>
3980                                <argument name="filename" type="string"/>
3981                        </arguments>
3982                </element>
3983                <element name="loadexpdef" function="true" type="void"><arguments/></element>
3984                <element name="loadNeurons" function="true" type="void">
3985                        <arguments>
3986                                <argument name="directory path" type="string"/>
3987                        </arguments>
3988                </element>
3989                <element name="message" function="true" type="void">
3990                        <description><![CDATA[The second argument can be:
3991 -1 = debugging message
3992 0 = information
3993 1 = warning
3994 2 = error
3995 3 = critical error]]></description>
3996                        <arguments>
3997                                <argument name="text" type="string"/>
3998                                <argument name="level" type="integer"/>
3999                        </arguments>
4000                </element>
4001                <element name="new" function="true" type="Simulator"><arguments/></element>
4002                <element name="print" function="true" type="void">
4003                        <description><![CDATA[One argument: message to be printed]]></description>
4004                        <arguments>
4005                                <argument name="text" type="string"/>
4006                        </arguments>
4007                </element>
4008                <element name="resetToDefaults" function="true" type="void">
4009                        <description><![CDATA[Clears groups and loads default values for simulator parameters, then calls onExpDefLoad() of the current experiment definition.]]></description>
4010<arguments/></element>
4011                <element name="save" function="true" type="void">
4012                        <description><![CDATA[Save experiment file (calls onExpSave() in the current experiment definition)]]></description>
4013                        <arguments>
4014                                <argument name="filename" type="string"/>
4015                        </arguments>
4016                </element>
4017                <element name="sleep" function="true" type="void">
4018                        <description><![CDATA[Suspends the execution for a specified interval]]></description>
4019                        <arguments>
4020                                <argument name="milliseconds" type="integer"/>
4021                        </arguments>
4022                </element>
4023                <element name="sound" function="true" type="void">
4024                        <description><![CDATA[Generates a simple tone on the speaker]]></description>
4025                        <arguments>
4026                                <argument name="freqency in Hz" type="integer"/>
4027                                <argument name="length in milliseconds" type="integer"/>
4028                        </arguments>
4029                </element>
4030                <element name="start" function="true" type="void">
4031                        <description><![CDATA[called by the user interface]]></description>
4032<arguments/></element>
4033                <element name="step" function="true" type="void"><arguments/></element>
4034                <element name="stop" function="true" type="void">
4035                        <description><![CDATA[the expdef script calls this to stop simulation]]></description>
4036<arguments/></element>
4037        </type>
4038        <type name="stats" context="Global context">
4039                <element name="changedProperty" type="integer"/>
4040                <element name="changedPropertyId" type="string"/>
4041                <element name="gen_count" type="integer">
4042                        <description><![CDATA[]]></description>
4043                </element>
4044                <element name="gen_mfailed" type="integer">
4045                        <description><![CDATA[couldn't be performed]]></description>
4046                </element>
4047                <element name="gen_minvalid" type="integer">
4048                        <description><![CDATA[couldn't be repaired]]></description>
4049                </element>
4050                <element name="gen_mutimpr" type="float">
4051                        <description><![CDATA[total cumulative mutation change]]></description>
4052                </element>
4053                <element name="gen_mvalid" type="integer">
4054                        <description><![CDATA[]]></description>
4055                </element>
4056                <element name="gen_mvalidated" type="integer">
4057                        <description><![CDATA[]]></description>
4058                </element>
4059                <element name="gen_xofailed" type="integer">
4060                        <description><![CDATA[couldn't be performed]]></description>
4061                </element>
4062                <element name="gen_xoimpr" type="float">
4063                        <description><![CDATA[total cumulative crossover change]]></description>
4064                </element>
4065                <element name="gen_xoinvalid" type="integer">
4066                        <description><![CDATA[couldn't be repaired]]></description>
4067                </element>
4068                <element name="gen_xovalid" type="integer">
4069                        <description><![CDATA[]]></description>
4070                </element>
4071                <element name="gen_xovalidated" type="integer">
4072                        <description><![CDATA[]]></description>
4073                </element>
4074                <element name="st_avg_c_velocity" type="float"/>
4075                <element name="st_avg_c_vertpos" type="float"/>
4076                <element name="st_avg_c_vertvelocity" type="float"/>
4077                <element name="st_avg_center_x" type="float"/>
4078                <element name="st_avg_center_y" type="float"/>
4079                <element name="st_avg_center_z" type="float"/>
4080                <element name="st_avg_distance" type="float"/>
4081                <element name="st_avg_fit" type="float"/>
4082                <element name="st_avg_fit2" type="float"/>
4083                <element name="st_avg_gnum" type="float"/>
4084                <element name="st_avg_instances" type="float"/>
4085                <element name="st_avg_lifespan" type="float"/>
4086                <element name="st_avg_num" type="float"/>
4087                <element name="st_avg_numconnections" type="float"/>
4088                <element name="st_avg_numjoints" type="float"/>
4089                <element name="st_avg_numneurons" type="float"/>
4090                <element name="st_avg_numparts" type="float"/>
4091                <element name="st_avg_pos_x" type="float"/>
4092                <element name="st_avg_pos_y" type="float"/>
4093                <element name="st_avg_pos_z" type="float"/>
4094                <element name="st_avg_size_x" type="float"/>
4095                <element name="st_avg_size_y" type="float"/>
4096                <element name="st_avg_size_z" type="float"/>
4097                <element name="st_avg_velocity" type="float"/>
4098                <element name="st_avg_vertpos" type="float"/>
4099                <element name="st_avg_vertvel" type="float"/>
4100                <element name="st_count" type="integer"/>
4101                <element name="st_max_c_velocity" type="float"/>
4102                <element name="st_max_c_vertpos" type="float"/>
4103                <element name="st_max_c_vertvelocity" type="float"/>
4104                <element name="st_max_center_x" type="float"/>
4105                <element name="st_max_center_y" type="float"/>
4106                <element name="st_max_center_z" type="float"/>
4107                <element name="st_max_distance" type="float"/>
4108                <element name="st_max_fit" type="float"/>
4109                <element name="st_max_fit2" type="float"/>
4110                <element name="st_max_gnum" type="float"/>
4111                <element name="st_max_instances" type="float"/>
4112                <element name="st_max_lifespan" type="float"/>
4113                <element name="st_max_num" type="float"/>
4114                <element name="st_max_numconnections" type="float"/>
4115                <element name="st_max_numjoints" type="float"/>
4116                <element name="st_max_numneurons" type="float"/>
4117                <element name="st_max_numparts" type="float"/>
4118                <element name="st_max_pos_x" type="float"/>
4119                <element name="st_max_pos_y" type="float"/>
4120                <element name="st_max_pos_z" type="float"/>
4121                <element name="st_max_size_x" type="float"/>
4122                <element name="st_max_size_y" type="float"/>
4123                <element name="st_max_size_z" type="float"/>
4124                <element name="st_max_velocity" type="float"/>
4125                <element name="st_max_vertpos" type="float"/>
4126                <element name="st_max_vertvel" type="float"/>
4127                <element name="st_min_c_velocity" type="float"/>
4128                <element name="st_min_c_vertpos" type="float"/>
4129                <element name="st_min_c_vertvelocity" type="float"/>
4130                <element name="st_min_center_x" type="float"/>
4131                <element name="st_min_center_y" type="float"/>
4132                <element name="st_min_center_z" type="float"/>
4133                <element name="st_min_distance" type="float"/>
4134                <element name="st_min_fit" type="float"/>
4135                <element name="st_min_fit2" type="float"/>
4136                <element name="st_min_gnum" type="float"/>
4137                <element name="st_min_instances" type="float"/>
4138                <element name="st_min_lifespan" type="float"/>
4139                <element name="st_min_num" type="float"/>
4140                <element name="st_min_numconnections" type="float"/>
4141                <element name="st_min_numjoints" type="float"/>
4142                <element name="st_min_numneurons" type="float"/>
4143                <element name="st_min_numparts" type="float"/>
4144                <element name="st_min_pos_x" type="float"/>
4145                <element name="st_min_pos_y" type="float"/>
4146                <element name="st_min_pos_z" type="float"/>
4147                <element name="st_min_size_x" type="float"/>
4148                <element name="st_min_size_y" type="float"/>
4149                <element name="st_min_size_z" type="float"/>
4150                <element name="st_min_velocity" type="float"/>
4151                <element name="st_min_vertpos" type="float"/>
4152                <element name="st_min_vertvel" type="float"/>
4153                <element name="add" function="true"/>
4154                <element name="addGroup" function="true"/>
4155                <element name="clear" function="true"/>
4156                <element name="clrstats" function="true" type="void">
4157                        <description><![CDATA[]]></description>
4158<arguments/></element>
4159                <element name="remove" function="true"/>
4160                <element name="removeGroup" function="true"/>
4161        </type>
4162        <type name="String" context="Global context">
4163<description><![CDATA[String functions library.]]></description>
4164                <element name="char" function="true" type="string">
4165                        <arguments>
4166                                <argument type="integer"/>
4167                        </arguments>
4168                </element>
4169                <element name="code" function="true" type="integer">
4170                        <arguments>
4171                                <argument type="string"/>
4172                        </arguments>
4173                </element>
4174                <element name="format" function="true" type="string">
4175                        <description><![CDATA[Works like the standard C library "sprintf()" but only one %-argument is accepted.
4176Format string: %[-][+][0][width[.precision]]type
4177 -: left adjust (default is right adjust)
4178 +: place a sign (+ or -) before a number
4179 0: the value should be zero padded
4180 width: minimum field width
4181 precision: minimum number of decimal digits
4182 type: d=decimal integer, x/X=hexadecimal integer, f/g=floating point number, e="scientific" style floating point, t=time
4183Examples:
4184 String.format("|%07.2f|",Math.pi) -> ="|0003.14|"
4185 String.format("|%04x|",255) -> ="|00ff|"
4186 String.format("|%7s|","text") -> ="|   text|"
4187 String.format("|%-7d|",12345) -> ="|12345  |"
4188 String.format("%t",Math.time) -> ="Sun Apr 29 19:22:02 2007"
4189 String.format("%T",Math.time) -> ="2007-05-29 19:22:02"
4190]]></description>
4191                        <arguments>
4192                                <argument name="format" type="string"/>
4193                                <argument name="value" type="untyped"/>
4194                        </arguments>
4195                </element>
4196                <element name="indexOf" function="true" type="integer">
4197                        <description><![CDATA[String.indexOf("abcdef","cd") -> 2
4198String.indexOf("abcdef","dc") -> -1
4199]]></description>
4200                        <arguments>
4201                                <argument type="string"/>
4202                                <argument name="substring" type="string"/>
4203                        </arguments>
4204                </element>
4205                <element name="indexOfStart" function="true" type="integer">
4206                        <description><![CDATA[String.indexOfStart("abcdef","cd",1) -> 2
4207String.indexOfStart("abcdef","cd",3) -> -1
4208]]></description>
4209                        <arguments>
4210                                <argument type="string"/>
4211                                <argument name="substring" type="string"/>
4212                                <argument name="start index" type="integer"/>
4213                        </arguments>
4214                </element>
4215                <element name="left" function="true" type="string">
4216                        <description><![CDATA[String.left("abcdef",3) -> ="abc"]]></description>
4217                        <arguments>
4218                                <argument type="string"/>
4219                                <argument name="number of characters" type="integer"/>
4220                        </arguments>
4221                </element>
4222                <element name="len" function="true" type="integer">
4223                        <description><![CDATA[String.len("abcdef") -> 6]]></description>
4224                        <arguments>
4225                                <argument type="string"/>
4226                        </arguments>
4227                </element>
4228                <element name="parseFloat" function="true" type="float">
4229                        <arguments>
4230                                <argument type="string"/>
4231                        </arguments>
4232                </element>
4233                <element name="parseInt" function="true" type="integer">
4234                        <arguments>
4235                                <argument type="string"/>
4236                        </arguments>
4237                </element>
4238                <element name="replace" function="true" type="string">
4239                        <description><![CDATA[String.replace("abcdef","cd","X") -> "abXef"]]></description>
4240                        <arguments>
4241                                <argument name="search" type="string"/>
4242                                <argument name="substitute" type="string"/>
4243                        </arguments>
4244                </element>
4245                <element name="right" function="true" type="string">
4246                        <description><![CDATA[String.right("abcdef",3) -> ="def"]]></description>
4247                        <arguments>
4248                                <argument type="string"/>
4249                                <argument name="number of characters" type="integer"/>
4250                        </arguments>
4251                </element>
4252                <element name="split" function="true" type="Vector">
4253                        <description><![CDATA[return the vector of substrings, cut at separator positions.
4254subsequent separators give empty words: split("word1---word2-word3","-") -> ["word1","","","word2","word3"]]]></description>
4255                        <arguments>
4256                                <argument type="string"/>
4257                                <argument name="word separator" type="string"/>
4258                        </arguments>
4259                </element>
4260                <element name="split2" function="true" type="Vector">
4261                        <description><![CDATA[return the vector of substrings, cut at separator positions.
4262subsequent separators are treated as one: split2("word1---word2-word3","-") -> ["word1","word2","word3"]]]></description>
4263                        <arguments>
4264                                <argument type="string"/>
4265                                <argument name="word separator" type="string"/>
4266                        </arguments>
4267                </element>
4268                <element name="substr" function="true" type="string">
4269                        <description><![CDATA[String.substr("abcdef",3,2) -> ="de"]]></description>
4270                        <arguments>
4271                                <argument type="string"/>
4272                                <argument name="first character" type="integer"/>
4273                                <argument name="number of characters" type="integer"/>
4274                        </arguments>
4275                </element>
4276                <element name="toLower" function="true" type="string">
4277                        <arguments>
4278                                <argument type="string"/>
4279                        </arguments>
4280                </element>
4281                <element name="toUpper" function="true" type="string">
4282                        <arguments>
4283                                <argument type="string"/>
4284                        </arguments>
4285                </element>
4286        </type>
4287        <type name="Symmetry" context="Global context">
4288                <element name="symAlphaSteps" type="integer" min="2" max="50" default="20">
4289                        <description><![CDATA[Default number of samples per full angle (#1)]]></description>
4290                </element>
4291                <element name="symBetaSteps" type="integer" min="2" max="50" default="20">
4292                        <description><![CDATA[Default number of samples per full angle (#2)]]></description>
4293                </element>
4294                <element name="symPosSteps" type="integer" min="2" max="50" default="10">
4295                        <description><![CDATA[Default number of samples per stick length]]></description>
4296                </element>
4297                <element name="symResultA" type="float"/>
4298                <element name="symResultB" type="float"/>
4299                <element name="symResultC" type="float"/>
4300                <element name="symResultD" type="float"/>
4301                <element name="calculateSymmetry" function="true" type="float">
4302                        <description><![CDATA[Returns bilateral symmetry (0.0 .. 1.0) for a given Model using default precision parameters (symPosSteps,symAlphaSteps,symBetaSteps). Returns the symmetry plane, too (sets symResultA,B,C,D).
4303Note: may take a long time for large creatures.]]></description>
4304                        <arguments>
4305                                <argument name="model" type="Model"/>
4306                        </arguments>
4307                </element>
4308                <element name="calculateSymmetry2" function="true" type="float">
4309                        <description><![CDATA[Returns bilateral symmetry (0.0 .. 1.0) for a given Model using specified precision parameters. Returns the symmetry plane, too (sets symResultA,B,C,D).
4310Note: may take a long time for large creatures.]]></description>
4311                        <arguments>
4312                                <argument name="model" type="Model"/>
4313                                <argument name="posSteps" type="integer"/>
4314                                <argument name="alphaSteps" type="integer"/>
4315                                <argument name="betaSteps" type="integer"/>
4316                        </arguments>
4317                </element>
4318                <element name="calculateSymmetryForPlane" function="true" type="float">
4319                        <description><![CDATA[Returns bilateral symmetry (0.0 .. 1.0) for a given Model and given a specific plane defined by coefficients A, B, C, D.]]></description>
4320                        <arguments>
4321                                <argument name="model" type="Model"/>
4322                                <argument name="A" type="float"/>
4323                                <argument name="B" type="float"/>
4324                                <argument name="C" type="float"/>
4325                                <argument name="D" type="float"/>
4326                        </arguments>
4327                </element>
4328        </type>
4329        <type name="UserScripts" context="Global context">
4330                <element name="changedProperty" type="integer"/>
4331                <element name="changedPropertyId" type="string"/>
4332                <element name="add" function="true"/>
4333                <element name="addGroup" function="true"/>
4334                <element name="clear" function="true"/>
4335                <element name="remove" function="true"/>
4336                <element name="removeGroup" function="true"/>
4337        </type>
4338        <type name="Vector" context="Global context">
4339<description><![CDATA[Vector is 1-dimensional array, indexed by integer value (starting from 0). Multidimensional arrays can be simulated by putting other Vector objects into the Vector.
4340Example:
4341var v=Vector.new();
4342v.add(123); v.add("string");]]></description>
4343                <element name="avg" type="float"/>
4344                <element name="size" type="integer"/>
4345                <element name="stdev" type="float">
4346                        <description><![CDATA[=sqrt(sum((element[i]-avg)^2)/(size-1)) which is estimated population std.dev. from sample std.dev.]]></description>
4347                </element>
4348                <element name="toString" type="string"/>
4349                <element name="add" function="true" type="void">
4350                        <arguments>
4351                                <argument name="value" type="untyped"/>
4352                        </arguments>
4353                </element>
4354                <element name="clear" function="true" type="void"><arguments/></element>
4355                <element name="find" function="true" type="integer">
4356                        <description><![CDATA[returns the element index or -1 if not found]]></description>
4357                        <arguments>
4358                                <argument name="value" type="untyped"/>
4359                        </arguments>
4360                </element>
4361                <element name="get" function="true" type="untyped">
4362                        <arguments>
4363                                <argument name="position" type="integer"/>
4364                        </arguments>
4365                </element>
4366                <element name="new" function="true" type="Vector"><arguments/></element>
4367                <element name="remove" function="true" type="void">
4368                        <arguments>
4369                                <argument name="position" type="integer"/>
4370                        </arguments>
4371                </element>
4372                <element name="set" function="true" type="void">
4373                        <arguments>
4374                                <argument name="position" type="integer"/>
4375                                <argument name="value" type="untyped"/>
4376                        </arguments>
4377                </element>
4378        </type>
4379        <type name="World" context="Global context">
4380<description><![CDATA[Environment properties.]]></description>
4381                <element name="nnspeed" type="float" min="0" max="1000" default="1">
4382                        <description><![CDATA[Number of neural network simulation steps in each physics simulation step]]></description>
4383                </element>
4384                <element name="signals" type="WorldSignals"/>
4385                <element name="simtype" type="integer" min="0" max="1" default="0">
4386                        <description><![CDATA[MechaStick is a fast and simple primary Framsticks simulation engine.
4387ODE is Open Dynamics Engine by Russel Smith et al.
4388
4389NOTE: switching between simulation engines causes removal of all objects in the world (e.g. creatures).]]></description>
4390                </element>
4391                <element name="wrldbnd" type="integer" min="0" max="2" default="1"/>
4392                <element name="wrldg" type="float" min="0" max="10" default="1">
4393                        <description><![CDATA[You can adjust gravity for your experiments.
4394The "official" setting used to evaluate and compare creatures is 1.]]></description>
4395                </element>
4396                <element name="wrldmap" type="string">
4397                        <description><![CDATA[Description of the world (Type: Blocks or Heighfield). Enter
4398   r <sizex> <sizey> [seed]
4399to generate a random landscape, or
4400   m <sizex> <sizey> digits
4401   M <sizex> <sizey> numbers
4402to provide height values.
4403
4404See also the WorldMap object.]]></description>
4405                </element>
4406                <element name="wrldsiz" type="float" min="10" max="1000" default="20">
4407                        <description><![CDATA[Side length of the world]]></description>
4408                </element>
4409                <element name="wrldtyp" type="integer" min="0" max="2" default="0"/>
4410                <element name="wrldwat" type="float" min="-20" max="30" default="-1"/>
4411                <element name="wrldchg" function="true" type="void"><arguments/></element>
4412        </type>
4413        <type name="WorldMap" context="Global context">
4414<description><![CDATA[Environment details for "Blocks" and "Heightfield" world type. The most important concept is a "Map", which is the array of Map elements. Internally, Maps have more elements than could be deduced from the user-supplied World.wrldsiz, as additional rows of element are added to provide smooth transitions to the flat surroundings.
4415
4416Blocks: x/ysize=World.wrldsiz+4 rows of blocks (from which only 2+World.wrldsiz rows are placed within the world boundaries)
4417
4418Smooth: x/ysize=World.wrldsiz+2 rows of vertices (creating World.wrldsiz+1 rows of triangles, everything within the world boundaries)
4419]]></description>
4420                <element name="xsize" type="integer"/>
4421                <element name="ysize" type="integer"/>
4422                <element name="getHeight" function="true" type="float">
4423                        <description><![CDATA[Height at any 2d coordinate]]></description>
4424                        <arguments>
4425                                <argument name="x" type="float"/>
4426                                <argument name="y" type="float"/>
4427                        </arguments>
4428                </element>
4429                <element name="getMap" function="true" type="Object">
4430                        <description><![CDATA[retrieve map cell object]]></description>
4431                        <arguments>
4432                                <argument name="x" type="integer"/>
4433                                <argument name="y" type="integer"/>
4434                        </arguments>
4435                </element>
4436                <element name="intersect" function="true" type="Vector">
4437                        <description><![CDATA[Calculate the intersection point between the world surface and the ray projected from "3d point" towards the given direction. 3D points are actually 3-elements Vector objects. The resulting vector contains the additional fourth element - the intersection point distance. The function returns null if there is no intersection.
4438
4439See "standard_events.inc" file, which uses "intersect" for calculating the world coordinates corresponding to the user-clicked screen location.
4440Bugs: This function does not currently handle the heightfield environment correctly (works as if it was flat)]]></description>
4441                        <arguments>
4442                                <argument name="3d point" type="Vector"/>
4443                                <argument name="3d direction" type="Vector"/>
4444                                <argument name="range" type="float"/>
4445                        </arguments>
4446                </element>
4447        </type>
4448        <type name="WorldSignals" context="Global context">
4449<description><![CDATA[Use this object to create stationary signals, not associated with any moving object and receive signals from any location in the world. There are Creature and Neuro-based variants of this object that automatically operate from the creature's or neuron's position.
4450
4451See also: Signal]]></description>
4452                <element name="size" type="integer">
4453                        <description><![CDATA[Number of signals in this set.]]></description>
4454                </element>
4455                <element name="add" function="true" type="Signal">
4456                        <description><![CDATA[Create a new signal]]></description>
4457                        <arguments>
4458                                <argument name="position" type="XYZ"/>
4459                                <argument name="channel" type="string"/>
4460                        </arguments>
4461                </element>
4462                <element name="clear" function="true" type="void">
4463                        <description><![CDATA[Delete all signals]]></description>
4464<arguments/></element>
4465                <element name="get" function="true" type="Signal">
4466                        <description><![CDATA[Access individual signals (index=0 .. size-1)]]></description>
4467                        <arguments>
4468                                <argument name="index" type="integer"/>
4469                        </arguments>
4470                </element>
4471                <element name="receive" function="true" type="float">
4472                        <description><![CDATA[Receive the aggregated signal power in a given channel.]]></description>
4473                        <arguments>
4474                                <argument name="position" type="XYZ"/>
4475                                <argument name="channel" type="string"/>
4476                        </arguments>
4477                </element>
4478                <element name="receiveFilter" function="true" type="float">
4479                        <description><![CDATA[Receive the aggregated signal power in a given channel.
4480
4481Additional filtering options:
4482- Max distance only receives the neighbor signals (based on their physical location)
4483- Flavor filtering: only signals having the flavor close to the specified one will be received. The filter value is the maximum allowed difference.]]></description>
4484                        <arguments>
4485                                <argument name="position" type="XYZ"/>
4486                                <argument name="channel" type="string"/>
4487                                <argument name="max distance" type="float"/>
4488                                <argument name="flavor" type="float"/>
4489                                <argument name="filter" type="float"/>
4490                        </arguments>
4491                </element>
4492                <element name="receiveSet" function="true" type="Vector">
4493                        <description><![CDATA[Get all signals in the specified range. Returns a readonly vector object containing Signal objects (individual signals can be accessed as result[0] throught result[result.size-1]).]]></description>
4494                        <arguments>
4495                                <argument name="position" type="XYZ"/>
4496                                <argument name="channel" type="string"/>
4497                                <argument name="max distance" type="float"/>
4498                        </arguments>
4499                </element>
4500                <element name="receiveSingle" function="true" type="Signal">
4501                        <description><![CDATA[Find the signal source having the highest signal power (including the distance)]]></description>
4502                        <arguments>
4503                                <argument name="position" type="XYZ"/>
4504                                <argument name="channel" type="string"/>
4505                                <argument name="max distance" type="float"/>
4506                        </arguments>
4507                </element>
4508        </type>
4509        <type name="XYZ" context="Global context">
4510<description><![CDATA[3D vector]]></description>
4511                <element name="length" type="float"/>
4512                <element name="toString" type="string"/>
4513                <element name="x" type="float"/>
4514                <element name="y" type="float"/>
4515                <element name="z" type="float"/>
4516                <element name="add" function="true" type="void">
4517                        <description><![CDATA[Note: it does not return a new object, just modifies the existing one]]></description>
4518                        <arguments>
4519                                <argument type="XYZ"/>
4520                        </arguments>
4521                </element>
4522                <element name="clone" function="true" type="XYZ">
4523                        <description><![CDATA[Note: copying object references does not create new objects. Use clone() if a new object is needed.
4524
4525Example:
4526var o1=(1,2,3), o2=o1, o3=o1.clone();
4527o1.y=9999;
4528//o2 is now (1,9999,3) but o3 is still (1,2,3)]]></description>
4529<arguments/></element>
4530                <element name="get" function="true" type="float">
4531                        <description><![CDATA[this function makes the XYZ objects "indexable" (so you can use [] for accessing subsequent fields, like in Vector)]]></description>
4532                        <arguments>
4533                                <argument name="index" type="integer"/>
4534                        </arguments>
4535                </element>
4536                <element name="new" function="true" type="XYZ">
4537                        <description><![CDATA[3D vectors objects can be also created using the (x,y,z) notation, i.e. var v=(1,2,3) is the same as var v=XYZ.new(1,2,3);]]></description>
4538                        <arguments>
4539                                <argument name="x" type="float"/>
4540                                <argument name="y" type="float"/>
4541                                <argument name="z" type="float"/>
4542                        </arguments>
4543                </element>
4544                <element name="normalize" function="true" type="void">
4545                        <description><![CDATA[scales the vector length to 1.0]]></description>
4546<arguments/></element>
4547                <element name="revRotate" function="true" type="void">
4548                        <arguments>
4549                                <argument type="Orient"/>
4550                        </arguments>
4551                </element>
4552                <element name="rotate" function="true" type="void">
4553                        <arguments>
4554                                <argument type="Orient"/>
4555                        </arguments>
4556                </element>
4557                <element name="scale" function="true" type="void">
4558                        <arguments>
4559                                <argument type="float"/>
4560                        </arguments>
4561                </element>
4562                <element name="set" function="true" type="void">
4563                        <arguments>
4564                                <argument type="XYZ"/>
4565                        </arguments>
4566                </element>
4567                <element name="set3" function="true" type="void">
4568                        <arguments>
4569                                <argument name="x" type="float"/>
4570                                <argument name="y" type="float"/>
4571                                <argument name="z" type="float"/>
4572                        </arguments>
4573                </element>
4574                <element name="sub" function="true" type="void">
4575                        <description><![CDATA[Note: it does not return a new object, just modifies the existing one]]></description>
4576                        <arguments>
4577                                <argument type="XYZ"/>
4578                        </arguments>
4579                </element>
4580        </type>
4581        <type name="ExpParams" context="Experiment definition">
4582                <element name="changedProperty" type="integer"/>
4583                <element name="changedPropertyId" type="string"/>
4584                <element name="add" function="true"/>
4585                <element name="addGroup" function="true"/>
4586                <element name="clear" function="true"/>
4587                <element name="remove" function="true"/>
4588                <element name="removeGroup" function="true"/>
4589        </type>
4590        <type name="ExpState" context="Experiment definition">
4591                <element name="changedProperty" type="integer"/>
4592                <element name="changedPropertyId" type="string"/>
4593                <element name="add" function="true"/>
4594                <element name="addGroup" function="true"/>
4595                <element name="clear" function="true"/>
4596                <element name="remove" function="true"/>
4597                <element name="removeGroup" function="true"/>
4598        </type>
4599        <type name="n" context="Neuron definitions">
4600                <element name="d" type="string"/>
4601                <element name="getInputCount" type="integer"/>
4602                <element name="i" type="string"/>
4603                <element name="j" type="integer" min="-1" max="999999" default="-1"/>
4604                <element name="p" type="integer" min="-1" max="999999" default="-1"/>
4605                <element name="Vstyle" type="string"/>
4606                <element name="getInputNeuroDef" function="true" type="NeuroDef">
4607                        <arguments>
4608                                <argument type="integer"/>
4609                        </arguments>
4610                </element>
4611                <element name="getInputNeuroIndex" function="true" type="integer">
4612                        <arguments>
4613                                <argument type="integer"/>
4614                        </arguments>
4615                </element>
4616                <element name="getInputWeight" function="true" type="float">
4617                        <arguments>
4618                                <argument type="integer"/>
4619                        </arguments>
4620                </element>
4621        </type>
4622        <type name="Neuro" context="Neuron definitions">
4623<description><![CDATA[Live Neuron object.]]></description>
4624                <element name="channelCount" type="integer"/>
4625                <element name="creature" type="Creature"/>
4626                <element name="currState" type="float">
4627                        <description><![CDATA[The only difference from the "state" field is that currState, when written, changes the internal neuron state immediately (which disturbs the regular synchronous NN operation). This feature should only be used while controlling the neuron 'from outside' (like a neuro probe) and not in the neuron definition. See also: Neuro.hold]]></description>
4628                </element>
4629                <element name="def" type="NeuroDef"/>
4630                <element name="fields" type="Fields">
4631                        <description><![CDATA[Neurons can have different fields depending on their class. Script neurons have their fields defined using the "prop:" syntax. If you develop a custom neuron script you should use the Fields object for accessing your own neuron fields. The Neuro.fields property is meant for accessing the neuron fields from the outside script.
4632Examples:
4633var c=Populations.createFromString("X[N]");
4634Simulator.print("standard neuron inertia="+c.getNeuro(0).fields.in);
4635c=Populations.createFromString("X[Nn,e:0.1]");
4636Simulator.print("noisy neuron error rate="+c.getNeuro(0).fields.e);
4637
4638The Interface object can be used to discover which fields are available for a certain neuron object:
4639c=Populations.createFromString("X[N]");
4640var iobj=Interface.makeFrom(c.getNeuro(0).fields);
4641var i;
4642for(i=0;i<iobj.properties;i++)
4643 Simulator.print(iobj.getId(i)+" ("+iobj.getName(i)+")");]]></description>
4644                </element>
4645                <element name="getInputCount" type="integer"/>
4646                <element name="hold" type="integer" min="0" max="1">
4647                        <description><![CDATA["Holding" means keeping the neuron state as is, blocking the regular neuron operation. This is useful when your script needs to inject some control signals into the NN. Without "holding", live neurons would be constantly overwriting your changes, and the rest of the NN could see inconsistent states, depending on the connections. Setting hold=1 ensures the neuron state will be only set by you, and not by the neuron. The enforced signal value can be set using Neuro.currState before or after setting hold=1. Set hold=0 to resume normal operation.]]></description>
4648                </element>
4649                <element name="inputSum" type="float"/>
4650                <element name="joint" type="MechJoint"/>
4651                <element name="part" type="MechPart"/>
4652                <element name="position_x" type="float"/>
4653                <element name="position_y" type="float"/>
4654                <element name="position_z" type="float"/>
4655                <element name="signals" type="NeuroSignals"/>
4656                <element name="state" type="float">
4657                        <description><![CDATA[When read, returns the current neuron state.
4658When written, sets the next neuron state (for use in the neuron definition)]]></description>
4659                </element>
4660                <element name="weightedInputSum" type="float"/>
4661                <element name="getInputChannelCount" function="true" type="integer">
4662                        <arguments>
4663                                <argument name="input" type="integer"/>
4664                        </arguments>
4665                </element>
4666                <element name="getInputState" function="true" type="float">
4667                        <arguments>
4668                                <argument name="input" type="integer"/>
4669                        </arguments>
4670                </element>
4671                <element name="getInputStateChannel" function="true" type="float">
4672                        <arguments>
4673                                <argument name="input" type="integer"/>
4674                                <argument name="channel" type="integer"/>
4675                        </arguments>
4676                </element>
4677                <element name="getInputSum" function="true" type="float">
4678                        <arguments>
4679                                <argument name="input" type="integer"/>
4680                        </arguments>
4681                </element>
4682                <element name="getInputWeight" function="true" type="float">
4683                        <arguments>
4684                                <argument name="input" type="integer"/>
4685                        </arguments>
4686                </element>
4687                <element name="getStateChannel" function="true" type="float">
4688                        <arguments>
4689                                <argument name="channel" type="integer"/>
4690                        </arguments>
4691                </element>
4692                <element name="getWeightedInputState" function="true" type="float">
4693                        <arguments>
4694                                <argument name="input" type="integer"/>
4695                        </arguments>
4696                </element>
4697                <element name="getWeightedInputStateChannel" function="true" type="float">
4698                        <arguments>
4699                                <argument name="input" type="integer"/>
4700                                <argument name="channel" type="integer"/>
4701                        </arguments>
4702                </element>
4703                <element name="getWeightedInputSum" function="true" type="float">
4704                        <description><![CDATA[Uses any number of inputs starting with the specified input. getWeightedInputSum(0)=weightedInputSum]]></description>
4705                        <arguments>
4706                                <argument name="input" type="integer"/>
4707                        </arguments>
4708                </element>
4709                <element name="setCurrStateChannel" function="true" type="void">
4710                        <description><![CDATA[Analogous to "currState".]]></description>
4711                        <arguments>
4712                                <argument name="channel" type="integer"/>
4713                                <argument name="value" type="float"/>
4714                        </arguments>
4715                </element>
4716                <element name="setStateChannel" function="true" type="void">
4717                        <arguments>
4718                                <argument name="channel" type="integer"/>
4719                                <argument name="value" type="float"/>
4720                        </arguments>
4721                </element>
4722        </type>
4723        <type name="this" context="Fitness formula">
4724<description><![CDATA[A Genotype with the associated performance information. All but one Genotype objects are placed in Genotype Groups. There is also a single static Genotype object not associated with a group, which is used as a temporary storage by genetic operators and some functions from GenePools.]]></description>
4725                <element name="convtrace1" type="string"/>
4726                <element name="distance" type="float"/>
4727                <element name="energ0" type="float"/>
4728                <element name="f0genotype" type="string">
4729                        <description><![CDATA[converted to f0 genotype]]></description>
4730                </element>
4731                <element name="fit" type="float"/>
4732                <element name="fit2" type="float">
4733                        <description><![CDATA[Fitness shifted by (avg-n*stddev)]]></description>
4734                </element>
4735                <element name="geno" type="Geno">
4736                        <description><![CDATA[Geno object for this Genotype]]></description>
4737                </element>
4738                <element name="genotype" type="string"/>
4739                <element name="gnum" type="integer"/>
4740                <element name="info" type="string">
4741                        <description><![CDATA[Additional information or comments]]></description>
4742                </element>
4743                <element name="instances" type="integer">
4744                        <description><![CDATA[Copies of this genotype]]></description>
4745                </element>
4746                <element name="isValid" type="integer" min="0" max="1"/>
4747                <element name="lifespan" type="float">
4748                        <description><![CDATA[Average life span]]></description>
4749                </element>
4750                <element name="name" type="string"/>
4751                <element name="nncon" type="float"/>
4752                <element name="nnsiz" type="float"/>
4753                <element name="num" type="integer"/>
4754                <element name="numconnections" type="float"/>
4755                <element name="numjoints" type="float"/>
4756                <element name="numneurons" type="float"/>
4757                <element name="numparts" type="float"/>
4758                <element name="popsiz" type="integer"/>
4759                <element name="simi" type="float"/>
4760                <element name="strjoints" type="float"/>
4761                <element name="strsiz" type="float"/>
4762                <element name="uid" type="string">
4763                        <description><![CDATA[Unique identifier]]></description>
4764                </element>
4765                <element name="user1" type="untyped"/>
4766                <element name="user2" type="untyped"/>
4767                <element name="user3" type="untyped"/>
4768                <element name="velocity" type="float">
4769                        <description><![CDATA[Average velocity]]></description>
4770                </element>
4771                <element name="vertpos" type="float"/>
4772                <element name="vertvel" type="float"/>
4773                <element name="getModel" function="true" type="Model"><arguments/></element>
4774                <element name="getNormalized" function="true" type="float">
4775                        <arguments>
4776                                <argument name="property name or index" type="untyped"/>
4777                        </arguments>
4778                </element>
4779                <element name="mutate" function="true" type="void"><arguments/></element>
4780        </type>
4781        <type name="Creature" context="Visual style definition">
4782<description><![CDATA[The object inside the simulated world, including its physical structure, neural network and performance data. Food pieces, obstacles and other movable objects can be implemented as Creatures even though the are not "alive". See also: Population.]]></description>
4783                <element name="bodysim" type="integer" min="0" max="1" default="1">
4784                        <description><![CDATA[(Physical) body simulation can be disabled for individual objects which makes them immovable. Disabled objects can still participate in collisions depending on their collisions masks.
4785
4786Bugs: the standard collision handler does not work for disabled objects when ODE simulation is used. It means that these objects won't physically interact with other objects. The custom (scripting) handlers work as expected.]]></description>
4787                </element>
4788                <element name="buildproblems" type="integer"/>
4789                <element name="c_velocity" type="float"/>
4790                <element name="c_vertpos" type="float"/>
4791                <element name="c_vertvelocity" type="float"/>
4792                <element name="center_x" type="float">
4793                        <description><![CDATA[Center of gravity]]></description>
4794                </element>
4795                <element name="center_y" type="float">
4796                        <description><![CDATA[Center of gravity]]></description>
4797                </element>
4798                <element name="center_z" type="float">
4799                        <description><![CDATA[Center of gravity]]></description>
4800                </element>
4801                <element name="distance" type="float"/>
4802                <element name="drive" type="XYZ">
4803                        <description><![CDATA[Measured in global coordinates]]></description>
4804                </element>
4805                <element name="energ0" type="float"/>
4806                <element name="energy" type="float"/>
4807                <element name="energy_b" type="float"/>
4808                <element name="energy_m" type="float"/>
4809                <element name="energy_p" type="float"/>
4810                <element name="geno" type="Geno">
4811                        <description><![CDATA[Source genotype for this creature]]></description>
4812                </element>
4813                <element name="genotype" type="string"/>
4814                <element name="gnum" type="integer"/>
4815                <element name="group" type="untyped"/>
4816                <element name="idleen" type="float"/>
4817                <element name="index" type="integer">
4818                        <description><![CDATA[Index of this Creature in its Population.]]></description>
4819                </element>
4820                <element name="info" type="string">
4821                        <description><![CDATA[Additional info or comments]]></description>
4822                </element>
4823                <element name="lifespan" type="integer"/>
4824                <element name="liveModel" type="Model">
4825                        <description><![CDATA[A Model object that is a copy of the current (temporary) geometry of this creature]]></description>
4826                </element>
4827                <element name="localDrive" type="XYZ">
4828                        <description><![CDATA[Measured in local coordinates, that is, with respect to the current orientation of the creature.
4829See also: Creature.orient]]></description>
4830                </element>
4831                <element name="model" type="Model">
4832                        <description><![CDATA[Source Model for this creature]]></description>
4833                </element>
4834                <element name="name" type="string"/>
4835                <element name="nnenabled" type="integer" min="0" max="1"/>
4836                <element name="numjoints" type="integer"/>
4837                <element name="numneurons" type="integer"/>
4838                <element name="numparts" type="integer"/>
4839                <element name="orient" type="Orient">
4840                        <description><![CDATA[By convention, the orientation of the creature is equal to the orientation of its first Part]]></description>
4841                </element>
4842                <element name="othermask" type="integer" min="0" max="2147483647" default="0"/>
4843                <element name="perf" type="integer" min="0" max="2">
4844                        <description><![CDATA[Initial value of this property is taken from Population.enableperf]]></description>
4845                </element>
4846                <element name="pos_x" type="float">
4847                        <description><![CDATA[(pos_x,pos_y,pos_z) is the point of minimal coordinates ("bottom left corner") of the creature, including imaginary Part sizes (Part.s, usually 1.0). See also: Creature.moveAbs]]></description>
4848                </element>
4849                <element name="pos_y" type="float">
4850                        <description><![CDATA[See Creature.pos_x]]></description>
4851                </element>
4852                <element name="pos_z" type="float">
4853                        <description><![CDATA[See Creature.pos_x]]></description>
4854                </element>
4855                <element name="selfcol" type="integer" min="0" max="1">
4856                        <description><![CDATA[Enable/disable detection of self-collisions (within a creature body). They can only occur when using the ODE simulation engine. If enabled, the creature will have its sticks collide during lifespan.]]></description>
4857                </element>
4858                <element name="selfcolstate" type="integer" min="0" max="1">
4859                        <description><![CDATA[Current self-collision state]]></description>
4860                </element>
4861                <element name="selfmask" type="integer" min="0" max="2147483647" default="0"/>
4862                <element name="signals" type="CreatureSignals"/>
4863                <element name="size_x" type="float">
4864                        <description><![CDATA[(size_x,size_y,size_z) are dimensions of the axis-aligned bounding box of the creature, including the imaginary part sizes (Part.s, usually 1.0). A creature consisting of a single default Part has the size of (2.0,2.0,2.0) - twice the Part.s value (like a sphere diameter is twice its radius).
4865See also: Creature.moveAbs]]></description>
4866                </element>
4867                <element name="size_y" type="float">
4868                        <description><![CDATA[See Creature.size_x]]></description>
4869                </element>
4870                <element name="size_z" type="float">
4871                        <description><![CDATA[See Creature.size_x]]></description>
4872                </element>
4873                <element name="uid" type="string"/>
4874                <element name="user1" type="untyped"/>
4875                <element name="user2" type="untyped"/>
4876                <element name="user3" type="untyped"/>
4877                <element name="velocity" type="float"/>
4878                <element name="vertpos" type="float"/>
4879                <element name="vertvel" type="float"/>
4880                <element name="currentGeometryAsF0" function="true" type="string"><arguments/></element>
4881                <element name="getJoint" function="true" type="Joint">
4882                        <arguments>
4883                                <argument name="index" type="integer"/>
4884                        </arguments>
4885                </element>
4886                <element name="getMechJoint" function="true" type="MechJoint">
4887                        <arguments>
4888                                <argument name="index" type="integer"/>
4889                        </arguments>
4890                </element>
4891                <element name="getMechPart" function="true" type="MechPart">
4892                        <arguments>
4893                                <argument name="index" type="integer"/>
4894                        </arguments>
4895                </element>
4896                <element name="getNeuro" function="true" type="Neuro">
4897                        <arguments>
4898                                <argument name="index" type="integer"/>
4899                        </arguments>
4900                </element>
4901                <element name="getNeuroDef" function="true" type="NeuroDef">
4902                        <arguments>
4903                                <argument name="index" type="integer"/>
4904                        </arguments>
4905                </element>
4906                <element name="getPart" function="true" type="Part">
4907                        <arguments>
4908                                <argument name="index" type="integer"/>
4909                        </arguments>
4910                </element>
4911                <element name="localToWorld" function="true" type="XYZ">
4912                        <description><![CDATA[Local coordinates are measured with respect to the position and orientation of the first Part]]></description>
4913                        <arguments>
4914                                <argument name="x" type="float"/>
4915                                <argument name="y" type="float"/>
4916                                <argument name="z" type="float"/>
4917                        </arguments>
4918                </element>
4919                <element name="move" function="true" type="void">
4920                        <description><![CDATA[Shift the creature by a given vector.]]></description>
4921                        <arguments>
4922                                <argument name="x" type="float"/>
4923                                <argument name="y" type="float"/>
4924                                <argument name="z" type="float"/>
4925                        </arguments>
4926                </element>
4927                <element name="moveAbs" function="true" type="void">
4928                        <description><![CDATA[Moves the creature so that its origin (pos_x,pos_y,pos_z) is placed at the given location. The origin is the point of minimal coordinates ("bottom left corner"), including imaginary part sizes (Part.s, usually 1.0).
4929Assuming a simple single-stick creature "X" having parts at (0,0,0) and (1,0,0),
4930
4931origin (pos_x,pos_y,pos_z) = (-1,-1,-1)
4932size (size_x,size_y,size_z) = (3,2,2)
4933
4934The following example places the bottom of a creature at a given location (x,y,z):
4935Creature.moveAbs(x-(Creature.size_x/2),y-(Creature.size_y/2),z-1.0)
4936(assuming that the part size is 1.0)]]></description>
4937                        <arguments>
4938                                <argument name="x" type="float"/>
4939                                <argument name="y" type="float"/>
4940                                <argument name="z" type="float"/>
4941                        </arguments>
4942                </element>
4943                <element name="moveLocal" function="true" type="void">
4944                        <description><![CDATA[Local coordinates are measured with respect to the position and orientation of the first Part]]></description>
4945                        <arguments>
4946                                <argument name="x" type="float"/>
4947                                <argument name="y" type="float"/>
4948                                <argument name="z" type="float"/>
4949                        </arguments>
4950                </element>
4951                <element name="rotate" function="true" type="void">
4952                        <description><![CDATA[Rotate the creature around X, Y and Z axes. Should only be used immediately after creating a new creature (before the first simulation step is performed for this creature), otherwise further simulation can be disturbed.]]></description>
4953                        <arguments>
4954                                <argument name="x" type="float"/>
4955                                <argument name="y" type="float"/>
4956                                <argument name="z" type="float"/>
4957                        </arguments>
4958                </element>
4959                <element name="rotateLocal" function="true" type="void">
4960                        <description><![CDATA[Rotate the creature around (local) X, Y and Z axes. Should only be used immediately after creating a new creature (before the first simulation step is performed for this creature), otherwise further simulation can be disturbed.]]></description>
4961                        <arguments>
4962                                <argument name="x" type="float"/>
4963                                <argument name="y" type="float"/>
4964                                <argument name="z" type="float"/>
4965                        </arguments>
4966                </element>
4967                <element name="worldToLocal" function="true" type="XYZ">
4968                        <description><![CDATA[Local coordinates are measured with respect to the position and orientation of the first Part]]></description>
4969                        <arguments>
4970                                <argument name="x" type="float"/>
4971                                <argument name="y" type="float"/>
4972                                <argument name="z" type="float"/>
4973                        </arguments>
4974                </element>
4975        </type>
4976        <type name="Element" context="Visual style definition">
4977<description><![CDATA[Information about current visual element: Part, Joint or Neuro. To be used in _build() or _update() functions.
4978
4979This is a link between a creature's element (part/joint/neuron) and the geometry object (Element.node).
4980Calling Element.useXXX() functions connects the static object references (Creature, Model, Part, Joint, Neuro, MechPart, MechJoint) to the proper creature elements. All these objects are invalid before doing that! E.g. you have to call "Element.useCreature()" before referring to "Creature.energy" in your _build() and _update() functions.]]></description>
4981                <element name="node" type="integer"/>
4982                <element name="useCreature" function="true"/>
4983                <element name="useJoint" function="true"/>
4984                <element name="useJointPart1" function="true"/>
4985                <element name="useJointPart2" function="true"/>
4986                <element name="useMechJoint" function="true"/>
4987                <element name="useMechJointPart1" function="true"/>
4988                <element name="useMechJointPart2" function="true"/>
4989                <element name="useMechPart" function="true"/>
4990                <element name="useModel" function="true"/>
4991                <element name="useNeuro" function="true"/>
4992                <element name="useNeuroJoint" function="true"/>
4993                <element name="useNeuroPart" function="true"/>
4994                <element name="usePart" function="true"/>
4995        </type>
4996        <type name="GeomBuilder" context="Visual style definition">
4997<description><![CDATA[Scene graph access (build and manipulate the 3d object tree)]]></description>
4998                <element name="code" type="string"/>
4999                <element name="currentNode" type="integer"/>
5000                <element name="defaultStyle" type="string"/>
5001                <element name="matrix00" type="float"/>
5002                <element name="matrix01" type="float"/>
5003                <element name="matrix02" type="float"/>
5004                <element name="matrix03" type="float"/>
5005                <element name="matrix10" type="float"/>
5006                <element name="matrix11" type="float"/>
5007                <element name="matrix12" type="float"/>
5008                <element name="matrix13" type="float"/>
5009                <element name="matrix20" type="float"/>
5010                <element name="matrix21" type="float"/>
5011                <element name="matrix22" type="float"/>
5012                <element name="matrix23" type="float"/>
5013                <element name="matrix30" type="float"/>
5014                <element name="matrix31" type="float"/>
5015                <element name="matrix32" type="float"/>
5016                <element name="matrix33" type="float"/>
5017                <element name="rootNode" type="integer"/>
5018                <element name="updatingNode" type="integer"/>
5019                <element name="add" function="true" type="void">
5020                        <description><![CDATA[add a child node to the current node]]></description>
5021                        <arguments>
5022                                <argument name="node" type="integer"/>
5023                        </arguments>
5024                </element>
5025                <element name="addBranch" function="true">
5026                        <description><![CDATA[create the branch node as a child of the current node and make it the new current node]]></description>
5027                </element>
5028                <element name="addTransform" function="true">
5029                        <description><![CDATA[create the transform node as a child of the current node and make it the new current node.]]></description>
5030                </element>
5031                <element name="dump" function="true" type="void">
5032                        <arguments>
5033                                <argument name="node" type="integer"/>
5034                                <argument name="level" type="integer"/>
5035                        </arguments>
5036                </element>
5037                <element name="getBranch" function="true" type="integer">
5038                        <arguments>
5039                                <argument name="branch node" type="integer"/>
5040                                <argument name="branch index" type="integer"/>
5041                        </arguments>
5042                </element>
5043                <element name="matrixMove" function="true" type="void">
5044                        <arguments>
5045                                <argument name="x" type="float"/>
5046                                <argument name="y" type="float"/>
5047                                <argument name="z" type="float"/>
5048                        </arguments>
5049                </element>
5050                <element name="matrixMove1" function="true" type="void">
5051                        <description><![CDATA[MechPart.pos can be used here]]></description>
5052                        <arguments>
5053                                <argument name="xyz" type="integer"/>
5054                        </arguments>
5055                </element>
5056                <element name="matrixOrient" function="true" type="void">
5057                        <arguments>
5058                                <argument name="x" type="float"/>
5059                                <argument name="y" type="float"/>
5060                                <argument name="z" type="float"/>
5061                        </arguments>
5062                </element>
5063                <element name="matrixOrient1" function="true" type="void">
5064                        <description><![CDATA[MechPart.orient can be used here]]></description>
5065                        <arguments>
5066                                <argument name="xyz" type="integer"/>
5067                        </arguments>
5068                </element>
5069                <element name="matrixReset" function="true"/>
5070                <element name="matrixRotate" function="true" type="void">
5071                        <arguments>
5072                                <argument name="x" type="float"/>
5073                                <argument name="y" type="float"/>
5074                                <argument name="z" type="float"/>
5075                        </arguments>
5076                </element>
5077                <element name="matrixRotate1" function="true" type="void">
5078                        <arguments>
5079                                <argument name="xyz" type="integer"/>
5080                        </arguments>
5081                </element>
5082                <element name="matrixScale" function="true" type="void">
5083                        <arguments>
5084                                <argument name="x" type="float"/>
5085                                <argument name="y" type="float"/>
5086                                <argument name="z" type="float"/>
5087                        </arguments>
5088                </element>
5089                <element name="setMatrix" function="true" type="void">
5090                        <description><![CDATA[copy current matrix into specified node]]></description>
5091                        <arguments>
5092                                <argument name="transform node" type="integer"/>
5093                        </arguments>
5094                </element>
5095        </type>
5096        <type name="GL" context="Visual style definition">
5097<description><![CDATA[OpenGL constants used in GeomBuilder and Material functions.]]></description>
5098                <element name="ALPHA_TEST" type="integer"/>
5099                <element name="AMBIENT" type="integer"/>
5100                <element name="AMBIENT_AND_DIFFUSE" type="integer"/>
5101                <element name="BLEND" type="integer"/>
5102                <element name="COLOR_MATERIAL" type="integer"/>
5103                <element name="CULL_FACE" type="integer"/>
5104                <element name="DIFFUSE" type="integer"/>
5105                <element name="EMISSION" type="integer"/>
5106                <element name="LIGHTING" type="integer"/>
5107                <element name="LINE_LOOP" type="integer"/>
5108                <element name="LINE_STRIP" type="integer"/>
5109                <element name="LINES" type="integer"/>
5110                <element name="POINTS" type="integer"/>
5111                <element name="QUAD_STRIP" type="integer"/>
5112                <element name="QUADS" type="integer"/>
5113                <element name="SPECULAR" type="integer"/>
5114                <element name="TEXTURE_2D" type="integer"/>
5115                <element name="TRIANGLE_FAN" type="integer"/>
5116                <element name="TRIANGLE_STRIP" type="integer"/>
5117                <element name="TRIANGLES" type="integer"/>
5118        </type>
5119        <type name="j" context="Visual style definition">
5120                <element name="dx" type="float" min="-2" max="2" default="0"/>
5121                <element name="dy" type="float" min="-2" max="2" default="0"/>
5122                <element name="dz" type="float" min="-2" max="2" default="0"/>
5123                <element name="i" type="string"/>
5124                <element name="p1" type="integer" min="-1" max="999999" default="-1"/>
5125                <element name="p2" type="integer" min="-1" max="999999" default="-1"/>
5126                <element name="rotstif" type="float" min="0" max="1" default="1"/>
5127                <element name="rx" type="float"/>
5128                <element name="ry" type="float"/>
5129                <element name="rz" type="float"/>
5130                <element name="stam" type="float" min="0" max="1" default="0.25"/>
5131                <element name="stif" type="float" min="0" max="1" default="1"/>
5132                <element name="Vstyle" type="string"/>
5133        </type>
5134        <type name="Loader" context="Visual style definition">
5135<description><![CDATA[Loads 3d objects files.
5136Visual styles placed in subdirectories (like "matrix") automatically access the parent directory if the file is not found in their subdirectory.]]></description>
5137                <element name="loaded" type="integer"/>
5138                <element name="load" function="true"/>
5139        </type>
5140        <type name="m" context="Visual style definition">
5141                <element name="se" type="float"/>
5142                <element name="Vstyle" type="string"/>
5143        </type>
5144        <type name="Material" context="Visual style definition">
5145<description><![CDATA[Manipulate 3d objects surface properties (Material objects can be associated with geometry nodes).]]></description>
5146                <element name="ambient" type="integer"/>
5147                <element name="colormat" type="integer"/>
5148                <element name="diffuse" type="integer"/>
5149                <element name="emission" type="integer"/>
5150                <element name="object" type="Object"/>
5151                <element name="shininess" type="float"/>
5152                <element name="specular" type="integer"/>
5153                <element name="texture" type="string"/>
5154                <element name="translucent" type="integer"/>
5155                <element name="care" function="true"/>
5156                <element name="disable" function="true"/>
5157                <element name="dontcare" function="true"/>
5158                <element name="enable" function="true"/>
5159                <element name="new" function="true"/>
5160                <element name="setFlat" function="true"/>
5161                <element name="setSmooth" function="true"/>
5162        </type>
5163        <type name="MechJoint" context="Visual style definition">
5164<description><![CDATA[Current joint properties during the simulation]]></description>
5165                <element name="absorient" type="integer"/>
5166                <element name="calcorient" type="integer"/>
5167                <element name="dx" type="float"/>
5168                <element name="dy" type="float"/>
5169                <element name="dz" type="float"/>
5170                <element name="length" type="float"/>
5171                <element name="orient" type="integer"/>
5172                <element name="rotstif" type="float"/>
5173                <element name="rotstress" type="float"/>
5174                <element name="rx" type="float"/>
5175                <element name="ry" type="float"/>
5176                <element name="rz" type="float"/>
5177                <element name="stif" type="float"/>
5178                <element name="stress" type="float"/>
5179        </type>
5180        <type name="MechPart" context="Visual style definition">
5181<description><![CDATA[Current part properties during the simulation]]></description>
5182                <element name="fr" type="float"/>
5183                <element name="m" type="float"/>
5184                <element name="orient" type="integer"/>
5185                <element name="pos" type="integer"/>
5186                <element name="s" type="float"/>
5187                <element name="vol" type="float"/>
5188                <element name="x" type="float"/>
5189                <element name="y" type="float"/>
5190                <element name="z" type="float"/>
5191        </type>
5192        <type name="n" context="Visual style definition">
5193                <element name="class" type="string"/>
5194                <element name="d" type="string"/>
5195                <element name="getInputCount" type="integer"/>
5196                <element name="i" type="string"/>
5197                <element name="j" type="integer" min="-1" max="999999" default="-1"/>
5198                <element name="p" type="integer" min="-1" max="999999" default="-1"/>
5199                <element name="state" type="float"/>
5200                <element name="Vstyle" type="string"/>
5201                <element name="getInputNeuroDef" function="true" type="NeuroDef">
5202                        <arguments>
5203                                <argument type="integer"/>
5204                        </arguments>
5205                </element>
5206                <element name="getInputNeuroIndex" function="true" type="integer">
5207                        <arguments>
5208                                <argument type="integer"/>
5209                        </arguments>
5210                </element>
5211                <element name="getInputWeight" function="true" type="float">
5212                        <arguments>
5213                                <argument type="integer"/>
5214                        </arguments>
5215                </element>
5216        </type>
5217        <type name="p" context="Visual style definition">
5218                <element name="as" type="float" min="0" max="1" default="0.25"/>
5219                <element name="dn" type="float" min="0.2" max="5" default="1"/>
5220                <element name="fr" type="float" min="0" max="4" default="0.4"/>
5221                <element name="i" type="string"/>
5222                <element name="ing" type="float" min="0" max="1" default="0.25"/>
5223                <element name="m" type="float" min="0.1" max="999" default="1"/>
5224                <element name="rx" type="float"/>
5225                <element name="ry" type="float"/>
5226                <element name="rz" type="float"/>
5227                <element name="s" type="float" min="0.1" max="10" default="1"/>
5228                <element name="Vstyle" type="string"/>
5229                <element name="x" type="float"/>
5230                <element name="y" type="float"/>
5231                <element name="z" type="float"/>
5232        </type>
5233        <type name="Scene" context="Visual style definition">
5234<description><![CDATA[Additional properties to be used in the current view, currently only the background settings]]></description>
5235                <element name="backcolor" type="integer"/>
5236                <element name="worldtexture" type="string"/>
5237        </type>
5238        <type name="VertexBuilder" context="Visual style definition">
5239                <element name="material" type="Object"/>
5240                <element name="node" type="integer">
5241                        <description><![CDATA[This field returns the geometry node for use in GeomBuilder. You have to set all relevant geometry properties before using this field. The usual sequence:
52421. newXXX - selects the geometry type (see your OpenGL manual for explanation)
52432. Set all properties (add vertices, normals, colors, texture coordinates, material). All unspecified properties are assumed to have default values.
52443. Use the resulting node ( GeomBuilder.add(VertexBuilder.node) )]]></description>
5245                </element>
5246                <element name="twosided" type="integer" min="0" max="1"/>
5247                <element name="addCalculatedNormal" function="true">
5248                        <description><![CDATA[calculate the normal vector from 3 coordinates. integer arguments are the vertices' indices. 0,1,2... = first, second, third vertex, -1,-2,-3,... = last, last-1, last-2 vertex]]></description>
5249                </element>
5250                <element name="addColor" function="true"/>
5251                <element name="addNormal" function="true"/>
5252                <element name="addNormal_1" function="true">
5253                        <description><![CDATA[use addNormal instead of this function]]></description>
5254                </element>
5255                <element name="addTexCoord" function="true"/>
5256                <element name="addVertex" function="true"/>
5257                <element name="genTexCoords" function="true"/>
5258                <element name="genTexCoordsXY" function="true"/>
5259                <element name="genTexCoordsXZ" function="true"/>
5260                <element name="genTexCoordsYZ" function="true"/>
5261                <element name="new" function="true" type="void">
5262                        <arguments>
5263                                <argument name="type" type="integer"/>
5264                        </arguments>
5265                </element>
5266                <element name="newLineLoop" function="true"/>
5267                <element name="newLines" function="true"/>
5268                <element name="newLineStrip" function="true"/>
5269                <element name="newPoints" function="true"/>
5270                <element name="newPolygon" function="true"/>
5271                <element name="newQuads" function="true"/>
5272                <element name="newQuadStrip" function="true"/>
5273                <element name="newTriangleFan" function="true"/>
5274                <element name="newTriangles" function="true"/>
5275                <element name="newTriangleStrip" function="true"/>
5276        </type>
5277        <type name="VisParams" context="Visual style definition">
5278                <element name="changedProperty" type="integer"/>
5279                <element name="changedPropertyId" type="string"/>
5280                <element name="modelpan" type="integer" min="0" max="3">
5281                        <description><![CDATA[]]></description>
5282                </element>
5283                <element name="shownames" type="integer" min="0" max="1">
5284                        <description><![CDATA[]]></description>
5285                </element>
5286                <element name="worldpan" type="integer" min="0" max="3">
5287                        <description><![CDATA[]]></description>
5288                </element>
5289                <element name="add" function="true"/>
5290                <element name="addGroup" function="true"/>
5291                <element name="clear" function="true"/>
5292                <element name="remove" function="true"/>
5293                <element name="removeGroup" function="true"/>
5294        </type>
5295        <type name="VisualModel" context="Visual style definition">
5296<description><![CDATA[Visual representation of the Creature object.]]></description>
5297                <element name="args" type="string">
5298                        <description><![CDATA[style parameters: Vstyle=name(args)]]></description>
5299                </element>
5300                <element name="color" type="integer">
5301                        <description><![CDATA[0xBBGGRR, 0x808080=normal, 0x000000=black, 0xffffff=extra bright]]></description>
5302                </element>
5303                <element name="jointshadow" type="float"/>
5304                <element name="partshadow" type="float"/>
5305                <element name="rootNode" type="integer"/>
5306                <element name="style" type="string">
5307                        <description><![CDATA[visual style applied to this object]]></description>
5308                </element>
5309                <element name="getArg" function="true" type="string">
5310                        <description><![CDATA[retrieve single style argument, as in:
5311Vstyle=name(a=1,b=3)
5312VisualModel.getArg("a") returns 1]]></description>
5313                        <arguments>
5314                                <argument name="name" type="string"/>
5315                        </arguments>
5316                </element>
5317        </type>
5318        <type name="VisualStyle" context="Visual style definition">
5319                <element name="changedProperty" type="integer"/>
5320                <element name="changedPropertyId" type="string"/>
5321                <element name="code" type="string"/>
5322                <element name="info" type="string"/>
5323                <element name="modelpan" type="integer" min="0" max="3">
5324                        <description><![CDATA[]]></description>
5325                </element>
5326                <element name="name" type="string"/>
5327                <element name="neurons" type="integer" min="0" max="1"/>
5328                <element name="shownames" type="integer" min="0" max="1">
5329                        <description><![CDATA[]]></description>
5330                </element>
5331                <element name="smooth" type="integer" min="0" max="1"/>
5332                <element name="style" type="string"/>
5333                <element name="tex" type="integer" min="0" max="2"/>
5334                <element name="worldpan" type="integer" min="0" max="3">
5335                        <description><![CDATA[]]></description>
5336                </element>
5337                <element name="add" function="true"/>
5338                <element name="addGroup" function="true"/>
5339                <element name="clear" function="true"/>
5340                <element name="rebuild" function="true"/>
5341                <element name="remove" function="true"/>
5342                <element name="removeGroup" function="true"/>
5343                <element name="streload" function="true"/>
5344        </type>
5345        <type name="World" context="Visual style definition">
5346<description><![CDATA[Environment properties.]]></description>
5347                <element name="nnspeed" type="float" min="0" max="1000" default="1">
5348                        <description><![CDATA[Number of neural network simulation steps in each physics simulation step]]></description>
5349                </element>
5350                <element name="signals" type="WorldSignals"/>
5351                <element name="simtype" type="integer" min="0" max="1" default="0">
5352                        <description><![CDATA[MechaStick is a fast and simple primary Framsticks simulation engine.
5353ODE is Open Dynamics Engine by Russel Smith et al.
5354
5355NOTE: switching between simulation engines causes removal of all objects in the world (e.g. creatures).]]></description>
5356                </element>
5357                <element name="wrldbnd" type="integer" min="0" max="2" default="1"/>
5358                <element name="wrldg" type="float" min="0" max="10" default="1">
5359                        <description><![CDATA[You can adjust gravity for your experiments.
5360The "official" setting used to evaluate and compare creatures is 1.]]></description>
5361                </element>
5362                <element name="wrldmap" type="string">
5363                        <description><![CDATA[Description of the world (Type: Blocks or Heighfield). Enter
5364   r <sizex> <sizey> [seed]
5365to generate a random landscape, or
5366   m <sizex> <sizey> digits
5367   M <sizex> <sizey> numbers
5368to provide height values.
5369
5370See also the WorldMap object.]]></description>
5371                </element>
5372                <element name="wrldsiz" type="float" min="10" max="1000" default="20">
5373                        <description><![CDATA[Side length of the world]]></description>
5374                </element>
5375                <element name="wrldtyp" type="integer" min="0" max="2" default="0"/>
5376                <element name="wrldwat" type="float" min="-20" max="30" default="-1"/>
5377                <element name="wrldchg" function="true" type="void"><arguments/></element>
5378        </type>
5379        <type name="WorldMap" context="Visual style definition">
5380<description><![CDATA[Environment details for "Blocks" and "Heightfield" world type. The most important concept is a "Map", which is the array of Map elements. Internally, Maps have more elements than could be deduced from the user-supplied World.wrldsiz, as additional rows of element are added to provide smooth transitions to the flat surroundings.
5381
5382Blocks: x/ysize=World.wrldsiz+4 rows of blocks (from which only 2+World.wrldsiz rows are placed within the world boundaries)
5383
5384Smooth: x/ysize=World.wrldsiz+2 rows of vertices (creating World.wrldsiz+1 rows of triangles, everything within the world boundaries)
5385]]></description>
5386                <element name="xsize" type="integer"/>
5387                <element name="ysize" type="integer"/>
5388                <element name="getHeight" function="true" type="float">
5389                        <description><![CDATA[Height at any 2d coordinate]]></description>
5390                        <arguments>
5391                                <argument name="x" type="float"/>
5392                                <argument name="y" type="float"/>
5393                        </arguments>
5394                </element>
5395                <element name="getMap" function="true" type="Object">
5396                        <description><![CDATA[retrieve map cell object]]></description>
5397                        <arguments>
5398                                <argument name="x" type="integer"/>
5399                                <argument name="y" type="integer"/>
5400                        </arguments>
5401                </element>
5402                <element name="intersect" function="true" type="Vector">
5403                        <description><![CDATA[Calculate the intersection point between the world surface and the ray projected from "3d point" towards the given direction. 3D points are actually 3-elements Vector objects. The resulting vector contains the additional fourth element - the intersection point distance. The function returns null if there is no intersection.
5404
5405See "standard_events.inc" file, which uses "intersect" for calculating the world coordinates corresponding to the user-clicked screen location.
5406Bugs: This function does not currently handle the heightfield environment correctly (works as if it was flat)]]></description>
5407                        <arguments>
5408                                <argument name="3d point" type="Vector"/>
5409                                <argument name="3d direction" type="Vector"/>
5410                                <argument name="range" type="float"/>
5411                        </arguments>
5412                </element>
5413        </type>
5414        <type name="Signal" context="Signal label formula">
5415                <element name="channel" type="string">
5416                        <description><![CDATA[Channel name, readonly.]]></description>
5417                </element>
5418                <element name="flavor" type="float">
5419                        <description><![CDATA[Signal flavor is can be used to differentiate between signals in a single channel. ]]></description>
5420                </element>
5421                <element name="pos" type="XYZ">
5422                        <description><![CDATA[Signal position, readonly.]]></description>
5423                </element>
5424                <element name="power" type="float">
5425                        <description><![CDATA[Signal power affects the aggregated signal value returned from receive() and receiveFilter().]]></description>
5426                </element>
5427                <element name="value" type="untyped">
5428                        <description><![CDATA[Signal value can be any type. On the receiver side it is only available by accessing the individual Signal objects, i.e. after calling receiveSet() or receiveSingle(). The aggregating function receive() and receiveFilter() ignore this attribute.]]></description>
5429                </element>
5430        </type>
5431        <type name="ClassBrowser" context="Command line interface">
5432<description><![CDATA[Object reference, can be used to provide online hints.]]></description>
5433                <element name="resultCount" type="integer"/>
5434                <element name="getLabel" function="true" type="string">
5435                        <description><![CDATA[Short texual label of the search result.]]></description>
5436                        <arguments>
5437                                <argument name="item" type="integer"/>
5438                        </arguments>
5439                </element>
5440                <element name="getText" function="true" type="string">
5441                        <description><![CDATA[Complete result text.]]></description>
5442                        <arguments>
5443                                <argument name="item" type="integer"/>
5444                        </arguments>
5445                </element>
5446                <element name="getType" function="true" type="integer">
5447                        <description><![CDATA[0 = Unknown
54481 = Context
54492 = Class
54503 = Member
54514 = Integer field
54525 = Float field
54536 = String field
54547 = Object field
54558 = Function]]></description>
5456                        <arguments>
5457                                <argument name="item" type="integer"/>
5458                        </arguments>
5459                </element>
5460                <element name="getTypeName" function="true" type="string">
5461                        <arguments>
5462                                <argument name="item" type="integer"/>
5463                        </arguments>
5464                </element>
5465                <element name="search" function="true" type="integer">
5466                        <description><![CDATA[Searches the class reference and returns the number of  hits (results). getXXX(item) function can be used to retrieve the results.]]></description>
5467                        <arguments>
5468                                <argument name="Text" type="string"/>
5469                        </arguments>
5470                </element>
5471        </type>
5472        <type name="CLI" context="Command line interface">
5473<description><![CDATA[Commandline support functions.]]></description>
5474                <element name="cmdhandler" type="string"/>
5475                <element name="msgtype" type="integer" min="0" max="1"/>
5476                <element name="script" type="string"/>
5477                <element name="stdin" type="Object"/>
5478                <element name="stdout" type="Object"/>
5479                <element name="addMacro" function="true" type="void">
5480                        <arguments>
5481                                <argument name="name" type="string"/>
5482                                <argument name="numargs" type="integer"/>
5483                                <argument name="definition" type="string"/>
5484                                <argument name="helptext" type="string"/>
5485                        </arguments>
5486                </element>
5487                <element name="execute" function="true" type="void">
5488                        <arguments>
5489                                <argument name="command" type="string"/>
5490                        </arguments>
5491                </element>
5492                <element name="listMacros" function="true" type="void"><arguments/></element>
5493                <element name="print" function="true" type="void">
5494                        <arguments>
5495                                <argument name="text" type="string"/>
5496                        </arguments>
5497                </element>
5498                <element name="println" function="true" type="void">
5499                        <arguments>
5500                                <argument name="text" type="string"/>
5501                        </arguments>
5502                </element>
5503                <element name="quit" function="true"/>
5504                <element name="removeMacro" function="true" type="void">
5505                        <description><![CDATA[(numargs==-2) means remove all macros matching the name, otherwise only one definition is removed]]></description>
5506                        <arguments>
5507                                <argument name="name" type="string"/>
5508                                <argument name="numargs" type="integer"/>
5509                        </arguments>
5510                </element>
5511        </type>
5512        <type name="CreatureCharts" context="Command line interface">
5513<description><![CDATA[Manages charts for monitoring creatures performance.
5514This class has no corresponding static object. If you want to use it, you have to create an object or get a reference to the existing object.]]></description>
5515                <element name="creature" type="untyped"/>
5516                <element name="selected" type="integer"/>
5517                <element name="add" function="true">
5518                        <description><![CDATA[return the new Window object with chart as its client
5519arguments: property to be tracked]]></description>
5520                </element>
5521                <element name="addSelected" function="true">
5522                        <description><![CDATA[Add the chart for currenly selected property]]></description>
5523                </element>
5524                <element name="createChart" function="true">
5525                        <description><![CDATA[return the new chart object (can be client for Window)
5526arguments: property to be tracked]]></description>
5527                </element>
5528                <element name="removeAll" function="true"/>
5529                <element name="resetAll" function="true">
5530                        <description><![CDATA[Removes all data from the chart windows.]]></description>
5531                </element>
5532        </type>
5533        <type name="CreatureSelection" context="Command line interface">
5534                <element name="count" type="integer"/>
5535                <element name="add" function="true"/>
5536                <element name="clear" function="true"/>
5537                <element name="get" function="true"/>
5538                <element name="remove" function="true"/>
5539        </type>
5540        <type name="DynaChart" context="Command line interface">
5541<description><![CDATA[Line chart (visual object). Can be used as the client object in the Window.]]></description>
5542                <element name="xscale" type="integer" min="1" max="20"/>
5543                <element name="add" function="true">
5544                        <description><![CDATA[add new value]]></description>
5545                </element>
5546                <element name="clear" function="true" type="void"><arguments/></element>
5547                <element name="new" function="true" type="DynaChart"><arguments/></element>
5548        </type>
5549        <type name="DynaChart2D" context="Command line interface">
5550<description><![CDATA[2D Line chart (visual object). Can be used as the client object in the Window.]]></description>
5551                <element name="memory" type="integer" min="1" max="1000" default="100">
5552                        <description><![CDATA[maximum number of (x,y) pairs drawn in the graph.]]></description>
5553                </element>
5554                <element name="add" function="true" type="void">
5555                        <description><![CDATA[add (x,y) values for the next graph point]]></description>
5556                        <arguments>
5557                                <argument name="x coordinate" type="float"/>
5558                                <argument name="y coordinate" type="float"/>
5559                        </arguments>
5560                </element>
5561                <element name="clear" function="true" type="void"><arguments/></element>
5562                <element name="new" function="true" type="DynaChart2D"><arguments/></element>
5563        </type>
5564        <type name="GLDisplay" context="Command line interface">
5565<description><![CDATA[OpenGL display for the Framsticks Theater application.]]></description>
5566                <element name="active" type="integer" min="0" max="1"/>
5567                <element name="banner" type="string"/>
5568                <element name="desiredsimspeed" type="float" min="0" max="999999" default="0">
5569                        <description><![CDATA[Desired simulation speed in steps/second. 0 = simulation is disabled.]]></description>
5570                </element>
5571                <element name="fps" type="float">
5572                        <description><![CDATA[Frames Per Second (measured)]]></description>
5573                </element>
5574                <element name="fpsvisible" type="integer" min="0" max="1"/>
5575                <element name="maxfps" type="integer" min="1" max="100" default="30"/>
5576                <element name="messagesVisible" type="integer" min="0" max="1"/>
5577                <element name="messagesWindow" type="Object">
5578                        <description><![CDATA[get window object (class Window)]]></description>
5579                </element>
5580                <element name="minfps" type="integer" min="1" max="100" default="5"/>
5581                <element name="simsteps" type="integer" min="0" max="999999" default="0">
5582                        <description><![CDATA[0 = simulation is disabled. In most cases you should use desiredsimspeed as it ensures automatic throttle control.]]></description>
5583                </element>
5584                <element name="size_x" type="integer"/>
5585                <element name="size_y" type="integer"/>
5586                <element name="userspeed" type="float" min="0" max="100" default="1">
5587                        <description><![CDATA[User interface sets this property to adjust simulation speed.]]></description>
5588                </element>
5589                <element name="clearMessages" function="true"/>
5590                <element name="createWindow" function="true" type="Window">
5591                        <description><![CDATA[create and return the new window object.]]></description>
5592                        <arguments>
5593                                <argument name="style" type="integer"/>
5594                                <argument name="title" type="string"/>
5595                                <argument name="client" type="Object"/>
5596                        </arguments>
5597                </element>
5598                <element name="deleteWindow" function="true" type="void">
5599                        <arguments>
5600                                <argument type="Window"/>
5601                        </arguments>
5602                </element>
5603                <element name="draw" function="true"/>
5604                <element name="newCreatureCharts" function="true"/>
5605                <element name="newSimStatsCharts" function="true"/>
5606                <element name="quit" function="true"/>
5607                <element name="resume" function="true"/>
5608                <element name="stop" function="true"/>
5609        </type>
5610        <type name="NeuroDiagram" context="Command line interface">
5611<description><![CDATA[Can be used as the client object in the Window.]]></description>
5612                <element name="hide" function="true" type="void"><arguments/></element>
5613                <element name="new" function="true"/>
5614                <element name="showCreature" function="true" type="void">
5615                        <arguments>
5616                                <argument type="Creature"/>
5617                        </arguments>
5618                </element>
5619                <element name="showModel" function="true" type="void">
5620                        <arguments>
5621                                <argument type="Model"/>
5622                        </arguments>
5623                </element>
5624        </type>
5625        <type name="RowFormat" context="Command line interface">
5626<description><![CDATA[Used for creating simple listings of objects (in command line applications). There is only one shared RowFormat object. In order to use RowFormat you should first configure it, by adding column definitions (prepare or addColumn), i.e. defining column names and widths. Then, the "format" method can be invoked on a number of objects (of the same class) returning the formatted rows of the table.
5627
5628Example:
5629RowFormat.clear();
5630RowFormat.prepare(Genotype.*,"name/20,strsiz/5,nnsiz/5,fit/6");
5631CLI.println(RowFormat.format(Genotype.*));]]></description>
5632                <element name="fieldsep" type="string">
5633                        <description><![CDATA[The character used for separating columns]]></description>
5634                </element>
5635                <element name="fillchar" type="string">
5636                        <description><![CDATA[The characted used for padding the columns contents]]></description>
5637                </element>
5638                <element name="header" type="string">
5639                        <description><![CDATA[Contains the field names with the same formatting applied (i.e. with fill and separators)]]></description>
5640                </element>
5641                <element name="addColumn" function="true" type="void">
5642                        <description><![CDATA[Low level call, adds a single column. "prepare" is better.]]></description>
5643                        <arguments>
5644                                <argument name="Field#" type="integer"/>
5645                                <argument name="Column width" type="integer"/>
5646                        </arguments>
5647                </element>
5648                <element name="clear" function="true" type="void">
5649                        <description><![CDATA[Remove all existing column definitions.]]></description>
5650<arguments/></element>
5651                <element name="format" function="true" type="string">
5652                        <description><![CDATA[Returns the formatted string taking data from the supplied object.]]></description>
5653                        <arguments>
5654                                <argument name="Object" type="Object"/>
5655                        </arguments>
5656                </element>
5657                <element name="prepare" function="true" type="void">
5658                        <description><![CDATA[Adds a number of columns, described as FIELD_NAME/WIDTH, columns are separated by "," (comma). Existing column definitions are not removed. Usually you will need to call "clear()" before "prepare".]]></description>
5659                        <arguments>
5660                                <argument name="Object" type="Object"/>
5661                                <argument name="Column Descriptions" type="string"/>
5662                        </arguments>
5663                </element>
5664        </type>
5665        <type name="ShowManager" context="Command line interface">
5666                <element name="changedProperty" type="integer"/>
5667                <element name="changedPropertyId" type="string"/>
5668                <element name="code" type="string"/>
5669                <element name="dispinfo" type="integer" min="0" max="2"/>
5670                <element name="expdef" type="string"/>
5671                <element name="info" type="string"/>
5672                <element name="mode" type="integer" min="0" max="2"/>
5673                <element name="name" type="string"/>
5674                <element name="regname" type="string"/>
5675                <element name="show" type="string"/>
5676                <element name="showlog" type="integer" min="0" max="1"/>
5677                <element name="switchmode" type="integer" min="0" max="2"/>
5678                <element name="switchshows" type="string">
5679                        <description><![CDATA[names of the shows participating in automatic switching (comma separated). Use * as a wildcard.]]></description>
5680                </element>
5681                <element name="switchtime" type="integer" min="0" max="9999">
5682                        <description><![CDATA[time between switching (seconds)]]></description>
5683                </element>
5684                <element name="userspeed" type="integer" min="0" max="5" default="3"/>
5685                <element name="about" function="true"/>
5686                <element name="add" function="true"/>
5687                <element name="addGroup" function="true"/>
5688                <element name="clear" function="true"/>
5689                <element name="dummy" function="true">
5690                        <description><![CDATA[This is the empty item in the Theater's menu]]></description>
5691                </element>
5692                <element name="reload" function="true"/>
5693                <element name="remove" function="true"/>
5694                <element name="removeGroup" function="true"/>
5695        </type>
5696        <type name="SimStatsCharts" context="Command line interface">
5697<description><![CDATA[Manages charts for monitoring simulator statistics.
5698This class has no corresponding static object. If you want to use it, you have to create an object or get a reference to the existing object.]]></description>
5699                <element name="selected" type="integer"/>
5700                <element name="add" function="true"/>
5701                <element name="createChart" function="true"/>
5702                <element name="removeAll" function="true"/>
5703                <element name="resetAll" function="true">
5704                        <description><![CDATA[Removes all data from the chart windows.]]></description>
5705                </element>
5706                <element name="sscAddSelected" function="true"/>
5707        </type>
5708        <type name="TrackingCam" context="Command line interface">
5709<description><![CDATA[Camera object with the automatic target tracking ability.]]></description>
5710                <element name="cam_change" type="integer" min="0" max="5" default="3"/>
5711                <element name="cam_chspeed" type="float" min="0.1" max="10" default="1"/>
5712                <element name="cam_dir" type="float" min="0" max="360" default="30"/>
5713                <element name="cam_distrac" type="integer" min="0" max="1" default="0">
5714                        <description><![CDATA[Suspend automatic tracking when the camera is moved manually]]></description>
5715                </element>
5716                <element name="cam_h" type="float" min="0" max="360" default="45">
5717                        <description><![CDATA[0=side view, 90=top view]]></description>
5718                </element>
5719                <element name="cam_restrac" type="integer" min="0" max="100" default="10">
5720                        <description><![CDATA[Restore automatic tracking after some period of time
5721(0 to never restore automatic tracking)]]></description>
5722                </element>
5723                <element name="cam_tracking" type="integer" min="0" max="3" default="1"/>
5724                <element name="cam_trspeed" type="float" min="0.1" max="10" default="5"/>
5725                <element name="cam_zoom" type="float" min="0.2" max="3" default="0.8"/>
5726                <element name="cam_restore" function="true" type="void">
5727                        <description><![CDATA[Update camera position and restore automatic tracking]]></description>
5728<arguments/></element>
5729                <element name="moveTarget" function="true" type="void">
5730                        <description><![CDATA[notify about the target location/size change]]></description>
5731                        <arguments>
5732                                <argument name="location x" type="float"/>
5733                                <argument name="location y" type="float"/>
5734                                <argument name="location z" type="float"/>
5735                                <argument name="target size" type="float"/>
5736                        </arguments>
5737                </element>
5738                <element name="setTarget" function="true" type="void">
5739                        <description><![CDATA[select a new target for the camera]]></description>
5740                        <arguments>
5741                                <argument name="location x" type="float"/>
5742                                <argument name="location y" type="float"/>
5743                                <argument name="location z" type="float"/>
5744                                <argument name="target size" type="float"/>
5745                        </arguments>
5746                </element>
5747                <element name="setViewDir" function="true" type="void">
5748                        <description><![CDATA[heading: 0..360, height: -90..+90]]></description>
5749                        <arguments>
5750                                <argument name="heading angle" type="float"/>
5751                                <argument name="height angle" type="float"/>
5752                        </arguments>
5753                </element>
5754        </type>
5755        <type name="VisualStyle" context="Command line interface">
5756                <element name="changedProperty" type="integer"/>
5757                <element name="changedPropertyId" type="string"/>
5758                <element name="code" type="string"/>
5759                <element name="info" type="string"/>
5760                <element name="modelpan" type="integer" min="0" max="3">
5761                        <description><![CDATA[]]></description>
5762                </element>
5763                <element name="name" type="string"/>
5764                <element name="neurons" type="integer" min="0" max="1"/>
5765                <element name="shownames" type="integer" min="0" max="1">
5766                        <description><![CDATA[]]></description>
5767                </element>
5768                <element name="smooth" type="integer" min="0" max="1"/>
5769                <element name="style" type="string"/>
5770                <element name="tex" type="integer" min="0" max="2"/>
5771                <element name="worldpan" type="integer" min="0" max="3">
5772                        <description><![CDATA[]]></description>
5773                </element>
5774                <element name="add" function="true"/>
5775                <element name="addGroup" function="true"/>
5776                <element name="clear" function="true"/>
5777                <element name="rebuild" function="true"/>
5778                <element name="remove" function="true"/>
5779                <element name="removeGroup" function="true"/>
5780                <element name="streload" function="true"/>
5781        </type>
5782        <type name="Window" context="Command line interface">
5783<description><![CDATA[Window object, used in the Framsticks Theater application.
5784This class has no corresponding static object. If you want to use it, you have to create an object or get a reference to the existing object.
5785 See also: GLDisplay]]></description>
5786                <element name="backcolor" type="integer">
5787                        <description><![CDATA[format: 0xAABBGGRR (alpha,blue,green,red)]]></description>
5788                </element>
5789                <element name="client" type="Object">
5790                        <description><![CDATA[what is displayed in the window]]></description>
5791                </element>
5792                <element name="pos_x" type="integer"/>
5793                <element name="pos_y" type="integer"/>
5794                <element name="size_x" type="integer"/>
5795                <element name="size_y" type="integer"/>
5796                <element name="style" type="integer">
5797                        <description><![CDATA[bitfield:
57981 - border
57992 - title
58004 - Opaque background
58018 - Close button
580216 - resizable]]></description>
5803                </element>
5804                <element name="title" type="string"/>
5805        </type>
5806</framscript>
Note: See TracBrowser for help on using the repository browser.