Index: java/FramclipsePlugin/src/main/resources/framscript.dtd
===================================================================
--- java/FramclipsePlugin/src/main/resources/framscript.dtd	(revision 107)
+++ java/FramclipsePlugin/src/main/resources/framscript.dtd	(revision 108)
@@ -22,4 +22,5 @@
 <!ATTLIST element max CDATA #IMPLIED>
 <!ATTLIST element function (false|true) "false">
+<!ATTLIST element deprecated (false|true) "false">
 <!ATTLIST element default CDATA #IMPLIED>
 
Index: java/FramclipsePlugin/src/main/resources/framscript.xml
===================================================================
--- java/FramclipsePlugin/src/main/resources/framscript.xml	(revision 107)
+++ java/FramclipsePlugin/src/main/resources/framscript.xml	(revision 108)
@@ -45,8 +45,9 @@
 		<element name="mode" type="integer" min="0" max="2"/>
 		<element name="name" type="string"/>
+		<element name="prev_show" type="string"/>
 		<element name="regname" type="string"/>
 		<element name="show" type="string"/>
 		<element name="showlog" type="integer" min="0" max="1"/>
-		<element name="switchmode" type="integer" min="0" max="2"/>
+		<element name="switchmode" type="integer" min="0" max="3"/>
 		<element name="switchshows" type="string">
 			<description><![CDATA[names of the shows participating in automatic switching (comma separated). Use * as a wildcard.]]></description>
@@ -79,4 +80,11 @@
 		<element name="name" type="string"/>
 	</type>
+	<type name="CheckpointEvent" context="Global context">
+<description><![CDATA[CheckpointEvent]]></description>
+		<element name="data" type="untyped"/>
+		<element name="index" type="integer"/>
+		<element name="slave" type="Simulator"/>
+		<element name="ticks" type="integer"/>
+	</type>
 	<type name="Collision" context="Global context">
 <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>
@@ -94,5 +102,8 @@
 	</type>
 	<type name="Creature" context="Global context">
-<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>
+<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".
+Before version 4.0rc4 the static Creature object was used in event handlers and in functions operating on the "selected" creature. This is now deprecated as all operations can be performed using the more convenient direct access (see GenePools). For event handlers, the creature object will be passed as argument, like this:
+function onDied(cr) {Simulator.print("Creature "+cr.name+" has died");}
+See also: Population.]]></description>
 		<element name="bodysim" type="integer" min="0" max="1" default="1">
 			<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.
@@ -127,8 +138,10 @@
 		<element name="genotype" type="string"/>
 		<element name="gnum" type="integer"/>
-		<element name="group" type="untyped"/>
+		<element name="group" type="untyped" deprecated="true">
+			<description><![CDATA[Deprecated. Use population instead.]]></description>
+		</element>
 		<element name="idleen" type="float"/>
 		<element name="index" type="integer">
-			<description><![CDATA[Index of this Creature in its Population.]]></description>
+			<description><![CDATA[Note that the index changes depending on the current creature position in the population. Use Creature.uid if you need a permanent identifier that persists through the entire object lifetime.]]></description>
 		</element>
 		<element name="info" type="string">
@@ -158,4 +171,5 @@
 			<description><![CDATA[Initial value of this property is taken from Population.enableperf]]></description>
 		</element>
+		<element name="population" type="untyped"/>
 		<element name="pos_x" type="float">
 			<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>
@@ -169,7 +183,4 @@
 		<element name="selfcol" type="integer" min="0" max="1">
 			<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>
-		</element>
-		<element name="selfcolstate" type="integer" min="0" max="1">
-			<description><![CDATA[Current self-collision state]]></description>
 		</element>
 		<element name="selfmask" type="integer" min="0" max="2147483647" default="0"/>
@@ -192,4 +203,11 @@
 		<element name="vertpos" type="float"/>
 		<element name="vertvel" type="float"/>
+		<element name="boundingBoxCollisions" function="true" type="integer">
+			<description><![CDATA[Checks approximate collisions for the selected creature.
+Returns 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>
+			<arguments>
+				<argument name="mask" type="integer"/>
+			</arguments>
+		</element>
 		<element name="currentGeometryAsF0" function="true" type="string"><arguments/></element>
 		<element name="getJoint" function="true" type="Joint">
@@ -279,4 +297,7 @@
 			</arguments>
 		</element>
+		<element name="selfcolstate" function="true" type="integer">
+			<description><![CDATA[Current self-collision state. In old versions this was a field, not a function.]]></description>
+<arguments/></element>
 		<element name="worldToLocal" function="true" type="XYZ">
 			<description><![CDATA[Local coordinates are measured with respect to the position and orientation of the first Part]]></description>
@@ -290,169 +311,24 @@
 	<type name="CreatureSettings" context="Global context">
 <description><![CDATA[Creature building parameters]]></description>
-		<element name="bnoise_struct" type="float" min="0" max="10" default="0">
+		<element name="bnoise_struct" type="float" min="0" max="10" default="0.0">
 			<description><![CDATA[When >0, body constructs of creatures (position of Parts) will be randomly disturbed when they are created.]]></description>
 		</element>
-		<element name="bnoise_vel" type="float" min="0" max="10" default="0">
+		<element name="bnoise_vel" type="float" min="0" max="10" default="0.0">
 			<description><![CDATA[Random velocities will be applied to all body Parts (in MechaStick) or rigid segments (in ODE) of newly created creatures.]]></description>
 		</element>
-		<element name="maxjoint" type="float" min="0" max="100" default="2"/>
-		<element name="minjoint" type="float" min="0" max="100" default="0"/>
+		<element name="maxjoint" type="float" min="0" max="100" default="2.0"/>
+		<element name="minjoint" type="float" min="0" max="100" default="0.0"/>
+		<element name="nnoise" type="float" min="0" max="1" default="0.0">
+			<description><![CDATA[Gaussian neural noise: a random value is added to each neural output in each simulation step. Set standard deviation here to add random noise, or 0 for deterministic simulation.]]></description>
+		</element>
 		<element name="randinit" type="float" min="0" max="10" default="0.01">
-			<description><![CDATA[Allowed range for initializing all neuron states with uniform distribution random numbers and zero mean. Set 0 for deterministic initialization.]]></description>
-		</element>
-		<element name="touchrange" type="float" min="0" max="100" default="1"/>
-	</type>
-	<type name="CreaturesGroup" context="Global context">
-<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>
-		<element name="bodysim" type="integer" min="0" max="1" default="1">
-			<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>
-		</element>
-		<element name="colmask" type="integer" min="0" max="65535" default="0">
-			<description><![CDATA[DEPRECATED. You should use selfmask and othermask (these masks are also much easier to understand than the old colmask field).]]></description>
-		</element>
-		<element name="death" type="integer" min="0" max="1" default="1">
-			<description><![CDATA[Do creatures die when no energy?]]></description>
-		</element>
-		<element name="em_dyn" type="float" min="0" max="1" default="0">
-			<description><![CDATA[Energy requirements for a muscle
-moving a stick]]></description>
-		</element>
-		<element name="em_stat" type="float" min="0" max="1" default="0">
-			<description><![CDATA[Energy requirements for a muscle
-resisting an external force]]></description>
-		</element>
-		<element name="en_assim" type="float" min="0" max="1" default="0">
-			<description><![CDATA[Maximal energy gain produced by a vertical specialized stick.
-Horizontal specialized sticks get half of this value.]]></description>
-		</element>
-		<element name="enableperf" type="integer" min="0" max="2" default="1">
-			<description><![CDATA[Stabilization means no significant movement during a specified period of time.]]></description>
-		</element>
-		<element name="energy" type="integer" min="0" max="1" default="1">
-			<description><![CDATA[If turned off, creature's energy will be constant.]]></description>
-		</element>
-		<element name="index" type="integer"/>
-		<element name="killnostable" type="integer" min="0" max="10000000" default="1000000">
-			<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>
-		</element>
-		<element name="name" type="string"/>
-		<element name="nnsim" type="integer" min="0" max="2" default="1">
-			<description><![CDATA[Stabilization means no significant movement during a specified period of time.]]></description>
-		</element>
-		<element name="othermask" type="integer" min="0" max="2147483647" default="0">
-			<description><![CDATA[See selfmask.]]></description>
-		</element>
-		<element name="perfperiod" type="integer" min="0" max="1000000" default="100">
-			<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>
-		</element>
-		<element name="selfcol" type="integer" min="0" max="1" default="0">
-			<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>
-		</element>
-		<element name="selfmask" type="integer" min="0" max="2147483647" default="0">
-			<description><![CDATA[Collisions between objects can be handled in two ways:
- - standard 'mechanical' collision (simple 'rebound' effect)
- - special script handler (On[GROUPNAME]Collision function)
-
-In the script handler function, use the Collision object to access the two colliding parts of two creatures.
-The first part in the Collision object (i.e. Collision.Creature1) always concerns the creature that belongs to [GROUPNAME].
-The handler is called once for each creature that collides with the creature from [GROUPNAME].
-
-Collision 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. 
-Examples:
-
-1.With one group, all possible combinations of the collision handlers are as follows:
-  - ignore collisions (e.g. selfmask=othermask=0)
-  - use standard handling (e.g. selfmask=othermask=1)
-  - use custom handling (e.g. selfmask=othermask=0x10000)
-  - use standard and custom handling (e.g. selfmask=othermask=0x10001)
-
-2.Two groups yield more interesting cases. Let us consider the 'standard.expdef' setting:
-  Creatures: selfmask=0x10001, othermask=0x20001
-  Food colmask = selfmask=0x20002, othermask=0x10002
-There are three possible scenarios:
-- creature and creature: collision value = 0x10001 & 0x20001 = 1 -> Standard handling will be used (1 is one of the lower 16 bits)
-- food and food: collision value = 0x20002 & 0x10002 = 2 -> As above.
-- creature and food: collision value = (0x10001 & 0x10002) or (0x20002 & 0x20001) = 0x10000 or 0x20000 -> Custom handling will be used (higher 16 bits).
-]]></description>
-		</element>
+			<description><![CDATA[Allowed range for initializing all neuron states with uniform distribution random numbers and zero mean. Set to 0 for deterministic initialization.]]></description>
+		</element>
+		<element name="touchrange" type="float" min="0" max="100" default="1.0"/>
+	</type>
+	<type name="CreatureSignals" context="Global context">
+<description><![CDATA[Signal sources associated with a creature. See also: Signal, WorldSignals, NeuroSignals.]]></description>
 		<element name="size" type="integer"/>
-		<element name="stabilperiod" type="integer" min="0" max="1000000" default="100">
-			<description><![CDATA["Performance sampling period" for the stabilization phase.]]></description>
-		</element>
-		<element name="stabledist" type="float" min="0" max="1" default="0.01">
-			<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>
-		</element>
-		<element name="createFromGeno" function="true" type="Creature">
-			<description><![CDATA[Uses the supplied Geno object]]></description>
-			<arguments>
-				<argument type="Geno"/>
-			</arguments>
-		</element>
-		<element name="createFromGenotype" function="true" type="Creature">
-			<description><![CDATA[Uses the selected Genotype object]]></description>
-<arguments/></element>
-		<element name="createFromString" function="true" type="Creature">
-			<description><![CDATA[Uses the supplied string argument]]></description>
-			<arguments>
-				<argument name="genotype" type="string"/>
-			</arguments>
-		</element>
-		<element name="delete" function="true" type="void">
-			<description><![CDATA[delete creature]]></description>
-			<arguments>
-				<argument name="creature index" type="integer"/>
-			</arguments>
-		</element>
-		<element name="findCreatureAt" function="true" type="Creature">
-			<arguments>
-				<argument name="point" type="Vector"/>
-				<argument name="vector" type="Vector"/>
-			</arguments>
-		</element>
-		<element name="findUID" function="true" type="integer">
-			<arguments>
-				<argument name="uid" type="string"/>
-			</arguments>
-		</element>
-		<element name="get" function="true" type="Creature">
-			<arguments>
-				<argument name="index" type="integer"/>
-			</arguments>
-		</element>
-		<element name="kill" function="true" type="void">
-			<description><![CDATA[kill creature]]></description>
-			<arguments>
-				<argument name="creature index" type="integer"/>
-			</arguments>
-		</element>
-		<element name="senseCreaturesProperty" function="true" type="float">
-			<description><![CDATA[arguments:
- - x,y,z (sensor position)
- - property (name, name[index] or Class:id). name[index] can be used for Vector objects inside the user fields, eg "user2[10]"
- - exclude (creature object)
-works like a smell sensor for a given property (for all creatures in this group except "exclude").
-The following function reproduces the "classic" framsticks "S" sensor:
-function smellReceptorValue(x,y,z,exclude)
-{
-var i,s=0; for(i=0;i<Populations.size;i++)
-	s+=Populations[0].senseCreaturesProperty(x,y,z,"energy",exclude);
-return s;
-}]]></description>
-			<arguments>
-				<argument name="x" type="float"/>
-				<argument name="y" type="float"/>
-				<argument name="z" type="float"/>
-				<argument name="propertyname" type="string"/>
-				<argument name="exclude" type="Creature"/>
-			</arguments>
-		</element>
-	</type>
-	<type name="CreatureSignals" context="Global context">
-<description><![CDATA[Signal sources associated with the creature. See also: Signal, WorldSignals, NeuroSignals]]></description>
-		<element name="size" type="integer">
-			<description><![CDATA[Number of signals in this set]]></description>
-		</element>
 		<element name="add" function="true" type="Signal">
-			<description><![CDATA[Create a new signal]]></description>
 			<arguments>
 				<argument name="channel" type="string"/>
@@ -462,5 +338,5 @@
 			<description><![CDATA[Create a signal that automatically reflects one of the creature's properties (i.e. its power is equal to the property value).
 Example:
-Creature.signals.addProperty("energy","energy"); //then, Neuro.signals.receive("energy") in custom neuron would work similarly to the built-in smell sensor]]></description>
+Creature.signals.addProperty("energy","energy"); //then, Neuro.signals.receive("energy") in a custom neuron would work similarly to a built-in smell sensor.]]></description>
 			<arguments>
 				<argument name="channel" type="string"/>
@@ -468,9 +344,6 @@
 			</arguments>
 		</element>
-		<element name="clear" function="true" type="void">
-			<description><![CDATA[Delete all signals]]></description>
-<arguments/></element>
+		<element name="clear" function="true" type="void"><arguments/></element>
 		<element name="get" function="true" type="Signal">
-			<description><![CDATA[Access individual signals (index=0 .. size-1)]]></description>
 			<arguments>
 				<argument name="index" type="integer"/>
@@ -488,14 +361,14 @@
 Additional filtering options:
 - Max distance only receives the neighbor signals (based on their physical location)
-- Flavor filtering: only signals having the flavor close to the specified one will be received. The filter value is the maximum allowed difference.]]></description>
+- Flavor filtering: only signals having the flavor similar to the specified value will be received. The flavorfilter value is the difference of flavor that reduces the received signal to 0. The "flavor attenuation" is linear, i.e., signals differing by (filter/2) in flavor will be reduced to 50%.]]></description>
 			<arguments>
 				<argument name="channel" type="string"/>
 				<argument name="max distance" type="float"/>
 				<argument name="flavor" type="float"/>
-				<argument name="filter" type="float"/>
+				<argument name="flavorfilter" type="float"/>
 			</arguments>
 		</element>
 		<element name="receiveSet" function="true" type="Vector">
-			<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>
+			<description><![CDATA[Get all signals in the specified range. Returns a read-only vector object containing Signal objects - individual signals can be accessed as result[0], .., result[result.size-1].]]></description>
 			<arguments>
 				<argument name="channel" type="string"/>
@@ -504,5 +377,5 @@
 		</element>
 		<element name="receiveSingle" function="true" type="Signal">
-			<description><![CDATA[Find the signal source having the highest signal power (including the distance)]]></description>
+			<description><![CDATA[Find the signal source that has the highest signal power (taking into account distance).]]></description>
 			<arguments>
 				<argument name="channel" type="string"/>
@@ -512,7 +385,9 @@
 	</type>
 	<type name="Dictionary" context="Global context">
-<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. The sequence of elements is not preserved.
-Example: var d=Dictionary.new(); d.set("name","John"); d.set("age",44);
-var i,element; for(i=0;i<d.size;i++) CLI.println(d.getKey(i)+" is "+d.get(i));]]></description>
+<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 (the sequence of elements is not preserved).
+Example:
+var d=Dictionary.new(); d.set("name","John"); d.set("age",44);
+var i;
+for(i=0;i<d.size;i++) Simulator.print(d.getKey(i)+" is "+d.get(i));]]></description>
 		<element name="size" type="integer"/>
 		<element name="toString" type="string"/>
@@ -531,5 +406,5 @@
 		<element name="getKey" function="true" type="string">
 			<arguments>
-				<argument name="index"/>
+				<argument name="index" type="integer"/>
 			</arguments>
 		</element>
@@ -667,13 +542,13 @@
 	</type>
 	<type name="GenePool" context="Global context">
-<description><![CDATA[The static GenePool object refers to the "selected group" as described in GenePools.]]></description>
+<description><![CDATA[GenePool objects are accessed by GenePools[index], or Genotype..genepool and created by GenePools.addGroup(). Usage of the static GenePool object is no longer recommended. See also: GenePools]]></description>
 		<element name="fitfun" type="integer" min="0" max="1" default="0">
 			<description><![CDATA[Enables fitness scaling.]]></description>
 		</element>
-		<element name="fitm" type="float" min="0" max="10" default="2">
+		<element name="fitm" type="float" min="0" max="10" default="2.0">
 			<description><![CDATA[Lower threshold: how many standard deviations below average?
 (avg - n * stddev) - used for fitness shifting]]></description>
 		</element>
-		<element name="fitma" type="float" min="1" max="10" default="2">
+		<element name="fitma" type="float" min="1" max="10" default="2.0">
 			<description><![CDATA[The best genotype is as many times
 better than the average one.]]></description>
@@ -690,9 +565,34 @@
 			<description><![CDATA[Takes into account the Genotype.instances field (which may give the total number of instances depending on the experiment definition).]]></description>
 		</element>
-		<element name="addGeno" function="true" type="Genotype">
+		<element name="add" function="true" type="Genotype">
+			<description><![CDATA[Creates a new Genotype from the supplied Genotype, Geno or string.
+Returns the created Genotype.]]></description>
+			<arguments>
+				<argument name="genotype object or geno object or string genotype" type="untyped"/>
+			</arguments>
+		</element>
+		<element name="addGeno" function="true" type="Genotype" deprecated="true">
 			<description><![CDATA[Creates a new Genotype from the supplied Geno object.
-Returns the created Genotype.]]></description>
+Returns the created Genotype.
+Deprecated. Use the more versatile add() instead of this function.]]></description>
 			<arguments>
 				<argument type="Geno"/>
+			</arguments>
+		</element>
+		<element name="clear" function="true" type="void">
+			<description><![CDATA[Delete all genotypes. GenePools[group].clear() is equivalent to GenePools.clearGroup(group)]]></description>
+<arguments/></element>
+		<element name="createFromGeno" function="true" type="Genotype" deprecated="true">
+			<description><![CDATA[same as addGeno (to comply with createFrom... convention)
+Deprecated. Use the more versatile add() instead of this function.]]></description>
+			<arguments>
+				<argument name="genotype" type="Geno"/>
+			</arguments>
+		</element>
+		<element name="createFromString" function="true" type="Genotype" deprecated="true">
+			<description><![CDATA[Uses the supplied string argument
+Deprecated. Use the more versatile add() instead of this function.]]></description>
+			<arguments>
+				<argument name="genotype" type="string"/>
 			</arguments>
 		</element>
@@ -700,14 +600,28 @@
 			<description><![CDATA[Deletes a genotype.]]></description>
 			<arguments>
-				<argument name="genotype index" type="integer"/>
-			</arguments>
-		</element>
-		<element name="findGeno" function="true" type="integer">
+				<argument name="genotype object or index" type="untyped"/>
+			</arguments>
+		</element>
+		<element name="deleteOne" function="true" type="void">
+			<description><![CDATA[Deletes one individual = decreases 'instances' and deletes the genotype if the 'instances' goes to 0.]]></description>
+			<arguments>
+				<argument name="genotype object or index" type="untyped"/>
+			</arguments>
+		</element>
+		<element name="findGeno" function="true" type="integer" deprecated="true">
 			<description><![CDATA[Finds the Genotype matching the supplied Geno object.
-returns genotype index or -1 if not found.]]></description>
+returns genotype index or -1 if not found.
+Deprecated. Use the more versatile find() instead of this function.]]></description>
 			<arguments>
 				<argument type="Geno"/>
 			</arguments>
 		</element>
+		<element name="findGenotype" function="true" type="Genotype">
+			<description><![CDATA[Finds the Genotype matching the supplied Genotype object, Geno object, or genotype string.
+returns genotype object or null if not found.]]></description>
+			<arguments>
+				<argument name="genotype object or geno object or string genotype" type="untyped"/>
+			</arguments>
+		</element>
 		<element name="findUID" function="true" type="integer">
 			<arguments>
@@ -720,24 +634,61 @@
 			</arguments>
 		</element>
+		<element name="mergeInstances" function="true" type="void">
+			<description><![CDATA[Merge instances of the same genotype]]></description>
+<arguments/></element>
+		<element name="random" function="true" type="Genotype">
+			<description><![CDATA[Gets random genotype object]]></description>
+<arguments/></element>
+		<element name="randomLikeGeno" function="true" type="Genotype">
+			<description><![CDATA[Gets a random genotype index similar to the selected one.]]></description>
+			<arguments>
+				<argument name="minimum similarity" type="float"/>
+				<argument name="target geno" type="Geno"/>
+			</arguments>
+		</element>
+		<element name="revroulette" function="true" type="Genotype">
+			<description><![CDATA[Get reverse fitness-proportional genotype object]]></description>
+<arguments/></element>
+		<element name="roulette" function="true" type="Genotype">
+			<description><![CDATA[Gets fitness-proportional genotype object]]></description>
+<arguments/></element>
+		<element name="rouletteLikeGeno" function="true" type="Genotype">
+			<description><![CDATA[Gets a random genotype similar to the selected one, fitness-proportional.]]></description>
+			<arguments>
+				<argument name="minimum similarity" type="float"/>
+				<argument name="target geno" type="Geno"/>
+			</arguments>
+		</element>
+		<element name="splitInstances" function="true" type="void">
+			<description><![CDATA[Split genotype instances]]></description>
+<arguments/></element>
+		<element name="tournament" function="true" type="Genotype">
+			<description><![CDATA[Gets tournament winner genotype object]]></description>
+			<arguments>
+				<argument name="genotypes in tournament" type="integer"/>
+			</arguments>
+		</element>
+		<element name="worst" function="true" type="Genotype">
+			<description><![CDATA[Gets genotype object having lowest fitness]]></description>
+<arguments/></element>
 	</type>
 	<type name="GenePools" context="Global context">
-<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:
-GenePools.group=0; GenePools.genotype=0; var name=Genotype.name;
-However, the preferred way doesn't refer to the static Genotype object:
- var name=GenePools[0][0].name;
-
-Apart 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:
+<description><![CDATA[Manages all genotypes in the experiment, organized in one or more groups.
+Before version 4.0rc4 some operations could only be performed on the "selected" genotype (the one pointed to by group/genotype fields in GenePools). Currently, the more convenient and recommended way is to call Genotype's or GenePool's functions that operate directly on the passed objects.
+
+// The old way:
 GenePools.newGenotype("X");
- //makes the temporary object from the "X" genotype, GenePools.genotype is now -1
 GenePools.mutateSelected();
- //the temporary object is mutated
 Genotype.info="my favorite genotype";
- //modify the temporary object
 GenePools.copySelected(0);
- //copy the current, i.e. temporary genotype to the genotype group #0]]></description>
-		<element name="genotype" type="integer">
+
+// Doing the same the new way:
+var g=Genotype.newFromGeno(GenMan.mutate(Geno.newFromString("X")));
+g.info="my favorite genotype";
+g.moveTo(GenePools[0]);]]></description>
+		<element name="genotype" type="integer" deprecated="true">
 			<description><![CDATA[Index of the currently selected genotype or -1 if no genotype is selected.]]></description>
 		</element>
-		<element name="group" type="integer">
+		<element name="group" type="integer" deprecated="true">
 			<description><![CDATA[Index of the currently selected group (GenePool).]]></description>
 		</element>
@@ -749,5 +700,5 @@
 			</arguments>
 		</element>
-		<element name="addPerformanceFromCreature" function="true" type="void">
+		<element name="addPerformanceFromCreature" function="true" type="void" deprecated="true">
 			<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>
 <arguments/></element>
@@ -755,10 +706,11 @@
 			<description><![CDATA[Removes all gene pools except the first one.]]></description>
 <arguments/></element>
-		<element name="clearGroup" function="true" type="void">
+		<element name="clearGroup" function="true" type="void" deprecated="true">
+			<description><![CDATA[GenePools[group].clear() is more "object oriented" than GenePools.clearGroup(group)]]></description>
 			<arguments>
 				<argument name="index" type="integer"/>
 			</arguments>
 		</element>
-		<element name="copySelected" function="true" type="void">
+		<element name="copySelected" function="true" type="void" deprecated="true">
 			<description><![CDATA[Copies the selected genotype to another group.]]></description>
 			<arguments>
@@ -766,5 +718,5 @@
 			</arguments>
 		</element>
-		<element name="crossoverSelected" function="true" type="void">
+		<element name="crossoverSelected" function="true" type="void" deprecated="true">
 			<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>
 			<arguments>
@@ -778,5 +730,5 @@
 			</arguments>
 		</element>
-		<element name="deleteOne" function="true" type="void">
+		<element name="deleteOne" function="true" type="void" deprecated="true">
 			<description><![CDATA[Deletes one individual from the gene pool = decreases 'instances' and deletes the genotype if the 'instances' goes to 0.]]></description>
 			<arguments>
@@ -784,11 +736,11 @@
 			</arguments>
 		</element>
-		<element name="deleteSelected" function="true" type="void">
+		<element name="deleteSelected" function="true" type="void" deprecated="true">
 			<description><![CDATA[Deletes selected genotype from the gene pool (uses the selected genotype object).]]></description>
 <arguments/></element>
-		<element name="findGenotype" function="true" type="integer">
+		<element name="findGenotype" function="true" type="integer" deprecated="true">
 			<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>
 <arguments/></element>
-		<element name="findGenotypeForCreature" function="true" type="integer">
+		<element name="findGenotypeForCreature" function="true" type="integer" deprecated="true">
 			<description><![CDATA[Finds a genotype matching the selected creature.]]></description>
 <arguments/></element>
@@ -798,8 +750,8 @@
 			</arguments>
 		</element>
-		<element name="getFromCreature" function="true" type="void">
+		<element name="getFromCreature" function="true" type="void" deprecated="true">
 			<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>
 <arguments/></element>
-		<element name="getFromCreatureObject" function="true" type="void">
+		<element name="getFromCreatureObject" function="true" type="void" deprecated="true">
 			<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>
 			<arguments>
@@ -807,5 +759,5 @@
 			</arguments>
 		</element>
-		<element name="likeThisRoulette" function="true" type="integer">
+		<element name="likeThisRoulette" function="true" type="integer" deprecated="true">
 			<description><![CDATA[Gets a random genotype similar to the selected one, fitness-proportional.]]></description>
 			<arguments>
@@ -813,8 +765,8 @@
 			</arguments>
 		</element>
-		<element name="mutateSelected" function="true" type="void">
+		<element name="mutateSelected" function="true" type="void" deprecated="true">
 			<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>
 <arguments/></element>
-		<element name="newGenotype" function="true" type="void">
+		<element name="newGenotype" function="true" type="void" deprecated="true">
 			<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>
 			<arguments>
@@ -822,20 +774,20 @@
 			</arguments>
 		</element>
-		<element name="random" function="true" type="integer">
-			<description><![CDATA[Gets random genotype.]]></description>
+		<element name="random" function="true" type="integer" deprecated="true">
+			<description><![CDATA[Gets random genotype index.]]></description>
 <arguments/></element>
-		<element name="randomLikeThis" function="true" type="integer">
-			<description><![CDATA[Gets a random genotype similar to the selected one.]]></description>
+		<element name="randomLikeThis" function="true" type="integer" deprecated="true">
+			<description><![CDATA[Gets a random genotype index similar to the selected one.]]></description>
 			<arguments>
 				<argument name="minimum similarity" type="float"/>
 			</arguments>
 		</element>
-		<element name="revroulette" function="true" type="integer">
-			<description><![CDATA[Get reverse fitness-proportional genotype.]]></description>
+		<element name="revroulette" function="true" type="integer" deprecated="true">
+			<description><![CDATA[Get reverse fitness-proportional genotype index.]]></description>
 <arguments/></element>
-		<element name="roulette" function="true" type="integer">
-			<description><![CDATA[Gets fitness-proportional genotype.]]></description>
+		<element name="roulette" function="true" type="integer" deprecated="true">
+			<description><![CDATA[Gets fitness-proportional genotype index.]]></description>
 <arguments/></element>
-		<element name="tournament" function="true" type="integer">
+		<element name="tournament" function="true" type="integer" deprecated="true">
 			<description><![CDATA[Gets tournament winner genotype.]]></description>
 			<arguments>
@@ -843,6 +795,6 @@
 			</arguments>
 		</element>
-		<element name="worst" function="true" type="integer">
-			<description><![CDATA[Gets worst genotype.]]></description>
+		<element name="worst" function="true" type="integer" deprecated="true">
+			<description><![CDATA[Gets worst genotype index.]]></description>
 <arguments/></element>
 	</type>
@@ -851,35 +803,44 @@
 		<element name="changedProperty" type="integer"/>
 		<element name="changedPropertyId" type="string"/>
-		<element name="f0_c_del" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_c_new" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_c_wei" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_del" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_new" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_rsf" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_stf" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_stm" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_n_del" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_n_new" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_n_prp" type="float" min="0" max="100" default="10">
+		<element name="f0_c_del" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_c_new" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_c_wei" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_del" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_new" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_rsf" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_stf" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_stm" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_vblu" type="float" min="0" max="100" default="0.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_vgrn" type="float" min="0" max="100" default="0.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_vred" type="float" min="0" max="100" default="0.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_n_del" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_n_new" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_n_prp" type="float" min="0" max="100" default="10.0">
 			<description><![CDATA[]]></description>
 		</element>
@@ -894,31 +855,34 @@
 The i="mi=md" combination is allowed.]]></description>
 		</element>
-		<element name="f0_p_asm" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_del" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_frc" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_ing" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_mas" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_new" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_pos" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_swp" type="float" min="0" max="100" default="10">
+		<element name="f0_p_asm" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_del" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_frc" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_ing" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_mas" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_new" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_pos" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_swp" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_vsiz" type="float" min="0" max="100" default="0.0">
 			<description><![CDATA[]]></description>
 		</element>
 		<element name="f1_mut_exmod" type="string">
 			<description><![CDATA[Modifiers that will not be added nor deleted during mutation
-(all: RrLlAaCcFfMmSsIiQqWwEe)]]></description>
+(all: LlRrCcQqFfMmIiWwEeAaSsDdGgBbHh)]]></description>
 		</element>
 		<element name="f1_nmConn" type="float" min="0" max="100" default="0.1">
@@ -932,9 +896,9 @@
 		</element>
 		<element name="f1_nmVal" type="float" min="0" max="100" default="0.05"/>
-		<element name="f1_nmWei" type="float" min="0" max="100" default="1"/>
+		<element name="f1_nmWei" type="float" min="0" max="100" default="1.0"/>
 		<element name="f1_smComma" type="float" min="0" max="100" default="0.02"/>
 		<element name="f1_smJunct" type="float" min="0" max="100" default="0.02"/>
 		<element name="f1_smModif" type="float" min="0" max="100" default="0.1">
-			<description><![CDATA[Modifiers: RrLlAaCcFfMmSsIiQqWwEe]]></description>
+			<description><![CDATA[Modifiers: LlRrCcQqFfMmIiWwEeAaSsDdGgBbHh]]></description>
 		</element>
 		<element name="f1_smX" type="float" min="0" max="100" default="0.05"/>
@@ -994,26 +958,26 @@
 			<description><![CDATA[]]></description>
 		</element>
-		<element name="f4_mut_add" type="float" min="0" max="100" default="50">
+		<element name="f4_mut_add" type="float" min="0" max="100" default="50.0">
 			<description><![CDATA[mutation: probability of adding a node]]></description>
 		</element>
-		<element name="f4_mut_add_conn" type="float" min="0" max="100" default="15">
+		<element name="f4_mut_add_conn" type="float" min="0" max="100" default="15.0">
 			<description><![CDATA[add node mutation: probability of adding a neural connection]]></description>
 		</element>
-		<element name="f4_mut_add_div" type="float" min="0" max="100" default="20">
+		<element name="f4_mut_add_div" type="float" min="0" max="100" default="20.0">
 			<description><![CDATA[add node mutation: probability of adding a division]]></description>
 		</element>
-		<element name="f4_mut_add_neupar" type="float" min="0" max="100" default="5">
+		<element name="f4_mut_add_neupar" type="float" min="0" max="100" default="5.0">
 			<description><![CDATA[add node mutation: probability of adding a neuron property/modifier]]></description>
 		</element>
-		<element name="f4_mut_add_rep" type="float" min="0" max="100" default="10">
+		<element name="f4_mut_add_rep" type="float" min="0" max="100" default="10.0">
 			<description><![CDATA[add node mutation: probability of adding a repetition]]></description>
 		</element>
-		<element name="f4_mut_add_simp" type="float" min="0" max="100" default="50">
+		<element name="f4_mut_add_simp" type="float" min="0" max="100" default="50.0">
 			<description><![CDATA[add node mutation: probability of adding a random, simple gene]]></description>
 		</element>
-		<element name="f4_mut_del" type="float" min="0" max="100" default="20">
+		<element name="f4_mut_del" type="float" min="0" max="100" default="20.0">
 			<description><![CDATA[mutation: probability of deleting a node]]></description>
 		</element>
-		<element name="f4_mut_mod" type="float" min="0" max="100" default="30">
+		<element name="f4_mut_mod" type="float" min="0" max="100" default="30.0">
 			<description><![CDATA[mutation: probability of changing a node]]></description>
 		</element>
@@ -1110,5 +1074,5 @@
 ]]></description>
 		</element>
-		<element name="neuadd_*" type="integer" min="0" max="1">
+		<element name="neuadd_Constant" type="integer" min="0" max="1">
 			<description><![CDATA[Constant value
 
@@ -1119,5 +1083,5 @@
 ]]></description>
 		</element>
-		<element name="neuadd_|" type="integer" min="0" max="1">
+		<element name="neuadd_Bend_muscle" type="integer" min="0" max="1">
 			<description><![CDATA[Characteristics:
    uses single input
@@ -1130,5 +1094,5 @@
    bending range (r) float 0..1]]></description>
 		</element>
-		<element name="neuadd_@" type="integer" min="0" max="1">
+		<element name="neuadd_Rotation_muscle" type="integer" min="0" max="1">
 			<description><![CDATA[Characteristics:
    uses single input
@@ -1289,4 +1253,231 @@
    time (t) float 0..6.28319]]></description>
 		</element>
+		<element name="neuadd_Mzm" type="integer" min="0" max="1">
+			<description><![CDATA[Helps framstick navigate through a maze. This acts as a memory of already visited places. Returns 1 if the framstick has already visited current block, 0 otherwise. The memory is not volatile.
+
+Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="neuadd_OThr" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   does not provide output value
+   should be located on a Joint
+]]></description>
+		</element>
+		<element name="neuadd_SeeLight" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+
+
+Properties:
+    (flavor) float 0..4]]></description>
+		</element>
+		<element name="neuadd_Linb" type="integer" min="0" max="1">
+			<description><![CDATA[output=input(bez sumowania)
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="neuadd_Delay" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   delay time (in steps) (t) integer 1..1000]]></description>
+		</element>
+		<element name="neuadd_ntest" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   provides output value
+   should be located on a Joint
+]]></description>
+		</element>
+		<element name="neuadd_WarnLR" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="neuadd_SeeLight2" type="integer" min="0" max="1">
+			<description><![CDATA[Returns the average signal intensity of all nearby transmitters. Unlike "SeeLight", signals do not attenuate over distance (however, the maximal signal distance is limited by the "range" parameter).
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+
+
+Properties:
+    (range) float 0..100]]></description>
+		</element>
+		<element name="neuadd_FeelInjury" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="neuadd_PIDV" type="integer" min="0" max="1">
+			<description><![CDATA[PID Regulator (velocity/incremental form)
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   K (k) float 0.01..100
+   Ti (ti) float 0.01..100
+   Td (td) float 0.01..100]]></description>
+		</element>
+		<element name="neuadd_Lin" type="integer" min="0" max="1">
+			<description><![CDATA[output=input
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="neuadd_WarnDD" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="neuadd_Sf" type="integer" min="0" max="1">
+			<description><![CDATA[Detects only food, not other creatures
+(in experiments with food in group #1)
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="neuadd_Nn" type="integer" min="0" max="1">
+			<description><![CDATA[Propagates weighted inputs onto the output, but occassionally generates a random value
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Error rate (e) float 0..0.1]]></description>
+		</element>
+		<element name="neuadd_Rdr" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   does not provide output value
+   does not require location in body
+
+
+Properties:
+    ()]]></description>
+		</element>
+		<element name="neuadd_WarnDist" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="neuadd_Cmp" type="integer" min="0" max="1">
+			<description><![CDATA[Helps framstick navigate through a maze. Output returns 1 if there is a free space in the direction where the joint to which the neuron is attahced points, 0 otherwise. NOTE: This neuron *must* be attached to a *joint*.
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="neuadd_Light" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   should be located on a Part
+
+
+Properties:
+    (flavor) float 0..4]]></description>
+		</element>
+		<element name="neuadd_Thr" type="integer" min="0" max="1">
+			<description><![CDATA[if (input>=t) then output=hi else output=lo
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   threshold (t) float
+   low output value (lo) float
+   high output value (hi) float]]></description>
+		</element>
+		<element name="neuadd_PIDP" type="integer" min="0" max="1">
+			<description><![CDATA[PID Regulator (positional/full value form)
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   K (k) float 0.01..100
+   Ti (ti) float 0.01..100
+   Td (td) float 0.01..100]]></description>
+		</element>
+		<element name="neuadd_ptest" type="integer" min="0" max="1">
+			<description><![CDATA[different parameter datatypes
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   first integer (i1) integer
+   first float (f1) float
+   first string (s1) string
+   second integer (i2) integer
+   second float (f2) float
+   second string (s2) string]]></description>
+		</element>
+		<element name="neuadd_FF" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   should be located on a Part
+]]></description>
+		</element>
 		<element name="add" function="true"/>
 		<element name="addGroup" function="true"/>
@@ -1414,5 +1605,6 @@
 	</type>
 	<type name="Genotype" context="Global context">
-<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>
+<description><![CDATA[A Genotype with the associated performance information. Adding genotypes to GenePool makes them accessible in Framsticks GUI and enables the use of GenePool selection methods.
+Before version 4.0rc4 the static Genotype object was used in functions operating on the "selected" genotype. This is now deprecated as all operations can be performed using the more convenient direct access (see GenePools).]]></description>
 		<element name="convtrace1" type="string"/>
 		<element name="distance" type="float"/>
@@ -1425,4 +1617,7 @@
 			<description><![CDATA[Fitness shifted by (avg-n*stddev)]]></description>
 		</element>
+		<element name="genepool" type="untyped">
+			<description><![CDATA[GenePool object or null when not in pool]]></description>
+		</element>
 		<element name="geno" type="Geno">
 			<description><![CDATA[Geno object for this Genotype]]></description>
@@ -1430,4 +1625,8 @@
 		<element name="genotype" type="string"/>
 		<element name="gnum" type="integer"/>
+		<element name="index" type="integer">
+			<description><![CDATA[-1 when not in pool.
+Note that the index changes depending on the current genotype position in the pool. Use Genotype.uid if you need a permanent identifier that persists through the entire object lifetime.]]></description>
+		</element>
 		<element name="info" type="string">
 			<description><![CDATA[Additional information or comments]]></description>
@@ -1463,4 +1662,20 @@
 		<element name="vertpos" type="float"/>
 		<element name="vertvel" type="float"/>
+		<element name="addPerformanceFromCreature" function="true" type="void">
+			<description><![CDATA[Updates the Genotype's performance values merging them with the supplied 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>
+			<arguments>
+				<argument type="Creature"/>
+			</arguments>
+		</element>
+		<element name="copyTo" function="true" type="Genotype">
+			<description><![CDATA[returns the duplicate genotype, created in the target pool]]></description>
+			<arguments>
+				<argument name="pool" type="GenePool"/>
+			</arguments>
+		</element>
+		<element name="delete" function="true" type="void"><arguments/></element>
+		<element name="deleteOne" function="true" type="void">
+			<description><![CDATA[]]></description>
+<arguments/></element>
 		<element name="getModel" function="true" type="Model"><arguments/></element>
 		<element name="getNormalized" function="true" type="float">
@@ -1469,60 +1684,27 @@
 			</arguments>
 		</element>
+		<element name="moveTo" function="true" type="void">
+			<description><![CDATA[the genotype is removed from its current pool when pool=null]]></description>
+			<arguments>
+				<argument name="pool" type="GenePool"/>
+			</arguments>
+		</element>
 		<element name="mutate" function="true" type="void"><arguments/></element>
-	</type>
-	<type name="GenotypeGroup" context="Global context">
-<description><![CDATA[The static GenePool object refers to the "selected group" as described in GenePools.]]></description>
-		<element name="fitfun" type="integer" min="0" max="1" default="0">
-			<description><![CDATA[Enables fitness scaling.]]></description>
-		</element>
-		<element name="fitm" type="float" min="0" max="10" default="2">
-			<description><![CDATA[Lower threshold: how many standard deviations below average?
-(avg - n * stddev) - used for fitness shifting]]></description>
-		</element>
-		<element name="fitma" type="float" min="1" max="10" default="2">
-			<description><![CDATA[The best genotype is as many times
-better than the average one.]]></description>
-		</element>
-		<element name="fitness" type="string">
-			<description><![CDATA[(intended for advanced users)]]></description>
-		</element>
-		<element name="index" type="integer"/>
-		<element name="name" type="string"/>
-		<element name="size" type="integer">
-			<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>
-		</element>
-		<element name="totalpop" type="integer">
-			<description><![CDATA[Takes into account the Genotype.instances field (which may give the total number of instances depending on the experiment definition).]]></description>
-		</element>
-		<element name="addGeno" function="true" type="Genotype">
-			<description><![CDATA[Creates a new Genotype from the supplied Geno object.
-Returns the created Genotype.]]></description>
-			<arguments>
-				<argument type="Geno"/>
-			</arguments>
-		</element>
-		<element name="delete" function="true" type="void">
-			<description><![CDATA[Deletes a genotype.]]></description>
-			<arguments>
-				<argument name="genotype index" type="integer"/>
-			</arguments>
-		</element>
-		<element name="findGeno" function="true" type="integer">
-			<description><![CDATA[Finds the Genotype matching the supplied Geno object.
-returns genotype index or -1 if not found.]]></description>
-			<arguments>
-				<argument type="Geno"/>
-			</arguments>
-		</element>
-		<element name="findUID" function="true" type="integer">
-			<arguments>
-				<argument name="uid" type="string"/>
-			</arguments>
-		</element>
-		<element name="get" function="true" type="Genotype">
-			<arguments>
-				<argument name="index" type="integer"/>
-			</arguments>
-		</element>
+		<element name="newFromCreature" function="true">
+			<arguments>
+				<argument name="creature" type="Creature"/>
+			</arguments>
+		</element>
+		<element name="newFromGeno" function="true">
+			<arguments>
+				<argument name="geno" type="Geno"/>
+			</arguments>
+		</element>
+		<element name="newFromString" function="true">
+			<arguments>
+				<argument name="genotype" type="string"/>
+			</arguments>
+		</element>
+		<element name="splitInstances" function="true" type="void"><arguments/></element>
 	</type>
 	<type name="Interface" context="Global context">
@@ -1613,16 +1795,19 @@
 	</type>
 	<type name="Joint" context="Global context">
-		<element name="dx" type="float" min="-2" max="2" default="0"/>
-		<element name="dy" type="float" min="-2" max="2" default="0"/>
-		<element name="dz" type="float" min="-2" max="2" default="0"/>
+		<element name="dx" type="float" min="-2" max="2" default="0.0"/>
+		<element name="dy" type="float" min="-2" max="2" default="0.0"/>
+		<element name="dz" type="float" min="-2" max="2" default="0.0"/>
 		<element name="i" type="string"/>
 		<element name="p1" type="integer" min="-1" max="999999" default="-1"/>
 		<element name="p2" type="integer" min="-1" max="999999" default="-1"/>
-		<element name="rotstif" type="float" min="0" max="1" default="1"/>
+		<element name="rotstif" type="float" min="0" max="1" default="1.0"/>
 		<element name="rx" type="float"/>
 		<element name="ry" type="float"/>
 		<element name="rz" type="float"/>
 		<element name="stam" type="float" min="0" max="1" default="0.25"/>
-		<element name="stif" type="float" min="0" max="1" default="1"/>
+		<element name="stif" type="float" min="0" max="1" default="1.0"/>
+		<element name="vb" type="float" min="0" max="1" default="0.5"/>
+		<element name="vg" type="float" min="0" max="1" default="0.5"/>
+		<element name="vr" type="float" min="0" max="1" default="0.5"/>
 		<element name="Vstyle" type="string"/>
 	</type>
@@ -1676,5 +1861,6 @@
 		<element name="seed" type="integer">
 			<description><![CDATA[Random number generator seed.
-Note: Math.seed influences all future random activity in the simulator, not only Math.rnd01 results.]]></description>
+Note: Math.seed influences all further random activity in the simulator, not just the results of functions in this class.
+Note #2: When read, the value behaves just like a regular variable that stores the previously assigned value. It does NOT reflect the internal random generator seed that changes every time a random number has been generated.]]></description>
 		</element>
 		<element name="time" type="float">
@@ -1747,4 +1933,7 @@
 			</arguments>
 		</element>
+		<element name="randomize" function="true">
+			<description><![CDATA[Set random seed for the random number generator.]]></description>
+		</element>
 		<element name="rndCustom" function="true" type="float">
 			<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>
@@ -1756,6 +1945,6 @@
 			<description><![CDATA[rndGaussStd is rndGauss(0,1)]]></description>
 			<arguments>
-				<argument name="center" type="float"/>
-				<argument name="stdandard deviation" type="float"/>
+				<argument name="mean" type="float"/>
+				<argument name="standard deviation" type="float"/>
 			</arguments>
 		</element>
@@ -1880,7 +2069,10 @@
 <description><![CDATA[Live Neuron object.]]></description>
 		<element name="channelCount" type="integer"/>
+		<element name="classObject" type="NeuroClass"/>
 		<element name="creature" type="Creature"/>
 		<element name="currState" type="float">
-			<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>
+			<description><![CDATA[When read, it behaves just like the 'state' field.
+When written, changes the current 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>
 		</element>
 		<element name="def" type="NeuroDef"/>
@@ -1913,5 +2105,6 @@
 		<element name="state" type="float">
 			<description><![CDATA[When read, returns the current neuron state.
-When written, sets the next neuron state (for use in the neuron definition)]]></description>
+When written, sets the 'internal' neuron state that will become current in the next step.
+Typically you should use this field, and not currState.]]></description>
 		</element>
 		<element name="weightedInputSum" type="float"/>
@@ -1979,17 +2172,54 @@
 	</type>
 	<type name="NeuroClass" context="Global context">
-<description><![CDATA[The static NeuroClass object refers to class selected in the NeuroClassLibrary.]]></description>
+<description><![CDATA[The static NeuroClass object refers to the class selected in the NeuroClassLibrary. Most, but not all, properties have direct counterparts in *.neuro files that define custom neuron classes.]]></description>
 		<element name="description" type="string"/>
-		<element name="glyph" type="string"/>
-		<element name="longname" type="string"/>
-		<element name="name" type="string"/>
-		<element name="prefinputs" type="integer"/>
+		<element name="glyph" type="string">
+			<description><![CDATA[<html>The neuron icon for use in NN diagrams, encoded as a coma-separated sequence of integer numbers.<ul>
+<li>N = the total number of all numbers following this one
+<li>NS = the number of line sequences<br>
+<ul>repeated NS times:
+<li>NL = number of line segments (creating a polyline)
+<li><span style="background-color:#fcc;">X,Y</span> (repeated NL+1 times) - subsequent line segment coordinates, each line should fit in a 100x100 square<br>
+- neuron input connections will be drawn at X=25 (varying Y for multiple inputs, Y=50 for a single input)<br>
+- neuron output connection will be drawn at (X=75,Y=50)
+</ul></ul>
+<p>Example:
+<table border=1>
+<tr><th>16,</th><th>2,</th><th>3,</th><th><span style="background-color:#fcc;">25,50</span>, <span style="background-color:#fcc;">40,30</span>, <span style="background-color:#fcc;">60,30</span>, <span style="background-color:#fcc;">75,50</span>,</th><th>1,</th><th><span style="background-color:#fcc;">40,50</span>, <span style="background-color:#fcc;">60,50</span></th></tr>
+<tr><td>N = 16 numbers following this one</td><td>NS = 2 line sequences</td><td>NL = the first sequence has 3 segments</td><td>coordinates for 3 line segments = 4 endpoints = 8 numbers</td><td>NL = the second sequence has 1 segment</td><td>coordinates for 1 line segment</td></tr>
+</table>
+<p>See also: <a href="http://www.framsticks.com/files/dev/files/inkscape-to-icon.html">a script for creating *.neuro icon from SVG</a><br>
+Compatibility: this field is called "icon" in *.neuro files.]]></description>
+		</element>
+		<element name="longname" type="string">
+			<description><![CDATA[Used in hints]]></description>
+		</element>
+		<element name="name" type="string">
+			<description><![CDATA[Used in genotypes]]></description>
+		</element>
+		<element name="prefinputs" type="integer">
+			<description><![CDATA[-1 means "any number of inputs is OK"]]></description>
+		</element>
 		<element name="preflocation" type="integer" min="0" max="2"/>
-		<element name="prefoutput" type="integer" min="0" max="1"/>
-		<element name="properties" type="Interface"/>
+		<element name="prefoutput" type="integer" min="0" max="1">
+			<description><![CDATA[Should be 1 if the neuron provides meaningful output value, 0 otherwise]]></description>
+		</element>
+		<element name="properties" type="Interface">
+			<description><![CDATA[Compatibility: not preset in *.neuro files.]]></description>
+		</element>
 		<element name="summary" type="string">
-			<description><![CDATA[Textual summary of all features]]></description>
-		</element>
-		<element name="visualhints" type="integer"/>
+			<description><![CDATA[Textual summary of all features.
+Compatibility: not preset in *.neuro files.]]></description>
+		</element>
+		<element name="visualhints" type="integer">
+			<description><![CDATA[This is a bitfield. Compute the value by adding the following bits:
+1 = Invisible - don't draw neurons of this class
+2 = No label - don't draw classname label (below the neuron symbol) for this neuron class
+4 = First Part - draw the neuron at the first part when attached to a joint (default is in the middle)
+8 = Second Part - draw the neuron at the second part when attached to a joint (default is in the middle)
+16 = Effector - use muscle color when drawing this neuron
+32 = Sensor - use receptor color when drawing this neuron
+Compatiblity: visualhints is called "vhints" in *.neuro files.]]></description>
+		</element>
 	</type>
 	<type name="NeuroClassLibrary" context="Global context">
@@ -2004,6 +2234,12 @@
 			</arguments>
 		</element>
+		<element name="getClass" function="true">
+			<arguments>
+				<argument name="class name" type="string"/>
+			</arguments>
+		</element>
 	</type>
 	<type name="NeuroDef" context="Global context">
+		<element name="classObject" type="NeuroClass"/>
 		<element name="d" type="string"/>
 		<element name="getInputCount" type="integer"/>
@@ -2096,5 +2332,5 @@
 ]]></description>
 		</element>
-		<element name="ncl_*" type="integer" min="0" max="1">
+		<element name="ncl_Constant" type="integer" min="0" max="1">
 			<description><![CDATA[Constant value
 
@@ -2105,5 +2341,5 @@
 ]]></description>
 		</element>
-		<element name="ncl_|" type="integer" min="0" max="1">
+		<element name="ncl_Bend_muscle" type="integer" min="0" max="1">
 			<description><![CDATA[Characteristics:
    uses single input
@@ -2116,5 +2352,5 @@
    bending range (r) float 0..1]]></description>
 		</element>
-		<element name="ncl_@" type="integer" min="0" max="1">
+		<element name="ncl_Rotation_muscle" type="integer" min="0" max="1">
 			<description><![CDATA[Characteristics:
    uses single input
@@ -2275,12 +2511,238 @@
    time (t) float 0..6.28319]]></description>
 		</element>
+		<element name="ncl_Mzm" type="integer" min="0" max="1">
+			<description><![CDATA[Helps framstick navigate through a maze. This acts as a memory of already visited places. Returns 1 if the framstick has already visited current block, 0 otherwise. The memory is not volatile.
+
+Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="ncl_OThr" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   does not provide output value
+   should be located on a Joint
+]]></description>
+		</element>
+		<element name="ncl_SeeLight" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+
+
+Properties:
+    (flavor) float 0..4]]></description>
+		</element>
+		<element name="ncl_Linb" type="integer" min="0" max="1">
+			<description><![CDATA[output=input(bez sumowania)
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="ncl_Delay" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   delay time (in steps) (t) integer 1..1000]]></description>
+		</element>
+		<element name="ncl_ntest" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   provides output value
+   should be located on a Joint
+]]></description>
+		</element>
+		<element name="ncl_WarnLR" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="ncl_SeeLight2" type="integer" min="0" max="1">
+			<description><![CDATA[Returns the average signal intensity of all nearby transmitters. Unlike "SeeLight", signals do not attenuate over distance (however, the maximal signal distance is limited by the "range" parameter).
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+
+
+Properties:
+    (range) float 0..100]]></description>
+		</element>
+		<element name="ncl_FeelInjury" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="ncl_PIDV" type="integer" min="0" max="1">
+			<description><![CDATA[PID Regulator (velocity/incremental form)
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   K (k) float 0.01..100
+   Ti (ti) float 0.01..100
+   Td (td) float 0.01..100]]></description>
+		</element>
+		<element name="ncl_Lin" type="integer" min="0" max="1">
+			<description><![CDATA[output=input
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="ncl_WarnDD" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="ncl_Sf" type="integer" min="0" max="1">
+			<description><![CDATA[Detects only food, not other creatures
+(in experiments with food in group #1)
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="ncl_Nn" type="integer" min="0" max="1">
+			<description><![CDATA[Propagates weighted inputs onto the output, but occassionally generates a random value
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Error rate (e) float 0..0.1]]></description>
+		</element>
+		<element name="ncl_Rdr" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   does not provide output value
+   does not require location in body
+
+
+Properties:
+    ()]]></description>
+		</element>
+		<element name="ncl_WarnDist" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="ncl_Cmp" type="integer" min="0" max="1">
+			<description><![CDATA[Helps framstick navigate through a maze. Output returns 1 if there is a free space in the direction where the joint to which the neuron is attahced points, 0 otherwise. NOTE: This neuron *must* be attached to a *joint*.
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="ncl_Light" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   should be located on a Part
+
+
+Properties:
+    (flavor) float 0..4]]></description>
+		</element>
+		<element name="ncl_Thr" type="integer" min="0" max="1">
+			<description><![CDATA[if (input>=t) then output=hi else output=lo
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   threshold (t) float
+   low output value (lo) float
+   high output value (hi) float]]></description>
+		</element>
+		<element name="ncl_PIDP" type="integer" min="0" max="1">
+			<description><![CDATA[PID Regulator (positional/full value form)
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   K (k) float 0.01..100
+   Ti (ti) float 0.01..100
+   Td (td) float 0.01..100]]></description>
+		</element>
+		<element name="ncl_ptest" type="integer" min="0" max="1">
+			<description><![CDATA[different parameter datatypes
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   first integer (i1) integer
+   first float (f1) float
+   first string (s1) string
+   second integer (i2) integer
+   second float (f2) float
+   second string (s2) string]]></description>
+		</element>
+		<element name="ncl_FF" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   should be located on a Part
+]]></description>
+		</element>
 	</type>
 	<type name="NeuroSignals" context="Global context">
-<description><![CDATA[Signals attached to the neuron.
+<description><![CDATA[Signals attached to a neuron.
 See also: Signal, WorldSignals, CreatureSignals.
 scripts/light.neuro and scripts/seelight.neuro are simple custom neuron examples demonstrating how to send/receive signals between creatures.]]></description>
 		<element name="size" type="integer"/>
-		<element name="add" function="true" type="void">
-			<description><![CDATA[Create a new signal]]></description>
+		<element name="add" function="true" type="Signal">
 			<arguments>
 				<argument name="channel" type="string"/>
@@ -2304,14 +2766,14 @@
 Additional filtering options:
 - Max distance only receives the neighbor signals (based on their physical location)
-- Flavor filtering: only signals having the flavor close to the specified one will be received. The filter value is the maximum allowed difference.]]></description>
+- Flavor filtering: only signals having the flavor similar to the specified value will be received. The flavorfilter value is the difference of flavor that reduces the received signal to 0. The "flavor attenuation" is linear, i.e., signals differing by (filter/2) in flavor will be reduced to 50%.]]></description>
 			<arguments>
 				<argument name="channel" type="string"/>
 				<argument name="max distance" type="float"/>
 				<argument name="flavor" type="float"/>
-				<argument name="filter" type="float"/>
+				<argument name="flavorfilter" type="float"/>
 			</arguments>
 		</element>
 		<element name="receiveSet" function="true" type="Vector">
-			<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>
+			<description><![CDATA[Get all signals in the specified range. Returns a read-only vector object containing Signal objects - individual signals can be accessed as result[0], .., result[result.size-1].]]></description>
 			<arguments>
 				<argument name="channel" type="string"/>
@@ -2320,8 +2782,8 @@
 		</element>
 		<element name="receiveSingle" function="true" type="Signal">
-			<description><![CDATA[Find the signal source having the highest signal power (including the distance)]]></description>
+			<description><![CDATA[Find the signal source that has the highest signal power (taking into account distance).]]></description>
 			<arguments>
 				<argument name="channel" type="string"/>
-				<argument name="range" type="float"/>
+				<argument name="max distance" type="float"/>
 			</arguments>
 		</element>
@@ -2334,5 +2796,5 @@
 		<element name="odecol2bounce" type="float" min="0" max="1" default="0.1"/>
 		<element name="odecol2bouncevel" type="float" min="0" max="1" default="0.01"/>
-		<element name="odecol2mumax" type="float" min="0" max="10" default="1">
+		<element name="odecol2mumax" type="float" min="0" max="10" default="1.0">
 			<description><![CDATA[Mu coefficient for Parts with maximal friction (i.e. "FFFFF" in f1)]]></description>
 		</element>
@@ -2340,9 +2802,9 @@
 			<description><![CDATA[Mu coefficient for Parts with minimal friction (i.e. "fffff" in f1)]]></description>
 		</element>
-		<element name="odecol2softcfm" type="float" min="0" max="1" default="0"/>
-		<element name="odecol2softerp" type="float" min="0" max="1" default="0"/>
+		<element name="odecol2softcfm" type="float" min="0" max="1" default="0.0"/>
+		<element name="odecol2softerp" type="float" min="0" max="1" default="0.0"/>
 		<element name="odecolbounce" type="float" min="0" max="1" default="0.1"/>
 		<element name="odecolbouncevel" type="float" min="0" max="1" default="0.01"/>
-		<element name="odecolmumax" type="float" min="0" max="10" default="5">
+		<element name="odecolmumax" type="float" min="0" max="10" default="5.0">
 			<description><![CDATA[Mu coefficient for Parts with maximal friction (i.e. "FFFFF" in f1)]]></description>
 		</element>
@@ -2350,20 +2812,20 @@
 			<description><![CDATA[Mu coefficient for Parts with minimal friction (i.e. "fffff" in f1)]]></description>
 		</element>
-		<element name="odecolsoftcfm" type="float" min="0" max="1" default="0"/>
-		<element name="odecolsofterp" type="float" min="0" max="1" default="0"/>
-		<element name="odemusclemax" type="float" min="0" max="100" default="10">
+		<element name="odecolsoftcfm" type="float" min="0" max="1" default="0.0"/>
+		<element name="odecolsofterp" type="float" min="0" max="1" default="0.0"/>
+		<element name="odemusclemax" type="float" min="0" max="100" default="10.0">
 			<description><![CDATA[i.e. "MMMMM" if f1]]></description>
 		</element>
-		<element name="odemusclemin" type="float" min="0" max="100" default="0">
+		<element name="odemusclemin" type="float" min="0" max="100" default="0.0">
 			<description><![CDATA[i.e. "mmmmm" in f1]]></description>
 		</element>
-		<element name="odemusclespeed" type="float" min="0" max="10" default="1">
+		<element name="odemusclespeed" type="float" min="0" max="10" default="1.0">
 			<description><![CDATA[Muscle state cannot change faster than the supplied value]]></description>
 		</element>
 		<element name="odeseed" type="integer" min="0" max="2">
 			<description><![CDATA[Affects collisions.
-- 'Truly random' is closest to the standard ODE operation. Use Math.seed to influence randomness in ODE collisions
-- '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'
-- 'Fixed' is completely deterministic and does not depend on Math.seed. This might negatively affect ODE accuracy
+- 'Truly random' is closest to the standard ODE operation. Use Math.seed to influence randomness in ODE collisions.
+- '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'.
+- 'Fixed' is completely deterministic and does not depend on Math.seed - the same seed value is set before each step. This might negatively affect ODE accuracy.
 ]]></description>
 		</element>
@@ -2373,5 +2835,5 @@
 		<element name="odeshape" type="integer" min="0" max="1"/>
 		<element name="odestep" type="float" min="0.001" max="1" default="0.05"/>
-		<element name="odewaterbuoy" type="float" min="0" max="2" default="1"/>
+		<element name="odewaterbuoy" type="float" min="0" max="2" default="1.0"/>
 		<element name="odewaterdrag" type="float" min="0.001" max="1" default="0.5"/>
 		<element name="odeworldcfm" type="float" min="0" max="1" default="1e-05">
@@ -2395,4 +2857,7 @@
 	<type name="Orient" context="Global context">
 <description><![CDATA[3D orientation, stored as 3x3 matrix.]]></description>
+		<element name="toVector" type="Vector">
+			<description><![CDATA[for serialization]]></description>
+		</element>
 		<element name="x" type="XYZ"/>
 		<element name="xx" type="float"/>
@@ -2408,4 +2873,12 @@
 		<element name="zz" type="float"/>
 		<element name="between2" function="true" type="void">
+			<description><![CDATA[The calling Orient receives the orientation interpolated from 2 input orientations.
+Example:
+var o1=Orient.new(), o2=Orient.new(), o3=Orient.new();
+o2.rotate3(0,Math.pi/2,0);
+o3.between2(o1,o2,0); // o3 equals o2
+o3.between2(o1,o2,1); // o3 equals o1
+o3.between2(o1,o2,0.5); // o3 is halfway between o1 and o2
+]]></description>
 			<arguments>
 				<argument type="Orient"/>
@@ -2415,4 +2888,11 @@
 		</element>
 		<element name="betweenOV" function="true" type="void">
+			<description><![CDATA[Like between2(), but the second Orient is composed of the supplied XYZ vector (X component) and Y Z vectors from the calling object.
+Example:
+var o=Orient.new();
+o.betweenOV(o,(0,1,0),1); //no change, o remains 100 010 001
+o.betweenOV(o,(0,1,0),0.9); //o is slightly rotated towards (0,1,0)
+o.betweenOV(o,(0,1,0),0); //o is completely transformed, o.x=(0,1,0)
+]]></description>
 			<arguments>
 				<argument type="Orient"/>
@@ -2435,4 +2915,9 @@
 		</element>
 		<element name="new" function="true" type="Orient"><arguments/></element>
+		<element name="newFromVector" function="true" type="Orient">
+			<arguments>
+				<argument type="Vector"/>
+			</arguments>
+		</element>
 		<element name="normalize" function="true" type="void"><arguments/></element>
 		<element name="reset" function="true" type="void"><arguments/></element>
@@ -2468,13 +2953,17 @@
 	<type name="Part" context="Global context">
 		<element name="as" type="float" min="0" max="1" default="0.25"/>
-		<element name="dn" type="float" min="0.2" max="5" default="1"/>
+		<element name="dn" type="float" min="0.2" max="5" default="1.0"/>
 		<element name="fr" type="float" min="0" max="4" default="0.4"/>
 		<element name="i" type="string"/>
 		<element name="ing" type="float" min="0" max="1" default="0.25"/>
-		<element name="m" type="float" min="0.1" max="999" default="1"/>
+		<element name="m" type="float" min="0.1" max="999" default="1.0"/>
 		<element name="rx" type="float"/>
 		<element name="ry" type="float"/>
 		<element name="rz" type="float"/>
-		<element name="s" type="float" min="0.1" max="10" default="1"/>
+		<element name="s" type="float" min="0.1" max="10" default="1.0"/>
+		<element name="vb" type="float" min="0" max="1" default="0.5"/>
+		<element name="vg" type="float" min="0" max="1" default="0.5"/>
+		<element name="vr" type="float" min="0" max="1" default="0.5"/>
+		<element name="vs" type="float" min="0.05" max="0.7" default="0.2"/>
 		<element name="Vstyle" type="string"/>
 		<element name="x" type="float"/>
@@ -2493,13 +2982,13 @@
 			<description><![CDATA[Do creatures die when no energy?]]></description>
 		</element>
-		<element name="em_dyn" type="float" min="0" max="1" default="0">
+		<element name="em_dyn" type="float" min="0" max="1" default="0.0">
 			<description><![CDATA[Energy requirements for a muscle
 moving a stick]]></description>
 		</element>
-		<element name="em_stat" type="float" min="0" max="1" default="0">
+		<element name="em_stat" type="float" min="0" max="1" default="0.0">
 			<description><![CDATA[Energy requirements for a muscle
 resisting an external force]]></description>
 		</element>
-		<element name="en_assim" type="float" min="0" max="1" default="0">
+		<element name="en_assim" type="float" min="0" max="1" default="0.0">
 			<description><![CDATA[Maximal energy gain produced by a vertical specialized stick.
 Horizontal specialized sticks get half of this value.]]></description>
@@ -2562,15 +3051,26 @@
 			<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>
 		</element>
-		<element name="createFromGeno" function="true" type="Creature">
-			<description><![CDATA[Uses the supplied Geno object]]></description>
+		<element name="clear" function="true" type="void">
+			<description><![CDATA[Delete all creatures]]></description>
+<arguments/></element>
+		<element name="create" function="true" type="Creature">
+			<arguments>
+				<argument name="genotype object or geno object or string genotype" type="untyped"/>
+			</arguments>
+		</element>
+		<element name="createFromGeno" function="true" type="Creature" deprecated="true">
+			<description><![CDATA[Uses the supplied Geno object.
+Deprecated. Use the more universal create() function.]]></description>
 			<arguments>
 				<argument type="Geno"/>
 			</arguments>
 		</element>
-		<element name="createFromGenotype" function="true" type="Creature">
-			<description><![CDATA[Uses the selected Genotype object]]></description>
+		<element name="createFromGenotype" function="true" type="Creature" deprecated="true">
+			<description><![CDATA[Uses the selected Genotype object.
+Deprecated. Use the more universal create() function.]]></description>
 <arguments/></element>
-		<element name="createFromString" function="true" type="Creature">
-			<description><![CDATA[Uses the supplied string argument]]></description>
+		<element name="createFromString" function="true" type="Creature" deprecated="true">
+			<description><![CDATA[Uses the supplied string argument.
+Deprecated. Use the more universal create() function.]]></description>
 			<arguments>
 				<argument name="genotype" type="string"/>
@@ -2580,5 +3080,5 @@
 			<description><![CDATA[delete creature]]></description>
 			<arguments>
-				<argument name="creature index" type="integer"/>
+				<argument name="creature object or index" type="untyped"/>
 			</arguments>
 		</element>
@@ -2602,5 +3102,5 @@
 			<description><![CDATA[kill creature]]></description>
 			<arguments>
-				<argument name="creature index" type="integer"/>
+				<argument name="creature object or index" type="integer"/>
 			</arguments>
 		</element>
@@ -2628,11 +3128,26 @@
 	</type>
 	<type name="Populations" context="Global context">
-<description><![CDATA[Manages all Creature objects in the experiment, organized in one or more groups. See also: Creature, Population.]]></description>
-		<element name="creature" type="integer"/>
-		<element name="group" type="integer">
-			<description><![CDATA[Index of the currently selected group (Population).]]></description>
+<description><![CDATA[Manages all Creature objects in the experiment, organized in one or more groups.
+Before version 4.0rc4 some operations could only be performed on the "selected" creature (the one pointed to by group/create fields in Populations). Currently, the more convenient and recommended way is to call Creatures's functions that operate directly on the passed objects.
+
+// The old way:
+Populations.group=0;
+Populations.creature=0;
+GenePools.getFromCreature();
+GenePools.copyTo(0);
+
+// Doing the same the new way:
+Genotype.newFromCreature(Populations[0][0]).moveTo(GenePools[0]);
+
+See also: Creature, Population.]]></description>
+		<element name="creature" type="integer" deprecated="true">
+			<description><![CDATA[Deprecated. Pass creature object to functions needing it, instead of the old "first select, then call" approach.]]></description>
+		</element>
+		<element name="group" type="integer" deprecated="true">
+			<description><![CDATA[Index of the currently selected group (Population).
+Deprecated. Pass creature object to functions needing it, instead of the old "first select, then call" approach.]]></description>
 		</element>
 		<element name="size" type="integer"/>
-		<element name="addGroup" function="true" type="void">
+		<element name="addGroup" function="true" type="Population">
 			<description><![CDATA[Adds a new population.]]></description>
 			<arguments>
@@ -2643,20 +3158,23 @@
 			<description><![CDATA[Removes all populations except the first one.]]></description>
 <arguments/></element>
-		<element name="clearGroup" function="true" type="void">
+		<element name="clearGroup" function="true" type="void" deprecated="true">
+			<description><![CDATA[Deprecated.
+Use Populations[pop_index].clear() instead of Populations.clearGroup(pop_index); ]]></description>
 			<arguments>
 				<argument name="index" type="integer"/>
 			</arguments>
 		</element>
-		<element name="creatBBCollisions" function="true" type="integer">
+		<element name="creatBBCollisions" function="true" type="integer" deprecated="true">
 			<description><![CDATA[Checks approximate collisions for the selected creature.
-Returns 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>
+Returns 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).
+Deprecated. Use Creature.boundingBoxCollisions()]]></description>
 			<arguments>
 				<argument name="mask" type="integer"/>
 			</arguments>
 		</element>
-		<element name="createFromGenotype" function="true" type="Creature">
+		<element name="createFromGenotype" function="true" type="Creature" deprecated="true">
 			<description><![CDATA[Uses the selected Genotype object.]]></description>
 <arguments/></element>
-		<element name="createFromString" function="true" type="Creature">
+		<element name="createFromString" function="true" type="Creature" deprecated="true">
 			<description><![CDATA[Uses the supplied string argument.]]></description>
 			<arguments>
@@ -2670,5 +3188,5 @@
 			</arguments>
 		</element>
-		<element name="deleteSelected" function="true" type="void">
+		<element name="deleteSelected" function="true" type="void" deprecated="true">
 			<description><![CDATA[Applies to the selected Creature.]]></description>
 <arguments/></element>
@@ -2684,5 +3202,5 @@
 			</arguments>
 		</element>
-		<element name="killSelected" function="true" type="void">
+		<element name="killSelected" function="true" type="void" deprecated="true">
 			<description><![CDATA[Applies to the selected Creature.]]></description>
 <arguments/></element>
@@ -2751,11 +3269,11 @@
 Creating: Use "add" in Creature.signals, Neuro.signals, or World.signals.]]></description>
 		<element name="channel" type="string">
-			<description><![CDATA[Channel name, readonly.]]></description>
+			<description><![CDATA[Channel name, read-only.]]></description>
 		</element>
 		<element name="flavor" type="float">
-			<description><![CDATA[Signal flavor is can be used to differentiate between signals in a single channel. ]]></description>
+			<description><![CDATA[Signal flavor can be used to differentiate between signals in a single channel.]]></description>
 		</element>
 		<element name="pos" type="XYZ">
-			<description><![CDATA[Signal position, readonly.]]></description>
+			<description><![CDATA[Signal position, read-only.]]></description>
 		</element>
 		<element name="power" type="float">
@@ -2763,8 +3281,8 @@
 		</element>
 		<element name="value" type="untyped">
-			<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>
+			<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 functions receive() and receiveFilter() ignore this attribute.]]></description>
 		</element>
 		<element name="remove" function="true">
-			<description><![CDATA[Deletes the signal]]></description>
+			<description><![CDATA[Deletes the signal.]]></description>
 		</element>
 	</type>
@@ -2814,20 +3332,94 @@
 	<type name="sim_params" context="Global context">
 <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>
+		<element name="aging" type="integer" min="0" max="100000">
+			<description><![CDATA[Idle metabolism doubles after this period (0 disables aging)]]></description>
+		</element>
 		<element name="autosaveperiod" type="integer" min="0" max="100000">
 			<description><![CDATA[Save simulation state once every n-th event
 (events are defined by the script. For 'standard.expdef' it is after each death).
-Save EXPT file first to initialize name for autosave files.]]></description>
-		</element>
-		<element name="bnoise_struct" type="float" min="0" max="10" default="0">
+Save EXPT file first to initialize name for autosave files.
+Slave simulators (in multithreaded experiments) ignore this setting and never create autosave files.]]></description>
+		</element>
+		<element name="bnoise_struct" type="float" min="0" max="10" default="0.0">
 			<description><![CDATA[When >0, body constructs of creatures (position of Parts) will be randomly disturbed when they are created.]]></description>
 		</element>
-		<element name="bnoise_vel" type="float" min="0" max="10" default="0">
+		<element name="bnoise_vel" type="float" min="0" max="10" default="0.0">
 			<description><![CDATA[Random velocities will be applied to all body Parts (in MechaStick) or rigid segments (in ODE) of newly created creatures.]]></description>
+		</element>
+		<element name="boostphase" type="integer" min="0" max="1" default="1">
+			<description><![CDATA[After stagnation has been detected, switches negative selection to "delete worst", doubles "multiple evaluation" and starts another stagnation detection phase.
+"Delete worst" results in extremely quick convergence and high selection pressure, similarly to "local search" optimization techniques.]]></description>
+		</element>
+		<element name="capacity" type="integer" min="0" max="10000">
+			<description><![CDATA[]]></description>
 		</element>
 		<element name="changedProperty" type="integer"/>
 		<element name="changedPropertyId" type="string"/>
+		<element name="cpus" type="integer"/>
+		<element name="cr_c" type="float" min="-10000" max="10000">
+			<description><![CDATA[Constant value added to total fitness]]></description>
+		</element>
+		<element name="cr_di" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of distance in total fitness]]></description>
+		</element>
+		<element name="cr_gl" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of body size (number of parts) in total fitness]]></description>
+		</element>
+		<element name="cr_joints" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of structure size (number of joints) in total fitness]]></description>
+		</element>
+		<element name="cr_life" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of life span in total fitness]]></description>
+		</element>
+		<element name="cr_nncon" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of brain connections in total fitness]]></description>
+		</element>
+		<element name="cr_nnsiz" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of brain size (number of neurons) in total fitness]]></description>
+		</element>
+		<element name="cr_norm" type="integer" min="0" max="1">
+			<description><![CDATA[Normalize each criterion to 0..1 interval before weighting]]></description>
+		</element>
+		<element name="cr_simi" type="integer" min="0" max="1">
+			<description><![CDATA[If enabled, fitness of each genotype will be reduced by its phenotypic similarity to all other genotypes in the gene pool]]></description>
+		</element>
+		<element name="cr_v" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of horizontal velocity in total fitness]]></description>
+		</element>
+		<element name="cr_vpos" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of vertical position in total fitness]]></description>
+		</element>
+		<element name="cr_vvel" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of vertical velocity in total fitness]]></description>
+		</element>
 		<element name="createrr" type="integer" min="0" max="2" default="1"/>
+		<element name="creath" type="float" min="-1" max="50">
+			<description><![CDATA[Vertical position (above the surface) where newborn creatures are placed.
+Negative values are only used in the water area:
+  0   = at the surface
+-0.5 = half depth
+-1   = just above the bottom]]></description>
+		</element>
+		<element name="creaturesgrouploaded" type="integer">
+			<description><![CDATA[]]></description>
+		</element>
 		<element name="creatwarnfail" type="integer" min="0" max="1">
 			<description><![CDATA[Creatures grown with warnings will not be simulated.]]></description>
+		</element>
+		<element name="delrule" type="integer" min="0" max="2">
+			<description><![CDATA[Negative selection: which genotypes should be removed when we need room for new genotypes in the gene pool]]></description>
+		</element>
+		<element name="e_meta" type="float" min="0" max="1">
+			<description><![CDATA[Each stick consumes this amount of energy in one time step]]></description>
+		</element>
+		<element name="Energy0" type="float" min="0" max="10000">
+			<description><![CDATA[Base starting energy level (for each stick)]]></description>
+		</element>
+		<element name="evalcount" type="integer" min="0" max="1000" default="0">
+			<description><![CDATA[If more than zero:
+- each genotype will be evaluated many times
+- fitness will be averaged
+- fitness standard deviation will be stored in the 'user1' field of a genotype
+- there will be no "Unchanged" genotypes ("Unchanged" value is considered zero).]]></description>
 		</element>
 		<element name="expdef" type="string">
@@ -2840,35 +3432,46 @@
 		<element name="expdef_info" type="string"/>
 		<element name="expdef_title" type="string"/>
-		<element name="f0_c_del" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_c_new" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_c_wei" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_del" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_new" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_rsf" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_stf" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_j_stm" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_n_del" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_n_new" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_n_prp" type="float" min="0" max="100" default="10">
+		<element name="expparams" type="ExpParams"/>
+		<element name="expstate" type="ExpState"/>
+		<element name="f0_c_del" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_c_new" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_c_wei" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_del" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_new" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_rsf" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_stf" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_stm" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_vblu" type="float" min="0" max="100" default="0.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_vgrn" type="float" min="0" max="100" default="0.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_j_vred" type="float" min="0" max="100" default="0.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_n_del" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_n_new" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_n_prp" type="float" min="0" max="100" default="10.0">
 			<description><![CDATA[]]></description>
 		</element>
@@ -2883,31 +3486,34 @@
 The i="mi=md" combination is allowed.]]></description>
 		</element>
-		<element name="f0_p_asm" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_del" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_frc" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_ing" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_mas" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_new" type="float" min="0" max="100" default="5">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_pos" type="float" min="0" max="100" default="10">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="f0_p_swp" type="float" min="0" max="100" default="10">
+		<element name="f0_p_asm" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_del" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_frc" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_ing" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_mas" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_new" type="float" min="0" max="100" default="5.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_pos" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_swp" type="float" min="0" max="100" default="10.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="f0_p_vsiz" type="float" min="0" max="100" default="0.0">
 			<description><![CDATA[]]></description>
 		</element>
 		<element name="f1_mut_exmod" type="string">
 			<description><![CDATA[Modifiers that will not be added nor deleted during mutation
-(all: RrLlAaCcFfMmSsIiQqWwEe)]]></description>
+(all: LlRrCcQqFfMmIiWwEeAaSsDdGgBbHh)]]></description>
 		</element>
 		<element name="f1_nmConn" type="float" min="0" max="100" default="0.1">
@@ -2921,9 +3527,9 @@
 		</element>
 		<element name="f1_nmVal" type="float" min="0" max="100" default="0.05"/>
-		<element name="f1_nmWei" type="float" min="0" max="100" default="1"/>
+		<element name="f1_nmWei" type="float" min="0" max="100" default="1.0"/>
 		<element name="f1_smComma" type="float" min="0" max="100" default="0.02"/>
 		<element name="f1_smJunct" type="float" min="0" max="100" default="0.02"/>
 		<element name="f1_smModif" type="float" min="0" max="100" default="0.1">
-			<description><![CDATA[Modifiers: RrLlAaCcFfMmSsIiQqWwEe]]></description>
+			<description><![CDATA[Modifiers: LlRrCcQqFfMmIiWwEeAaSsDdGgBbHh]]></description>
 		</element>
 		<element name="f1_smX" type="float" min="0" max="100" default="0.05"/>
@@ -2983,30 +3589,47 @@
 			<description><![CDATA[]]></description>
 		</element>
-		<element name="f4_mut_add" type="float" min="0" max="100" default="50">
+		<element name="f4_mut_add" type="float" min="0" max="100" default="50.0">
 			<description><![CDATA[mutation: probability of adding a node]]></description>
 		</element>
-		<element name="f4_mut_add_conn" type="float" min="0" max="100" default="15">
+		<element name="f4_mut_add_conn" type="float" min="0" max="100" default="15.0">
 			<description><![CDATA[add node mutation: probability of adding a neural connection]]></description>
 		</element>
-		<element name="f4_mut_add_div" type="float" min="0" max="100" default="20">
+		<element name="f4_mut_add_div" type="float" min="0" max="100" default="20.0">
 			<description><![CDATA[add node mutation: probability of adding a division]]></description>
 		</element>
-		<element name="f4_mut_add_neupar" type="float" min="0" max="100" default="5">
+		<element name="f4_mut_add_neupar" type="float" min="0" max="100" default="5.0">
 			<description><![CDATA[add node mutation: probability of adding a neuron property/modifier]]></description>
 		</element>
-		<element name="f4_mut_add_rep" type="float" min="0" max="100" default="10">
+		<element name="f4_mut_add_rep" type="float" min="0" max="100" default="10.0">
 			<description><![CDATA[add node mutation: probability of adding a repetition]]></description>
 		</element>
-		<element name="f4_mut_add_simp" type="float" min="0" max="100" default="50">
+		<element name="f4_mut_add_simp" type="float" min="0" max="100" default="50.0">
 			<description><![CDATA[add node mutation: probability of adding a random, simple gene]]></description>
 		</element>
-		<element name="f4_mut_del" type="float" min="0" max="100" default="20">
+		<element name="f4_mut_del" type="float" min="0" max="100" default="20.0">
 			<description><![CDATA[mutation: probability of deleting a node]]></description>
 		</element>
-		<element name="f4_mut_mod" type="float" min="0" max="100" default="30">
+		<element name="f4_mut_mod" type="float" min="0" max="100" default="30.0">
 			<description><![CDATA[mutation: probability of changing a node]]></description>
+		</element>
+		<element name="feed" type="integer" min="0" max="100">
+			<description><![CDATA[Number of energy pieces in the world]]></description>
+		</element>
+		<element name="feede0" type="float" min="0" max="1000">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="feedtrans" type="float" min="0" max="100">
+			<description><![CDATA[]]></description>
 		</element>
 		<element name="filecomm" type="integer" min="0" max="1" default="1">
 			<description><![CDATA[Display comments encountered in opened files]]></description>
+		</element>
+		<element name="foodgen" type="string">
+			<description><![CDATA[The default food model is a simple, single part object:
+  //0
+  m:Vstyle=food
+  p:
+(this genotype is used when you leave this field blank).
+You can specify another genotype to create "intelligent" or mobile food.]]></description>
 		</element>
 		<element name="gen_extmutinfo" type="integer" min="0" max="2" default="0">
@@ -3020,4 +3643,5 @@
 			<description><![CDATA[Required for phylogenetic analysis]]></description>
 		</element>
+		<element name="genepools" type="GenePools"/>
 		<element name="genkonw0" type="integer" min="0" max="1">
 			<description><![CDATA[]]></description>
@@ -3032,5 +3656,7 @@
 			<description><![CDATA[]]></description>
 		</element>
-		<element name="genolib" type="GenePools"/>
+		<element name="genkonw4" type="integer" min="0" max="1">
+			<description><![CDATA[]]></description>
+		</element>
 		<element name="genoper_f0" type="integer" min="0" max="0">
 			<description><![CDATA[]]></description>
@@ -3049,9 +3675,31 @@
 		</element>
 		<element name="groupchk" type="integer" min="0" max="1"/>
+		<element name="identity" type="integer">
+			<description><![CDATA[-1 for master simulator, 0...count-1 for slaves]]></description>
+		</element>
 		<element name="importchk" type="integer" min="0" max="1"/>
-		<element name="livelib" type="Populations"/>
+		<element name="initialgen" type="string">
+			<description><![CDATA[The gene pool will be replaced with the supplied genotype when the experiment begins.
+Use the empty initial genotype if you want to preserve the current gene pool.]]></description>
+		</element>
+		<element name="lastCheckpoint" type="untyped">
+			<description><![CDATA[Most recently reported by the experiment definition script.]]></description>
+		</element>
 		<element name="loadchk" type="integer" min="0" max="1"/>
-		<element name="maxjoint" type="float" min="0" max="100" default="2"/>
-		<element name="minjoint" type="float" min="0" max="100" default="0"/>
+		<element name="log" type="integer" min="0" max="5">
+			<description><![CDATA[Sends [LOG] messages with genotypes count and minimal, average and best gene pool fitness, which can be used to produce graphs by external tools like gnuplot or Excel.
+It also sends the [LOGTITLE] message on experiment initialization, which summarizes most important parameters of your experiment. It can be used as a graph title.]]></description>
+		</element>
+		<element name="makesound" type="integer" min="0" max="1" default="0">
+			<description><![CDATA[Emit sounds on improvements? (frequency depends on the magnitude of improvement)]]></description>
+		</element>
+		<element name="MaxCreated" type="integer" min="0" max="50">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="maxjoint" type="float" min="0" max="100" default="2.0"/>
+		<element name="minfitness" type="float">
+			<description><![CDATA[Minimal fitness that allows to automatically stop evolution when stagnation detected]]></description>
+		</element>
+		<element name="minjoint" type="float" min="0" max="100" default="0.0"/>
 		<element name="neuadd_N" type="integer" min="0" max="1">
 			<description><![CDATA[Standard neuron
@@ -3121,5 +3769,5 @@
 ]]></description>
 		</element>
-		<element name="neuadd_*" type="integer" min="0" max="1">
+		<element name="neuadd_Constant" type="integer" min="0" max="1">
 			<description><![CDATA[Constant value
 
@@ -3130,5 +3778,5 @@
 ]]></description>
 		</element>
-		<element name="neuadd_|" type="integer" min="0" max="1">
+		<element name="neuadd_Bend_muscle" type="integer" min="0" max="1">
 			<description><![CDATA[Characteristics:
    uses single input
@@ -3141,5 +3789,5 @@
    bending range (r) float 0..1]]></description>
 		</element>
-		<element name="neuadd_@" type="integer" min="0" max="1">
+		<element name="neuadd_Rotation_muscle" type="integer" min="0" max="1">
 			<description><![CDATA[Characteristics:
    uses single input
@@ -3300,4 +3948,231 @@
    time (t) float 0..6.28319]]></description>
 		</element>
+		<element name="neuadd_Mzm" type="integer" min="0" max="1">
+			<description><![CDATA[Helps framstick navigate through a maze. This acts as a memory of already visited places. Returns 1 if the framstick has already visited current block, 0 otherwise. The memory is not volatile.
+
+Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="neuadd_OThr" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   does not provide output value
+   should be located on a Joint
+]]></description>
+		</element>
+		<element name="neuadd_SeeLight" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+
+
+Properties:
+    (flavor) float 0..4]]></description>
+		</element>
+		<element name="neuadd_Linb" type="integer" min="0" max="1">
+			<description><![CDATA[output=input(bez sumowania)
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="neuadd_Delay" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   delay time (in steps) (t) integer 1..1000]]></description>
+		</element>
+		<element name="neuadd_ntest" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   provides output value
+   should be located on a Joint
+]]></description>
+		</element>
+		<element name="neuadd_WarnLR" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="neuadd_SeeLight2" type="integer" min="0" max="1">
+			<description><![CDATA[Returns the average signal intensity of all nearby transmitters. Unlike "SeeLight", signals do not attenuate over distance (however, the maximal signal distance is limited by the "range" parameter).
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+
+
+Properties:
+    (range) float 0..100]]></description>
+		</element>
+		<element name="neuadd_FeelInjury" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="neuadd_PIDV" type="integer" min="0" max="1">
+			<description><![CDATA[PID Regulator (velocity/incremental form)
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   K (k) float 0.01..100
+   Ti (ti) float 0.01..100
+   Td (td) float 0.01..100]]></description>
+		</element>
+		<element name="neuadd_Lin" type="integer" min="0" max="1">
+			<description><![CDATA[output=input
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="neuadd_WarnDD" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="neuadd_Sf" type="integer" min="0" max="1">
+			<description><![CDATA[Detects only food, not other creatures
+(in experiments with food in group #1)
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="neuadd_Nn" type="integer" min="0" max="1">
+			<description><![CDATA[Propagates weighted inputs onto the output, but occassionally generates a random value
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Error rate (e) float 0..0.1]]></description>
+		</element>
+		<element name="neuadd_Rdr" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   does not provide output value
+   does not require location in body
+
+
+Properties:
+    ()]]></description>
+		</element>
+		<element name="neuadd_WarnDist" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="neuadd_Cmp" type="integer" min="0" max="1">
+			<description><![CDATA[Helps framstick navigate through a maze. Output returns 1 if there is a free space in the direction where the joint to which the neuron is attahced points, 0 otherwise. NOTE: This neuron *must* be attached to a *joint*.
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="neuadd_Light" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   should be located on a Part
+
+
+Properties:
+    (flavor) float 0..4]]></description>
+		</element>
+		<element name="neuadd_Thr" type="integer" min="0" max="1">
+			<description><![CDATA[if (input>=t) then output=hi else output=lo
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   threshold (t) float
+   low output value (lo) float
+   high output value (hi) float]]></description>
+		</element>
+		<element name="neuadd_PIDP" type="integer" min="0" max="1">
+			<description><![CDATA[PID Regulator (positional/full value form)
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   K (k) float 0.01..100
+   Ti (ti) float 0.01..100
+   Td (td) float 0.01..100]]></description>
+		</element>
+		<element name="neuadd_ptest" type="integer" min="0" max="1">
+			<description><![CDATA[different parameter datatypes
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   first integer (i1) integer
+   first float (f1) float
+   first string (s1) string
+   second integer (i2) integer
+   second float (f2) float
+   second string (s2) string]]></description>
+		</element>
+		<element name="neuadd_FF" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   should be located on a Part
+]]></description>
+		</element>
 		<element name="ncl_N" type="integer" min="0" max="1">
 			<description><![CDATA[Standard neuron
@@ -3367,5 +4242,5 @@
 ]]></description>
 		</element>
-		<element name="ncl_*" type="integer" min="0" max="1">
+		<element name="ncl_Constant" type="integer" min="0" max="1">
 			<description><![CDATA[Constant value
 
@@ -3376,5 +4251,5 @@
 ]]></description>
 		</element>
-		<element name="ncl_|" type="integer" min="0" max="1">
+		<element name="ncl_Bend_muscle" type="integer" min="0" max="1">
 			<description><![CDATA[Characteristics:
    uses single input
@@ -3387,5 +4262,5 @@
    bending range (r) float 0..1]]></description>
 		</element>
-		<element name="ncl_@" type="integer" min="0" max="1">
+		<element name="ncl_Rotation_muscle" type="integer" min="0" max="1">
 			<description><![CDATA[Characteristics:
    uses single input
@@ -3546,6 +4421,240 @@
    time (t) float 0..6.28319]]></description>
 		</element>
-		<element name="nnspeed" type="float" min="0" max="1000" default="1">
+		<element name="ncl_Mzm" type="integer" min="0" max="1">
+			<description><![CDATA[Helps framstick navigate through a maze. This acts as a memory of already visited places. Returns 1 if the framstick has already visited current block, 0 otherwise. The memory is not volatile.
+
+Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="ncl_OThr" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   does not provide output value
+   should be located on a Joint
+]]></description>
+		</element>
+		<element name="ncl_SeeLight" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+
+
+Properties:
+    (flavor) float 0..4]]></description>
+		</element>
+		<element name="ncl_Linb" type="integer" min="0" max="1">
+			<description><![CDATA[output=input(bez sumowania)
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="ncl_Delay" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   delay time (in steps) (t) integer 1..1000]]></description>
+		</element>
+		<element name="ncl_ntest" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   provides output value
+   should be located on a Joint
+]]></description>
+		</element>
+		<element name="ncl_WarnLR" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="ncl_SeeLight2" type="integer" min="0" max="1">
+			<description><![CDATA[Returns the average signal intensity of all nearby transmitters. Unlike "SeeLight", signals do not attenuate over distance (however, the maximal signal distance is limited by the "range" parameter).
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+
+
+Properties:
+    (range) float 0..100]]></description>
+		</element>
+		<element name="ncl_FeelInjury" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="ncl_PIDV" type="integer" min="0" max="1">
+			<description><![CDATA[PID Regulator (velocity/incremental form)
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   K (k) float 0.01..100
+   Ti (ti) float 0.01..100
+   Td (td) float 0.01..100]]></description>
+		</element>
+		<element name="ncl_Lin" type="integer" min="0" max="1">
+			<description><![CDATA[output=input
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+]]></description>
+		</element>
+		<element name="ncl_WarnDD" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="ncl_Sf" type="integer" min="0" max="1">
+			<description><![CDATA[Detects only food, not other creatures
+(in experiments with food in group #1)
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="ncl_Nn" type="integer" min="0" max="1">
+			<description><![CDATA[Propagates weighted inputs onto the output, but occassionally generates a random value
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Error rate (e) float 0..0.1]]></description>
+		</element>
+		<element name="ncl_Rdr" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   uses single input
+   does not provide output value
+   does not require location in body
+
+
+Properties:
+    ()]]></description>
+		</element>
+		<element name="ncl_WarnDist" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   does not use inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   Maximum distance signal is sensed  (maxDist) float 1..1000]]></description>
+		</element>
+		<element name="ncl_Cmp" type="integer" min="0" max="1">
+			<description><![CDATA[Helps framstick navigate through a maze. Output returns 1 if there is a free space in the direction where the joint to which the neuron is attahced points, 0 otherwise. NOTE: This neuron *must* be attached to a *joint*.
+
+Characteristics:
+   does not use inputs
+   provides output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="ncl_Light" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   should be located on a Part
+
+
+Properties:
+    (flavor) float 0..4]]></description>
+		</element>
+		<element name="ncl_Thr" type="integer" min="0" max="1">
+			<description><![CDATA[if (input>=t) then output=hi else output=lo
+
+Characteristics:
+   supports any number of inputs
+   provides output value
+   does not require location in body
+
+
+Properties:
+   threshold (t) float
+   low output value (lo) float
+   high output value (hi) float]]></description>
+		</element>
+		<element name="ncl_PIDP" type="integer" min="0" max="1">
+			<description><![CDATA[PID Regulator (positional/full value form)
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   K (k) float 0.01..100
+   Ti (ti) float 0.01..100
+   Td (td) float 0.01..100]]></description>
+		</element>
+		<element name="ncl_ptest" type="integer" min="0" max="1">
+			<description><![CDATA[different parameter datatypes
+
+Characteristics:
+   uses single input
+   provides output value
+   does not require location in body
+
+
+Properties:
+   first integer (i1) integer
+   first float (f1) float
+   first string (s1) string
+   second integer (i2) integer
+   second float (f2) float
+   second string (s2) string]]></description>
+		</element>
+		<element name="ncl_FF" type="integer" min="0" max="1">
+			<description><![CDATA[Characteristics:
+   supports any number of inputs
+   does not provide output value
+   should be located on a Part
+]]></description>
+		</element>
+		<element name="nnoise" type="float" min="0" max="1" default="0.0">
+			<description><![CDATA[Gaussian neural noise: a random value is added to each neural output in each simulation step. Set standard deviation here to add random noise, or 0 for deterministic simulation.]]></description>
+		</element>
+		<element name="nnspeed" type="float" min="0" max="1000" default="1.0">
 			<description><![CDATA[Number of neural network simulation steps in each physics simulation step]]></description>
+		</element>
+		<element name="notes" type="string">
+			<description><![CDATA[You can write anything here
+(it will be saved to the experiment file)]]></description>
 		</element>
 		<element name="odeairdrag" type="float" min="0" max="0.5" default="0.01">
@@ -3554,5 +4663,5 @@
 		<element name="odecol2bounce" type="float" min="0" max="1" default="0.1"/>
 		<element name="odecol2bouncevel" type="float" min="0" max="1" default="0.01"/>
-		<element name="odecol2mumax" type="float" min="0" max="10" default="1">
+		<element name="odecol2mumax" type="float" min="0" max="10" default="1.0">
 			<description><![CDATA[Mu coefficient for Parts with maximal friction (i.e. "FFFFF" in f1)]]></description>
 		</element>
@@ -3560,9 +4669,9 @@
 			<description><![CDATA[Mu coefficient for Parts with minimal friction (i.e. "fffff" in f1)]]></description>
 		</element>
-		<element name="odecol2softcfm" type="float" min="0" max="1" default="0"/>
-		<element name="odecol2softerp" type="float" min="0" max="1" default="0"/>
+		<element name="odecol2softcfm" type="float" min="0" max="1" default="0.0"/>
+		<element name="odecol2softerp" type="float" min="0" max="1" default="0.0"/>
 		<element name="odecolbounce" type="float" min="0" max="1" default="0.1"/>
 		<element name="odecolbouncevel" type="float" min="0" max="1" default="0.01"/>
-		<element name="odecolmumax" type="float" min="0" max="10" default="5">
+		<element name="odecolmumax" type="float" min="0" max="10" default="5.0">
 			<description><![CDATA[Mu coefficient for Parts with maximal friction (i.e. "FFFFF" in f1)]]></description>
 		</element>
@@ -3570,20 +4679,20 @@
 			<description><![CDATA[Mu coefficient for Parts with minimal friction (i.e. "fffff" in f1)]]></description>
 		</element>
-		<element name="odecolsoftcfm" type="float" min="0" max="1" default="0"/>
-		<element name="odecolsofterp" type="float" min="0" max="1" default="0"/>
-		<element name="odemusclemax" type="float" min="0" max="100" default="10">
+		<element name="odecolsoftcfm" type="float" min="0" max="1" default="0.0"/>
+		<element name="odecolsofterp" type="float" min="0" max="1" default="0.0"/>
+		<element name="odemusclemax" type="float" min="0" max="100" default="10.0">
 			<description><![CDATA[i.e. "MMMMM" if f1]]></description>
 		</element>
-		<element name="odemusclemin" type="float" min="0" max="100" default="0">
+		<element name="odemusclemin" type="float" min="0" max="100" default="0.0">
 			<description><![CDATA[i.e. "mmmmm" in f1]]></description>
 		</element>
-		<element name="odemusclespeed" type="float" min="0" max="10" default="1">
+		<element name="odemusclespeed" type="float" min="0" max="10" default="1.0">
 			<description><![CDATA[Muscle state cannot change faster than the supplied value]]></description>
 		</element>
 		<element name="odeseed" type="integer" min="0" max="2">
 			<description><![CDATA[Affects collisions.
-- 'Truly random' is closest to the standard ODE operation. Use Math.seed to influence randomness in ODE collisions
-- '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'
-- 'Fixed' is completely deterministic and does not depend on Math.seed. This might negatively affect ODE accuracy
+- 'Truly random' is closest to the standard ODE operation. Use Math.seed to influence randomness in ODE collisions.
+- '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'.
+- 'Fixed' is completely deterministic and does not depend on Math.seed - the same seed value is set before each step. This might negatively affect ODE accuracy.
 ]]></description>
 		</element>
@@ -3593,5 +4702,5 @@
 		<element name="odeshape" type="integer" min="0" max="1"/>
 		<element name="odestep" type="float" min="0.001" max="1" default="0.05"/>
-		<element name="odewaterbuoy" type="float" min="0" max="2" default="1"/>
+		<element name="odewaterbuoy" type="float" min="0" max="2" default="1.0"/>
 		<element name="odewaterdrag" type="float" min="0.001" max="1" default="0.5"/>
 		<element name="odeworldcfm" type="float" min="0" max="1" default="1e-05">
@@ -3604,13 +4713,35 @@
 			<description><![CDATA[Overwite existing files or create their backups]]></description>
 		</element>
+		<element name="p_mut" type="float" min="0" max="100">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="p_nop" type="float" min="0" max="100">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="p_xov" type="float" min="0" max="100">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="placement" type="integer" min="0" max="1">
+			<description><![CDATA[For 'Central' placement, newborn creatures are placed at the world center, if possible.]]></description>
+		</element>
+		<element name="populations" type="Populations"/>
 		<element name="randinit" type="float" min="0" max="10" default="0.01">
-			<description><![CDATA[Allowed range for initializing all neuron states with uniform distribution random numbers and zero mean. Set 0 for deterministic initialization.]]></description>
+			<description><![CDATA[Allowed range for initializing all neuron states with uniform distribution random numbers and zero mean. Set to 0 for deterministic initialization.]]></description>
 		</element>
 		<element name="resetonexpdef" type="integer" min="0" max="1" default="1">
 			<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.
-When turned off: parameters from previous experiment definition will remain.]]></description>
+If turned off: parameters from previous experiment definition will remain (dangerous).]]></description>
+		</element>
+		<element name="rotation" type="integer" min="0" max="4">
+			<description><![CDATA[Initial heading of newborn creatures]]></description>
 		</element>
 		<element name="running" type="integer" min="0" max="1">
-			<description><![CDATA[for synchronizing the user interface state]]></description>
+			<description><![CDATA[useful for synchronizing the user interface state]]></description>
+		</element>
+		<element name="savebest" type="integer" min="0" max="3">
+			<description><![CDATA[Saves (on each improvement) best found genotype or a complete experiment state to a file in scripts_output subdirectory.]]></description>
+		</element>
+		<element name="selrule" type="integer" min="0" max="5">
+			<description><![CDATA[Positive selection: how to choose genotypes for cloning/mutation/crossover]]></description>
 		</element>
 		<element name="signals" type="WorldSignals"/>
@@ -3621,8 +4752,8 @@
 			<description><![CDATA[]]></description>
 		</element>
-		<element name="simil_partdeg" type="float" min="0" max="100" default="1">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="simil_parts" type="float" min="0" max="100" default="0">
+		<element name="simil_partdeg" type="float" min="0" max="100" default="1.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="simil_parts" type="float" min="0" max="100" default="0.0">
 			<description><![CDATA[Differing number of parts is also handled by the 'part degree' similarity component.]]></description>
 		</element>
@@ -3635,4 +4766,8 @@
 
 NOTE: switching between simulation engines causes removal of all objects in the world (e.g. creatures).]]></description>
+		</element>
+		<element name="slaves" type="SlaveSimulators"/>
+		<element name="stagnation" type="integer" min="0" max="1000000" default="0">
+			<description><![CDATA[No improvement period required to stop simulation (stagnation). 0 disables automatic stopping.]]></description>
 		</element>
 		<element name="symAlphaSteps" type="integer" min="2" max="50" default="20">
@@ -3650,11 +4785,20 @@
 		<element name="symResultD" type="float"/>
 		<element name="time" type="integer"/>
-		<element name="touchrange" type="float" min="0" max="100" default="1"/>
+		<element name="totaltestedcr" type="integer">
+			<description><![CDATA[Total number of creatures evaluated in the experiment]]></description>
+		</element>
+		<element name="totaltests" type="integer">
+			<description><![CDATA[Total number of evaluations in the experiment.
+This is equivalent to "Evaluated creatures" unless multiple evaluation is activated.]]></description>
+		</element>
+		<element name="touchrange" type="float" min="0" max="100" default="1.0"/>
+		<element name="user" type="untyped"/>
 		<element name="usercode" type="string">
 			<description><![CDATA[This script overrides the experiment definition]]></description>
 		</element>
+		<element name="vmdebug" type="integer" min="0" max="1"/>
 		<element name="world" type="World"/>
 		<element name="wrldbnd" type="integer" min="0" max="2" default="1"/>
-		<element name="wrldg" type="float" min="0" max="10" default="1">
+		<element name="wrldg" type="float" min="0" max="10" default="1.0">
 			<description><![CDATA[You can adjust gravity for your experiments.
 The "official" setting used to evaluate and compare creatures is 1.]]></description>
@@ -3670,9 +4814,13 @@
 See also the WorldMap object.]]></description>
 		</element>
-		<element name="wrldsiz" type="float" min="10" max="1000" default="20">
+		<element name="wrldsiz" type="float" min="10" max="1000" default="20.0">
 			<description><![CDATA[Side length of the world]]></description>
 		</element>
 		<element name="wrldtyp" type="integer" min="0" max="2" default="0"/>
-		<element name="wrldwat" type="float" min="-20" max="50" default="-1"/>
+		<element name="wrldwat" type="float" min="-20" max="50" default="-1.0"/>
+		<element name="xov_mins" type="float" min="0" max="9999">
+			<description><![CDATA[Only genotypes with dissimilarity below this threshold will be crossed over.
+Value of 0 means no crossover restrictions.]]></description>
+		</element>
 		<element name="add" function="true"/>
 		<element name="addGroup" function="true"/>
@@ -3710,5 +4858,15 @@
 			<description><![CDATA[This function was previously called "autosave".]]></description>
 <arguments/></element>
+		<element name="checkpointData" function="true" type="void">
+			<description><![CDATA[In the distributed/paralellized scenario the data passed as argument can be received by the controlling entity (onSlaveCheckpoint in multithreaded master experiment, /simulator/expevent in distributed network simulator)]]></description>
+			<arguments>
+				<argument name="any_data" type="untyped"/>
+			</arguments>
+		</element>
 		<element name="clear" function="true"/>
+		<element name="cleardata" function="true">
+			<description><![CDATA[Sets the number of instances of each genotype to zero (as if it has never been evaluated).
+Genotype performance values stay intact, yet they are meaningless if a genotype has no instances.]]></description>
+		</element>
 		<element name="crossOver" function="true" type="Geno">
 			<description><![CDATA[returns crossed over genotype]]></description>
@@ -3724,5 +4882,5 @@
 		</element>
 		<element name="evaluateDistance" function="true" type="float">
-			<description><![CDATA[calculate dissimilarity between two models created from Geno objects]]></description>
+			<description><![CDATA[Calculates dissimilarity between two models created from Geno objects. There are papers available that describe details of the computation method.]]></description>
 			<arguments>
 				<argument type="Geno"/>
@@ -3730,5 +4888,5 @@
 			</arguments>
 		</element>
-		<element name="export" function="true" type="void">
+		<element name="export" function="true" type="untyped">
 			<description><![CDATA[Save some data to file. arguments:
 - filename
@@ -3773,5 +4931,5 @@
 		</element>
 		<element name="import" function="true" type="void">
-			<description><![CDATA[Equivalent to import(filename,2+4+8+6) - imports genotypes, parameters, genepool and population settings]]></description>
+			<description><![CDATA[Equivalent to import(filename,2+4+8+16) - imports genotypes, parameters, genepool and population settings]]></description>
 			<arguments>
 				<argument name="filename" type="string"/>
@@ -3837,9 +4995,81 @@
 			<description><![CDATA[Clears groups and loads default values for simulator parameters, then calls onExpDefLoad() of the current experiment definition.]]></description>
 <arguments/></element>
-		<element name="save" function="true" type="void">
+		<element name="save" function="true" type="untyped">
 			<description><![CDATA[Save experiment file (calls onExpSave() in the current experiment definition)]]></description>
 			<arguments>
 				<argument name="filename" type="string"/>
 			</arguments>
+		</element>
+		<element name="script_2D_layout" function="true">
+			<description><![CDATA[make a 2d layout (coord's provided)]]></description>
+		</element>
+		<element name="script_Alphabetic_symbols" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Alternative_symbols" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Brain_simplifier" function="true">
+			<description><![CDATA[Removes all brain neurons that do not influence effectors. Converts genotypes to f0.]]></description>
+		</element>
+		<element name="script_Calculate_symmetry" function="true">
+			<description><![CDATA[Calculate symmetry value and symmetry plane for all genotypes
+(note: may take a long time for complex bodies)]]></description>
+		</element>
+		<element name="script_Creatures_circle" function="true">
+			<description><![CDATA[Arranges living creatures (first population) in a circle, tallest in the middle
+(the tallest one is selected based on the vertical position which should already be measured)]]></description>
+		</element>
+		<element name="script_Dump_creatures" function="true">
+			<description><![CDATA[Dumps coordinates and velocities of all Parts of all living Creatures from group #0]]></description>
+		</element>
+		<element name="script_Food_circle" function="true">
+			<description><![CDATA[Arranges food pieces in a circle]]></description>
+		</element>
+		<element name="script_Food_circle_2" function="true">
+			<description><![CDATA[Arranges food pieces in a circle]]></description>
+		</element>
+		<element name="script_Gallery" function="true">
+			<description><![CDATA[Arranges creatures from the first gene pool in a grid]]></description>
+		</element>
+		<element name="script_Make_f0def_describing_all_neuron_classes" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Make_neuroshtml_describing_all_neuron_classes" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Make_regular_shapes" function="true">
+			<description><![CDATA[Make regular shapes (truss, sponge, grid, net)]]></description>
+		</element>
+		<element name="script_Neuro_inspection" function="true">
+			<description><![CDATA[Performs a given number of simulation steps, logs neural states of selected neurons, can also enforce states of selected neurons.
+The log file can be used for further analyses, or to draw plots in gnuplot (see neuro_insp_chart.gp) or another external program.
+See script source for details and settings.]]></description>
+		</element>
+		<element name="script_Neuro_test" function="true">
+			<description><![CDATA[Performs a given number of simulation steps and logs neural states of selected neurons.
+See script source for details and settings.
+]]></description>
+		</element>
+		<element name="script_Neurons_report" function="true">
+			<description><![CDATA[Show all neuron classes and their names]]></description>
+		</element>
+		<element name="script_Print_creatures_coordinates" function="true">
+			<description><![CDATA[Print coordinates of Parts for all creatures from group #0.]]></description>
+		</element>
+		<element name="script_Reload_neuron_definitions" function="true">
+			<description><![CDATA[Reloads scripts/*.neuro files]]></description>
+		</element>
+		<element name="script_Rotate" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Stabilizacja" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_svd_2D" function="true">
+			<description><![CDATA[make a 2d layout (coord's provided)]]></description>
+		</element>
+		<element name="script_Toy_Spring_Sticks" function="true">
+			<description><![CDATA[Make creature joints look like springs]]></description>
 		</element>
 		<element name="sleep" function="true" type="void">
@@ -3890,12 +5120,12 @@
 			<description><![CDATA[]]></description>
 		</element>
-		<element name="simil_partdeg" type="float" min="0" max="100" default="1">
-			<description><![CDATA[]]></description>
-		</element>
-		<element name="simil_parts" type="float" min="0" max="100" default="0">
+		<element name="simil_partdeg" type="float" min="0" max="100" default="1.0">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="simil_parts" type="float" min="0" max="100" default="0.0">
 			<description><![CDATA[Differing number of parts is also handled by the 'part degree' similarity component.]]></description>
 		</element>
 		<element name="evaluateDistance" function="true" type="float">
-			<description><![CDATA[calculate dissimilarity between two models created from Geno objects]]></description>
+			<description><![CDATA[Calculates dissimilarity between two models created from Geno objects. There are papers available that describe details of the computation method.]]></description>
 			<arguments>
 				<argument type="Geno"/>
@@ -3909,6 +5139,8 @@
 			<description><![CDATA[Save simulation state once every n-th event
 (events are defined by the script. For 'standard.expdef' it is after each death).
-Save EXPT file first to initialize name for autosave files.]]></description>
-		</element>
+Save EXPT file first to initialize name for autosave files.
+Slave simulators (in multithreaded experiments) ignore this setting and never create autosave files.]]></description>
+		</element>
+		<element name="cpus" type="integer"/>
 		<element name="createrr" type="integer" min="0" max="2" default="1"/>
 		<element name="creatwarnfail" type="integer" min="0" max="1">
@@ -3924,29 +5156,40 @@
 		<element name="expdef_info" type="string"/>
 		<element name="expdef_title" type="string"/>
+		<element name="expparams" type="ExpParams"/>
+		<element name="expstate" type="ExpState"/>
 		<element name="filecomm" type="integer" min="0" max="1" default="1">
 			<description><![CDATA[Display comments encountered in opened files]]></description>
 		</element>
-		<element name="genolib" type="GenePools"/>
+		<element name="genepools" type="GenePools"/>
 		<element name="groupchk" type="integer" min="0" max="1"/>
+		<element name="identity" type="integer">
+			<description><![CDATA[-1 for master simulator, 0...count-1 for slaves]]></description>
+		</element>
 		<element name="importchk" type="integer" min="0" max="1"/>
-		<element name="livelib" type="Populations"/>
+		<element name="lastCheckpoint" type="untyped">
+			<description><![CDATA[Most recently reported by the experiment definition script.]]></description>
+		</element>
 		<element name="loadchk" type="integer" min="0" max="1"/>
 		<element name="overwrite" type="integer" min="0" max="1">
 			<description><![CDATA[Overwite existing files or create their backups]]></description>
 		</element>
+		<element name="populations" type="Populations"/>
 		<element name="resetonexpdef" type="integer" min="0" max="1" default="1">
 			<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.
-When turned off: parameters from previous experiment definition will remain.]]></description>
+If turned off: parameters from previous experiment definition will remain (dangerous).]]></description>
 		</element>
 		<element name="running" type="integer" min="0" max="1">
-			<description><![CDATA[for synchronizing the user interface state]]></description>
+			<description><![CDATA[useful for synchronizing the user interface state]]></description>
 		</element>
 		<element name="simspeed" type="integer">
 			<description><![CDATA[steps/second]]></description>
 		</element>
+		<element name="slaves" type="SlaveSimulators"/>
 		<element name="time" type="integer"/>
+		<element name="user" type="untyped"/>
 		<element name="usercode" type="string">
 			<description><![CDATA[This script overrides the experiment definition]]></description>
 		</element>
+		<element name="vmdebug" type="integer" min="0" max="1"/>
 		<element name="world" type="World"/>
 		<element name="beep" function="true" type="void">
@@ -3956,4 +5199,10 @@
 			<description><![CDATA[This function was previously called "autosave".]]></description>
 <arguments/></element>
+		<element name="checkpointData" function="true" type="void">
+			<description><![CDATA[In the distributed/paralellized scenario the data passed as argument can be received by the controlling entity (onSlaveCheckpoint in multithreaded master experiment, /simulator/expevent in distributed network simulator)]]></description>
+			<arguments>
+				<argument name="any_data" type="untyped"/>
+			</arguments>
+		</element>
 		<element name="eval" function="true" type="void">
 			<arguments>
@@ -3961,5 +5210,5 @@
 			</arguments>
 		</element>
-		<element name="export" function="true" type="void">
+		<element name="export" function="true" type="untyped">
 			<description><![CDATA[Save some data to file. arguments:
 - filename
@@ -3998,5 +5247,5 @@
 		</element>
 		<element name="import" function="true" type="void">
-			<description><![CDATA[Equivalent to import(filename,2+4+8+6) - imports genotypes, parameters, genepool and population settings]]></description>
+			<description><![CDATA[Equivalent to import(filename,2+4+8+16) - imports genotypes, parameters, genepool and population settings]]></description>
 			<arguments>
 				<argument name="filename" type="string"/>
@@ -4040,5 +5289,5 @@
 			<description><![CDATA[Clears groups and loads default values for simulator parameters, then calls onExpDefLoad() of the current experiment definition.]]></description>
 <arguments/></element>
-		<element name="save" function="true" type="void">
+		<element name="save" function="true" type="untyped">
 			<description><![CDATA[Save experiment file (calls onExpSave() in the current experiment definition)]]></description>
 			<arguments>
@@ -4066,4 +5315,55 @@
 			<description><![CDATA[the expdef script calls this to stop simulation]]></description>
 <arguments/></element>
+	</type>
+	<type name="SlaveSimulators" context="Global context">
+		<element name="isolation" type="integer" min="0" max="1" default="1">
+			<description><![CDATA[Slave simulator access is filtered to exclude object references across simulator boundaries and ensure a safe multithreaded operation.
+1. Slave simulations objects can't be accessed from master while the slave simulator is running (except for Simulator.stop/start/running).
+2. Master simulator objects can't be passed to slave simulators
+3. Data objects (Vectors and Dictionaries) are passed by value rather than by reference (to make sure that no simulator contains a reference to another simulator's data).
+Setting isolation=0 disables these restrictions, which can lead to unpredictable results or crashes, but is sometimes useful for inspecting true object relationships.
+  Sample cases:
+Simulator.slaves[0].stop(); - always permitted
+Simulator.slaves[0].expdef="prime"; - permitted if the slave simulator is not running
+var vec=[1,2,3]; Simulator.slaves[0].user=vec; vec.clear(); - vec has changed, user field is still [1,2,3]
+var vec=[1,2,GenePools[0]]; Simulator.slaves[0].user=vec; - user field becomes [1,2,null] (because master's GenePool object can't be passed to the slave)
+var g=Simulator.slaves[0].genepools[0][0].genotype; - but the slave's GenePool can be accessed from master (if the slave is not running at the moment)]]></description>
+		</element>
+		<element name="running" type="integer">
+			<description><![CDATA[Note that if running>0 then the number of running simulations can be outdated in the very moment you read this field, because the expdef can stop itself anytime. If running==0, then it is guaranteed to stay 0 until someone calls start() on some of the slave simulator objects.]]></description>
+		</element>
+		<element name="size" type="integer" min="0" max="50">
+			<description><![CDATA[Changing this value will create/remove slave simulator objects as needed.]]></description>
+		</element>
+		<element name="cancelAllEvents" function="true">
+			<description><![CDATA[see cancelEventsFromSlave()]]></description>
+		</element>
+		<element name="cancelEventsFromSlave" function="true" type="void">
+			<description><![CDATA[If the onSlaveStop() event is used to schedule work to a simulator, then you might want to cancel pending events when the experiment is aborted - otherwise it may be difficult to distinguish between self-stop events (called internally from the slave simulator to signal the job was completed) from abort-stop events (requested by the supervising simulator). Calling Simulator.slaves.stopAll(); Simulator.slaves.cancelAllEvents(); makes sure that no old events will be detected after that time point. Without cancelling, the old onSlaveStop() notification (the consequence of the abort-stop) might arrive after the next start() which may confuse the expdef code (slave events are asynchronous).]]></description>
+			<arguments>
+				<argument type="Simulator"/>
+			</arguments>
+		</element>
+		<element name="create" function="true" type="Simulator">
+			<description><![CDATA[If you need to create AND store the reference to a newly created simulator object, then this function may be more readable than var s=Simulator.slaves[Simulator.slaves.size++];]]></description>
+<arguments/></element>
+		<element name="get" function="true" type="Simulator">
+			<description><![CDATA[Access the slave simulator object (Simulator.slaves[index] works, too).
+Important: Do not operate on a simulator that is currently running, always stop() it first.]]></description>
+			<arguments>
+				<argument name="index" type="integer"/>
+			</arguments>
+		</element>
+		<element name="remove" function="true" type="void">
+			<description><![CDATA[Also calls stop() if the simulator is running. Events assocated with the simulator being deleted are cancelled, so the expdef will not see the usual onSlaveStop.]]></description>
+			<arguments>
+				<argument name="index_or_object" type="untyped"/>
+			</arguments>
+		</element>
+		<element name="removeAll" function="true">
+			<description><![CDATA[Same as Simulator.slaves=0;]]></description>
+		</element>
+		<element name="startAll" function="true"/>
+		<element name="stopAll" function="true"/>
 	</type>
 	<type name="stats" context="Global context">
@@ -4123,4 +5423,6 @@
 		<element name="st_avg_pos_y" type="float"/>
 		<element name="st_avg_pos_z" type="float"/>
+		<element name="st_avg_selfcol" type="float"/>
+		<element name="st_avg_selfcolstate" type="float"/>
 		<element name="st_avg_size_x" type="float"/>
 		<element name="st_avg_size_y" type="float"/>
@@ -4150,4 +5452,6 @@
 		<element name="st_max_pos_y" type="float"/>
 		<element name="st_max_pos_z" type="float"/>
+		<element name="st_max_selfcol" type="float"/>
+		<element name="st_max_selfcolstate" type="float"/>
 		<element name="st_max_size_x" type="float"/>
 		<element name="st_max_size_y" type="float"/>
@@ -4176,4 +5480,6 @@
 		<element name="st_min_pos_y" type="float"/>
 		<element name="st_min_pos_z" type="float"/>
+		<element name="st_min_selfcol" type="float"/>
+		<element name="st_min_selfcolstate" type="float"/>
 		<element name="st_min_size_x" type="float"/>
 		<element name="st_min_size_y" type="float"/>
@@ -4191,4 +5497,9 @@
 		<element name="removeGroup" function="true"/>
 	</type>
+	<type name="StopEvent" context="Global context">
+<description><![CDATA[StopEvent]]></description>
+		<element name="index" type="integer"/>
+		<element name="slave" type="Simulator"/>
+	</type>
 	<type name="String" context="Global context">
 <description><![CDATA[String functions library.]]></description>
@@ -4203,7 +5514,13 @@
 			</arguments>
 		</element>
+		<element name="deserialize" function="true" type="untyped">
+			<description><![CDATA[extract objects from textual representation]]></description>
+			<arguments>
+				<argument type="string"/>
+			</arguments>
+		</element>
 		<element name="format" function="true" type="string">
-			<description><![CDATA[Works like the standard C library "sprintf()" but only one %-argument is accepted.
-Format string: %[-][+][0][width[.precision]]type
+			<description><![CDATA[Works like the standard C library "sprintf()". The '%' operator can be used as a shortcut, e.g. String.format("%x",123) is equivalent of "%x" % 123
+Character seqences beginning with % found in the format string are replaced by formatted values produced according to their corresponding format specifiers: %[-][+][0][width[.precision]]type
  -: left adjust (default is right adjust)
  +: place a sign (+ or -) before a number
@@ -4211,5 +5528,16 @@
  width: minimum field width
  precision: minimum number of decimal digits
- type: d=decimal integer, x/X=hexadecimal integer, f/g=floating point number, e="scientific" style floating point, t=time
+ type: d=decimal integer, x/X=hexadecimal integer, f/g=floating point number, e="scientific" style floating point, c=character of a given ascii code, t=time, %=special case, outputs the literal % character
+Multiple values can be formatted in one call, by passing a vector as the second argument:
+String.format("a=%03d b=%.2f c=%s",[a,b,c]) or "a=%03d b=%.2f c=%s" % [a,b,c]
+Alternatively, if no % characters are required in the output string, the chained call can be used:
+"a=%03d b=%.2f c=%s" % a % b % c
+The above expression works as expected, because, unlike the regular sprintf, the formatting function preserves % characters left after using all input arguments:
+ input:          "a=%03d b=%.2f c=%s" % a % b % c
+ actual meaning: (("a=%03d b=%.2f c=%s" % a) % b) % c
+ phase 1:        ("a=000 b=%.2f c=%s" % b) % c
+ phase 2:        "a=000 b=0.00 c=%s" % c
+ result:         "a=000 b=0.00 c=0"
+
 Examples:
  String.format("|%07.2f|",Math.pi) -> ="|0003.14|"
@@ -4219,8 +5547,9 @@
  String.format("%t",Math.time) -> ="Sun Apr 29 19:22:02 2007"
  String.format("%T",Math.time) -> ="2007-05-29 19:22:02"
-]]></description>
-			<arguments>
-				<argument name="format" type="string"/>
-				<argument name="value" type="untyped"/>
+ String.format("x=%d%%",100) -> ="100%"
+]]></description>
+			<arguments>
+				<argument name="format_string" type="string"/>
+				<argument name="value_or_vector" type="untyped"/>
 			</arguments>
 		</element>
@@ -4280,4 +5609,10 @@
 				<argument type="string"/>
 				<argument name="number of characters" type="integer"/>
+			</arguments>
+		</element>
+		<element name="serialize" function="true" type="string">
+			<description><![CDATA[convert to textual representation, preserving the object hierarchy]]></description>
+			<arguments>
+				<argument type="untyped"/>
 			</arguments>
 		</element>
@@ -4374,4 +5709,76 @@
 		<element name="remove" function="true"/>
 		<element name="removeGroup" function="true"/>
+		<element name="script_2D_layout" function="true">
+			<description><![CDATA[make a 2d layout (coord's provided)]]></description>
+		</element>
+		<element name="script_Alphabetic_symbols" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Alternative_symbols" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Brain_simplifier" function="true">
+			<description><![CDATA[Removes all brain neurons that do not influence effectors. Converts genotypes to f0.]]></description>
+		</element>
+		<element name="script_Calculate_symmetry" function="true">
+			<description><![CDATA[Calculate symmetry value and symmetry plane for all genotypes
+(note: may take a long time for complex bodies)]]></description>
+		</element>
+		<element name="script_Creatures_circle" function="true">
+			<description><![CDATA[Arranges living creatures (first population) in a circle, tallest in the middle
+(the tallest one is selected based on the vertical position which should already be measured)]]></description>
+		</element>
+		<element name="script_Dump_creatures" function="true">
+			<description><![CDATA[Dumps coordinates and velocities of all Parts of all living Creatures from group #0]]></description>
+		</element>
+		<element name="script_Food_circle" function="true">
+			<description><![CDATA[Arranges food pieces in a circle]]></description>
+		</element>
+		<element name="script_Food_circle_2" function="true">
+			<description><![CDATA[Arranges food pieces in a circle]]></description>
+		</element>
+		<element name="script_Gallery" function="true">
+			<description><![CDATA[Arranges creatures from the first gene pool in a grid]]></description>
+		</element>
+		<element name="script_Make_f0def_describing_all_neuron_classes" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Make_neuroshtml_describing_all_neuron_classes" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Make_regular_shapes" function="true">
+			<description><![CDATA[Make regular shapes (truss, sponge, grid, net)]]></description>
+		</element>
+		<element name="script_Neuro_inspection" function="true">
+			<description><![CDATA[Performs a given number of simulation steps, logs neural states of selected neurons, can also enforce states of selected neurons.
+The log file can be used for further analyses, or to draw plots in gnuplot (see neuro_insp_chart.gp) or another external program.
+See script source for details and settings.]]></description>
+		</element>
+		<element name="script_Neuro_test" function="true">
+			<description><![CDATA[Performs a given number of simulation steps and logs neural states of selected neurons.
+See script source for details and settings.
+]]></description>
+		</element>
+		<element name="script_Neurons_report" function="true">
+			<description><![CDATA[Show all neuron classes and their names]]></description>
+		</element>
+		<element name="script_Print_creatures_coordinates" function="true">
+			<description><![CDATA[Print coordinates of Parts for all creatures from group #0.]]></description>
+		</element>
+		<element name="script_Reload_neuron_definitions" function="true">
+			<description><![CDATA[Reloads scripts/*.neuro files]]></description>
+		</element>
+		<element name="script_Rotate" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_Stabilizacja" function="true">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="script_svd_2D" function="true">
+			<description><![CDATA[make a 2d layout (coord's provided)]]></description>
+		</element>
+		<element name="script_Toy_Spring_Sticks" function="true">
+			<description><![CDATA[Make creature joints look like springs]]></description>
+		</element>
 	</type>
 	<type name="Vector" context="Global context">
@@ -4415,8 +5822,19 @@
 			</arguments>
 		</element>
+		<element name="sort" function="true" type="void">
+			<description><![CDATA[comparator can be null, giving the "natural" sorting order (depending on element type), otherwise it must be a function reference obtained by the "function FUNCTIONNAME" operator.
+
+Example:
+function compareLastDigit(a,b) {return (a%10)<(b%10);}
+var v=[16,23,35,42,54,61];
+v.sort(function compareLastDigit);]]></description>
+			<arguments>
+				<argument name="comparator" type="Object"/>
+			</arguments>
+		</element>
 	</type>
 	<type name="World" context="Global context">
 <description><![CDATA[Environment properties.]]></description>
-		<element name="nnspeed" type="float" min="0" max="1000" default="1">
+		<element name="nnspeed" type="float" min="0" max="1000" default="1.0">
 			<description><![CDATA[Number of neural network simulation steps in each physics simulation step]]></description>
 		</element>
@@ -4429,5 +5847,5 @@
 		</element>
 		<element name="wrldbnd" type="integer" min="0" max="2" default="1"/>
-		<element name="wrldg" type="float" min="0" max="10" default="1">
+		<element name="wrldg" type="float" min="0" max="10" default="1.0">
 			<description><![CDATA[You can adjust gravity for your experiments.
 The "official" setting used to evaluate and compare creatures is 1.]]></description>
@@ -4443,9 +5861,9 @@
 See also the WorldMap object.]]></description>
 		</element>
-		<element name="wrldsiz" type="float" min="10" max="1000" default="20">
+		<element name="wrldsiz" type="float" min="10" max="1000" default="20.0">
 			<description><![CDATA[Side length of the world]]></description>
 		</element>
 		<element name="wrldtyp" type="integer" min="0" max="2" default="0"/>
-		<element name="wrldwat" type="float" min="-20" max="50" default="-1"/>
+		<element name="wrldwat" type="float" min="-20" max="50" default="-1.0"/>
 		<element name="wrldchg" function="true" type="void"><arguments/></element>
 	</type>
@@ -4493,12 +5911,9 @@
 	</type>
 	<type name="WorldSignals" context="Global context">
-<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.
-
-See also: Signal]]></description>
-		<element name="size" type="integer">
-			<description><![CDATA[Number of signals in this set.]]></description>
-		</element>
+<description><![CDATA[Use this object to create stationary signals (not associated with any moving object) and to receive signals from any location in the world. There are Creature-based and Neuro-based variants of this object that automatically operate from creature's or neuron's position.
+
+See also: Signal, CreatureSignals, NeuroSignals.]]></description>
+		<element name="size" type="integer"/>
 		<element name="add" function="true" type="Signal">
-			<description><![CDATA[Create a new signal]]></description>
 			<arguments>
 				<argument name="position" type="XYZ"/>
@@ -4506,9 +5921,6 @@
 			</arguments>
 		</element>
-		<element name="clear" function="true" type="void">
-			<description><![CDATA[Delete all signals]]></description>
-<arguments/></element>
+		<element name="clear" function="true" type="void"><arguments/></element>
 		<element name="get" function="true" type="Signal">
-			<description><![CDATA[Access individual signals (index=0 .. size-1)]]></description>
 			<arguments>
 				<argument name="index" type="integer"/>
@@ -4527,5 +5939,5 @@
 Additional filtering options:
 - Max distance only receives the neighbor signals (based on their physical location)
-- Flavor filtering: only signals having the flavor close to the specified one will be received. The filter value is the maximum allowed difference.]]></description>
+- Flavor filtering: only signals having the flavor similar to the specified value will be received. The flavorfilter value is the difference of flavor that reduces the received signal to 0. The "flavor attenuation" is linear, i.e., signals differing by (filter/2) in flavor will be reduced to 50%.]]></description>
 			<arguments>
 				<argument name="position" type="XYZ"/>
@@ -4533,9 +5945,9 @@
 				<argument name="max distance" type="float"/>
 				<argument name="flavor" type="float"/>
-				<argument name="filter" type="float"/>
+				<argument name="flavorfilter" type="float"/>
 			</arguments>
 		</element>
 		<element name="receiveSet" function="true" type="Vector">
-			<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>
+			<description><![CDATA[Get all signals in the specified range. Returns a read-only vector object containing Signal objects - individual signals can be accessed as result[0], .., result[result.size-1].]]></description>
 			<arguments>
 				<argument name="position" type="XYZ"/>
@@ -4545,5 +5957,5 @@
 		</element>
 		<element name="receiveSingle" function="true" type="Signal">
-			<description><![CDATA[Find the signal source having the highest signal power (including the distance)]]></description>
+			<description><![CDATA[Find the signal source that has the highest signal power (taking into account distance).]]></description>
 			<arguments>
 				<argument name="position" type="XYZ"/>
@@ -4557,4 +5969,5 @@
 		<element name="length" type="float"/>
 		<element name="toString" type="string"/>
+		<element name="toVector" type="Vector"/>
 		<element name="x" type="float"/>
 		<element name="y" type="float"/>
@@ -4588,4 +6001,10 @@
 			</arguments>
 		</element>
+		<element name="newFromVector" function="true" type="XYZ">
+			<description><![CDATA[used for deserialization]]></description>
+			<arguments>
+				<argument type="Vector"/>
+			</arguments>
+		</element>
 		<element name="normalize" function="true" type="void">
 			<description><![CDATA[scales the vector length to 1.0]]></description>
@@ -4626,6 +6045,164 @@
 	</type>
 	<type name="ExpParams" context="Experiment definition">
+		<element name="aging" type="integer" min="0" max="100000">
+			<description><![CDATA[Idle metabolism doubles after this period (0 disables aging)]]></description>
+		</element>
+		<element name="boostphase" type="integer" min="0" max="1" default="1">
+			<description><![CDATA[After stagnation has been detected, switches negative selection to "delete worst", doubles "multiple evaluation" and starts another stagnation detection phase.
+"Delete worst" results in extremely quick convergence and high selection pressure, similarly to "local search" optimization techniques.]]></description>
+		</element>
+		<element name="capacity" type="integer" min="0" max="10000">
+			<description><![CDATA[]]></description>
+		</element>
 		<element name="changedProperty" type="integer"/>
 		<element name="changedPropertyId" type="string"/>
+		<element name="cr_c" type="float" min="-10000" max="10000">
+			<description><![CDATA[Constant value added to total fitness]]></description>
+		</element>
+		<element name="cr_di" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of distance in total fitness]]></description>
+		</element>
+		<element name="cr_gl" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of body size (number of parts) in total fitness]]></description>
+		</element>
+		<element name="cr_joints" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of structure size (number of joints) in total fitness]]></description>
+		</element>
+		<element name="cr_life" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of life span in total fitness]]></description>
+		</element>
+		<element name="cr_nncon" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of brain connections in total fitness]]></description>
+		</element>
+		<element name="cr_nnsiz" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of brain size (number of neurons) in total fitness]]></description>
+		</element>
+		<element name="cr_norm" type="integer" min="0" max="1">
+			<description><![CDATA[Normalize each criterion to 0..1 interval before weighting]]></description>
+		</element>
+		<element name="cr_simi" type="integer" min="0" max="1">
+			<description><![CDATA[If enabled, fitness of each genotype will be reduced by its phenotypic similarity to all other genotypes in the gene pool]]></description>
+		</element>
+		<element name="cr_v" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of horizontal velocity in total fitness]]></description>
+		</element>
+		<element name="cr_vpos" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of vertical position in total fitness]]></description>
+		</element>
+		<element name="cr_vvel" type="float" min="-10000" max="10000">
+			<description><![CDATA[Weight of vertical velocity in total fitness]]></description>
+		</element>
+		<element name="creath" type="float" min="-1" max="50">
+			<description><![CDATA[Vertical position (above the surface) where newborn creatures are placed.
+Negative values are only used in the water area:
+  0   = at the surface
+-0.5 = half depth
+-1   = just above the bottom]]></description>
+		</element>
+		<element name="delrule" type="integer" min="0" max="2">
+			<description><![CDATA[Negative selection: which genotypes should be removed when we need room for new genotypes in the gene pool]]></description>
+		</element>
+		<element name="e_meta" type="float" min="0" max="1">
+			<description><![CDATA[Each stick consumes this amount of energy in one time step]]></description>
+		</element>
+		<element name="Energy0" type="float" min="0" max="10000">
+			<description><![CDATA[Base starting energy level (for each stick)]]></description>
+		</element>
+		<element name="evalcount" type="integer" min="0" max="1000" default="0">
+			<description><![CDATA[If more than zero:
+- each genotype will be evaluated many times
+- fitness will be averaged
+- fitness standard deviation will be stored in the 'user1' field of a genotype
+- there will be no "Unchanged" genotypes ("Unchanged" value is considered zero).]]></description>
+		</element>
+		<element name="feed" type="integer" min="0" max="100">
+			<description><![CDATA[Number of energy pieces in the world]]></description>
+		</element>
+		<element name="feede0" type="float" min="0" max="1000">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="feedtrans" type="float" min="0" max="100">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="foodgen" type="string">
+			<description><![CDATA[The default food model is a simple, single part object:
+  //0
+  m:Vstyle=food
+  p:
+(this genotype is used when you leave this field blank).
+You can specify another genotype to create "intelligent" or mobile food.]]></description>
+		</element>
+		<element name="initialgen" type="string">
+			<description><![CDATA[The gene pool will be replaced with the supplied genotype when the experiment begins.
+Use the empty initial genotype if you want to preserve the current gene pool.]]></description>
+		</element>
+		<element name="log" type="integer" min="0" max="5">
+			<description><![CDATA[Sends [LOG] messages with genotypes count and minimal, average and best gene pool fitness, which can be used to produce graphs by external tools like gnuplot or Excel.
+It also sends the [LOGTITLE] message on experiment initialization, which summarizes most important parameters of your experiment. It can be used as a graph title.]]></description>
+		</element>
+		<element name="makesound" type="integer" min="0" max="1" default="0">
+			<description><![CDATA[Emit sounds on improvements? (frequency depends on the magnitude of improvement)]]></description>
+		</element>
+		<element name="MaxCreated" type="integer" min="0" max="50">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="minfitness" type="float">
+			<description><![CDATA[Minimal fitness that allows to automatically stop evolution when stagnation detected]]></description>
+		</element>
+		<element name="p_mut" type="float" min="0" max="100">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="p_nop" type="float" min="0" max="100">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="p_xov" type="float" min="0" max="100">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="placement" type="integer" min="0" max="1">
+			<description><![CDATA[For 'Central' placement, newborn creatures are placed at the world center, if possible.]]></description>
+		</element>
+		<element name="rotation" type="integer" min="0" max="4">
+			<description><![CDATA[Initial heading of newborn creatures]]></description>
+		</element>
+		<element name="savebest" type="integer" min="0" max="3">
+			<description><![CDATA[Saves (on each improvement) best found genotype or a complete experiment state to a file in scripts_output subdirectory.]]></description>
+		</element>
+		<element name="selrule" type="integer" min="0" max="5">
+			<description><![CDATA[Positive selection: how to choose genotypes for cloning/mutation/crossover]]></description>
+		</element>
+		<element name="stagnation" type="integer" min="0" max="1000000" default="0">
+			<description><![CDATA[No improvement period required to stop simulation (stagnation). 0 disables automatic stopping.]]></description>
+		</element>
+		<element name="xov_mins" type="float" min="0" max="9999">
+			<description><![CDATA[Only genotypes with dissimilarity below this threshold will be crossed over.
+Value of 0 means no crossover restrictions.]]></description>
+		</element>
+		<element name="add" function="true"/>
+		<element name="addGroup" function="true"/>
+		<element name="clear" function="true"/>
+		<element name="cleardata" function="true">
+			<description><![CDATA[Sets the number of instances of each genotype to zero (as if it has never been evaluated).
+Genotype performance values stay intact, yet they are meaningless if a genotype has no instances.]]></description>
+		</element>
+		<element name="remove" function="true"/>
+		<element name="removeGroup" function="true"/>
+	</type>
+	<type name="ExpState" context="Experiment definition">
+		<element name="changedProperty" type="integer"/>
+		<element name="changedPropertyId" type="string"/>
+		<element name="creaturesgrouploaded" type="integer">
+			<description><![CDATA[]]></description>
+		</element>
+		<element name="notes" type="string">
+			<description><![CDATA[You can write anything here
+(it will be saved to the experiment file)]]></description>
+		</element>
+		<element name="totaltestedcr" type="integer">
+			<description><![CDATA[Total number of creatures evaluated in the experiment]]></description>
+		</element>
+		<element name="totaltests" type="integer">
+			<description><![CDATA[Total number of evaluations in the experiment.
+This is equivalent to "Evaluated creatures" unless multiple evaluation is activated.]]></description>
+		</element>
 		<element name="add" function="true"/>
 		<element name="addGroup" function="true"/>
@@ -4634,14 +6211,6 @@
 		<element name="removeGroup" function="true"/>
 	</type>
-	<type name="ExpState" context="Experiment definition">
-		<element name="changedProperty" type="integer"/>
-		<element name="changedPropertyId" type="string"/>
-		<element name="add" function="true"/>
-		<element name="addGroup" function="true"/>
-		<element name="clear" function="true"/>
-		<element name="remove" function="true"/>
-		<element name="removeGroup" function="true"/>
-	</type>
 	<type name="n" context="Neuron definitions">
+		<element name="classObject" type="NeuroClass"/>
 		<element name="d" type="string"/>
 		<element name="getInputCount" type="integer"/>
@@ -4669,7 +6238,10 @@
 <description><![CDATA[Live Neuron object.]]></description>
 		<element name="channelCount" type="integer"/>
+		<element name="classObject" type="NeuroClass"/>
 		<element name="creature" type="Creature"/>
 		<element name="currState" type="float">
-			<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>
+			<description><![CDATA[When read, it behaves just like the 'state' field.
+When written, changes the current 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>
 		</element>
 		<element name="def" type="NeuroDef"/>
@@ -4702,5 +6274,6 @@
 		<element name="state" type="float">
 			<description><![CDATA[When read, returns the current neuron state.
-When written, sets the next neuron state (for use in the neuron definition)]]></description>
+When written, sets the 'internal' neuron state that will become current in the next step.
+Typically you should use this field, and not currState.]]></description>
 		</element>
 		<element name="weightedInputSum" type="float"/>
@@ -4768,5 +6341,6 @@
 	</type>
 	<type name="this" context="Fitness formula">
-<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>
+<description><![CDATA[A Genotype with the associated performance information. Adding genotypes to GenePool makes them accessible in Framsticks GUI and enables the use of GenePool selection methods.
+Before version 4.0rc4 the static Genotype object was used in functions operating on the "selected" genotype. This is now deprecated as all operations can be performed using the more convenient direct access (see GenePools).]]></description>
 		<element name="convtrace1" type="string"/>
 		<element name="distance" type="float"/>
@@ -4779,4 +6353,7 @@
 			<description><![CDATA[Fitness shifted by (avg-n*stddev)]]></description>
 		</element>
+		<element name="genepool" type="untyped">
+			<description><![CDATA[GenePool object or null when not in pool]]></description>
+		</element>
 		<element name="geno" type="Geno">
 			<description><![CDATA[Geno object for this Genotype]]></description>
@@ -4784,4 +6361,8 @@
 		<element name="genotype" type="string"/>
 		<element name="gnum" type="integer"/>
+		<element name="index" type="integer">
+			<description><![CDATA[-1 when not in pool.
+Note that the index changes depending on the current genotype position in the pool. Use Genotype.uid if you need a permanent identifier that persists through the entire object lifetime.]]></description>
+		</element>
 		<element name="info" type="string">
 			<description><![CDATA[Additional information or comments]]></description>
@@ -4817,4 +6398,20 @@
 		<element name="vertpos" type="float"/>
 		<element name="vertvel" type="float"/>
+		<element name="addPerformanceFromCreature" function="true" type="void">
+			<description><![CDATA[Updates the Genotype's performance values merging them with the supplied 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>
+			<arguments>
+				<argument type="Creature"/>
+			</arguments>
+		</element>
+		<element name="copyTo" function="true" type="Genotype">
+			<description><![CDATA[returns the duplicate genotype, created in the target pool]]></description>
+			<arguments>
+				<argument name="pool" type="GenePool"/>
+			</arguments>
+		</element>
+		<element name="delete" function="true" type="void"><arguments/></element>
+		<element name="deleteOne" function="true" type="void">
+			<description><![CDATA[]]></description>
+<arguments/></element>
 		<element name="getModel" function="true" type="Model"><arguments/></element>
 		<element name="getNormalized" function="true" type="float">
@@ -4823,8 +6420,33 @@
 			</arguments>
 		</element>
+		<element name="moveTo" function="true" type="void">
+			<description><![CDATA[the genotype is removed from its current pool when pool=null]]></description>
+			<arguments>
+				<argument name="pool" type="GenePool"/>
+			</arguments>
+		</element>
 		<element name="mutate" function="true" type="void"><arguments/></element>
+		<element name="newFromCreature" function="true">
+			<arguments>
+				<argument name="creature" type="Creature"/>
+			</arguments>
+		</element>
+		<element name="newFromGeno" function="true">
+			<arguments>
+				<argument name="geno" type="Geno"/>
+			</arguments>
+		</element>
+		<element name="newFromString" function="true">
+			<arguments>
+				<argument name="genotype" type="string"/>
+			</arguments>
+		</element>
+		<element name="splitInstances" function="true" type="void"><arguments/></element>
 	</type>
 	<type name="Creature" context="Visual style definition">
-<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>
+<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".
+Before version 4.0rc4 the static Creature object was used in event handlers and in functions operating on the "selected" creature. This is now deprecated as all operations can be performed using the more convenient direct access (see GenePools). For event handlers, the creature object will be passed as argument, like this:
+function onDied(cr) {Simulator.print("Creature "+cr.name+" has died");}
+See also: Population.]]></description>
 		<element name="bodysim" type="integer" min="0" max="1" default="1">
 			<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.
@@ -4859,8 +6481,10 @@
 		<element name="genotype" type="string"/>
 		<element name="gnum" type="integer"/>
-		<element name="group" type="untyped"/>
+		<element name="group" type="untyped" deprecated="true">
+			<description><![CDATA[Deprecated. Use population instead.]]></description>
+		</element>
 		<element name="idleen" type="float"/>
 		<element name="index" type="integer">
-			<description><![CDATA[Index of this Creature in its Population.]]></description>
+			<description><![CDATA[Note that the index changes depending on the current creature position in the population. Use Creature.uid if you need a permanent identifier that persists through the entire object lifetime.]]></description>
 		</element>
 		<element name="info" type="string">
@@ -4890,4 +6514,5 @@
 			<description><![CDATA[Initial value of this property is taken from Population.enableperf]]></description>
 		</element>
+		<element name="population" type="untyped"/>
 		<element name="pos_x" type="float">
 			<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>
@@ -4901,7 +6526,4 @@
 		<element name="selfcol" type="integer" min="0" max="1">
 			<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>
-		</element>
-		<element name="selfcolstate" type="integer" min="0" max="1">
-			<description><![CDATA[Current self-collision state]]></description>
 		</element>
 		<element name="selfmask" type="integer" min="0" max="2147483647" default="0"/>
@@ -4924,4 +6546,11 @@
 		<element name="vertpos" type="float"/>
 		<element name="vertvel" type="float"/>
+		<element name="boundingBoxCollisions" function="true" type="integer">
+			<description><![CDATA[Checks approximate collisions for the selected creature.
+Returns 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>
+			<arguments>
+				<argument name="mask" type="integer"/>
+			</arguments>
+		</element>
 		<element name="currentGeometryAsF0" function="true" type="string"><arguments/></element>
 		<element name="getJoint" function="true" type="Joint">
@@ -5011,4 +6640,7 @@
 			</arguments>
 		</element>
+		<element name="selfcolstate" function="true" type="integer">
+			<description><![CDATA[Current self-collision state. In old versions this was a field, not a function.]]></description>
+<arguments/></element>
 		<element name="worldToLocal" function="true" type="XYZ">
 			<description><![CDATA[Local coordinates are measured with respect to the position and orientation of the first Part]]></description>
@@ -5164,16 +6796,19 @@
 	</type>
 	<type name="j" context="Visual style definition">
-		<element name="dx" type="float" min="-2" max="2" default="0"/>
-		<element name="dy" type="float" min="-2" max="2" default="0"/>
-		<element name="dz" type="float" min="-2" max="2" default="0"/>
+		<element name="dx" type="float" min="-2" max="2" default="0.0"/>
+		<element name="dy" type="float" min="-2" max="2" default="0.0"/>
+		<element name="dz" type="float" min="-2" max="2" default="0.0"/>
 		<element name="i" type="string"/>
 		<element name="p1" type="integer" min="-1" max="999999" default="-1"/>
 		<element name="p2" type="integer" min="-1" max="999999" default="-1"/>
-		<element name="rotstif" type="float" min="0" max="1" default="1"/>
+		<element name="rotstif" type="float" min="0" max="1" default="1.0"/>
 		<element name="rx" type="float"/>
 		<element name="ry" type="float"/>
 		<element name="rz" type="float"/>
 		<element name="stam" type="float" min="0" max="1" default="0.25"/>
-		<element name="stif" type="float" min="0" max="1" default="1"/>
+		<element name="stif" type="float" min="0" max="1" default="1.0"/>
+		<element name="vb" type="float" min="0" max="1" default="0.5"/>
+		<element name="vg" type="float" min="0" max="1" default="0.5"/>
+		<element name="vr" type="float" min="0" max="1" default="0.5"/>
 		<element name="Vstyle" type="string"/>
 	</type>
@@ -5238,4 +6873,5 @@
 	<type name="n" context="Visual style definition">
 		<element name="class" type="string"/>
+		<element name="classObject" type="NeuroClass"/>
 		<element name="d" type="string"/>
 		<element name="getInputCount" type="integer"/>
@@ -5263,13 +6899,17 @@
 	<type name="p" context="Visual style definition">
 		<element name="as" type="float" min="0" max="1" default="0.25"/>
-		<element name="dn" type="float" min="0.2" max="5" default="1"/>
+		<element name="dn" type="float" min="0.2" max="5" default="1.0"/>
 		<element name="fr" type="float" min="0" max="4" default="0.4"/>
 		<element name="i" type="string"/>
 		<element name="ing" type="float" min="0" max="1" default="0.25"/>
-		<element name="m" type="float" min="0.1" max="999" default="1"/>
+		<element name="m" type="float" min="0.1" max="999" default="1.0"/>
 		<element name="rx" type="float"/>
 		<element name="ry" type="float"/>
 		<element name="rz" type="float"/>
-		<element name="s" type="float" min="0.1" max="10" default="1"/>
+		<element name="s" type="float" min="0.1" max="10" default="1.0"/>
+		<element name="vb" type="float" min="0" max="1" default="0.5"/>
+		<element name="vg" type="float" min="0" max="1" default="0.5"/>
+		<element name="vr" type="float" min="0" max="1" default="0.5"/>
+		<element name="vs" type="float" min="0.05" max="0.7" default="0.2"/>
 		<element name="Vstyle" type="string"/>
 		<element name="x" type="float"/>
@@ -5391,5 +7031,5 @@
 	<type name="World" context="Visual style definition">
 <description><![CDATA[Environment properties.]]></description>
-		<element name="nnspeed" type="float" min="0" max="1000" default="1">
+		<element name="nnspeed" type="float" min="0" max="1000" default="1.0">
 			<description><![CDATA[Number of neural network simulation steps in each physics simulation step]]></description>
 		</element>
@@ -5402,5 +7042,5 @@
 		</element>
 		<element name="wrldbnd" type="integer" min="0" max="2" default="1"/>
-		<element name="wrldg" type="float" min="0" max="10" default="1">
+		<element name="wrldg" type="float" min="0" max="10" default="1.0">
 			<description><![CDATA[You can adjust gravity for your experiments.
 The "official" setting used to evaluate and compare creatures is 1.]]></description>
@@ -5416,9 +7056,9 @@
 See also the WorldMap object.]]></description>
 		</element>
-		<element name="wrldsiz" type="float" min="10" max="1000" default="20">
+		<element name="wrldsiz" type="float" min="10" max="1000" default="20.0">
 			<description><![CDATA[Side length of the world]]></description>
 		</element>
 		<element name="wrldtyp" type="integer" min="0" max="2" default="0"/>
-		<element name="wrldwat" type="float" min="-20" max="50" default="-1"/>
+		<element name="wrldwat" type="float" min="-20" max="50" default="-1.0"/>
 		<element name="wrldchg" function="true" type="void"><arguments/></element>
 	</type>
@@ -5467,11 +7107,11 @@
 	<type name="Signal" context="Signal label formula">
 		<element name="channel" type="string">
-			<description><![CDATA[Channel name, readonly.]]></description>
+			<description><![CDATA[Channel name, read-only.]]></description>
 		</element>
 		<element name="flavor" type="float">
-			<description><![CDATA[Signal flavor is can be used to differentiate between signals in a single channel. ]]></description>
+			<description><![CDATA[Signal flavor can be used to differentiate between signals in a single channel.]]></description>
 		</element>
 		<element name="pos" type="XYZ">
-			<description><![CDATA[Signal position, readonly.]]></description>
+			<description><![CDATA[Signal position, read-only.]]></description>
 		</element>
 		<element name="power" type="float">
@@ -5479,5 +7119,5 @@
 		</element>
 		<element name="value" type="untyped">
-			<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>
+			<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 functions receive() and receiveFilter() ignore this attribute.]]></description>
 		</element>
 	</type>
@@ -5527,4 +7167,7 @@
 		<element name="cmdhandler" type="string"/>
 		<element name="msgtype" type="integer" min="0" max="1"/>
+		<element name="quiet" type="integer" min="0" max="1">
+			<description><![CDATA[enabled by -Q]]></description>
+		</element>
 		<element name="script" type="string"/>
 		<element name="stdin" type="Object"/>
@@ -5631,5 +7274,5 @@
 		<element name="active" type="integer" min="0" max="1"/>
 		<element name="banner" type="string"/>
-		<element name="desiredsimspeed" type="float" min="0" max="999999" default="0">
+		<element name="desiredsimspeed" type="float" min="0" max="999999" default="0.0">
 			<description><![CDATA[Desired simulation speed in steps/second. 0 = simulation is disabled.]]></description>
 		</element>
@@ -5649,5 +7292,10 @@
 		<element name="size_x" type="integer"/>
 		<element name="size_y" type="integer"/>
-		<element name="userspeed" type="float" min="0" max="100" default="1">
+		<element name="user_interaction" type="integer" min="0" max="1" default="1">
+			<description><![CDATA[Bit field:
+1 - menu access
+]]></description>
+		</element>
+		<element name="userspeed" type="float" min="0" max="100" default="1.0">
 			<description><![CDATA[User interface sets this property to adjust simulation speed.]]></description>
 		</element>
@@ -5672,4 +7320,30 @@
 		<element name="resume" function="true"/>
 		<element name="stop" function="true"/>
+	</type>
+	<type name="ImageExport" context="Command line interface">
+		<element name="imgex_compress" type="integer" min="0" max="100"/>
+		<element name="imgex_currframe" type="integer"/>
+		<element name="imgex_enabled" type="integer" min="0" max="1"/>
+		<element name="imgex_format" type="integer" min="0" max="2"/>
+		<element name="imgex_lastfile" type="string"/>
+		<element name="imgex_maxframes" type="integer">
+			<description><![CDATA[How many frames are to be generated?]]></description>
+		</element>
+		<element name="imgex_outdir" type="string">
+			<description><![CDATA[Directory name WITHOUT trailing '/' sign]]></description>
+		</element>
+		<element name="imgex_outfiles" type="string">
+			<description><![CDATA[Frame number replaces %d (eg. 'image%03d.jpg')]]></description>
+		</element>
+		<element name="imgex_skip" type="integer">
+			<description><![CDATA[A scene file is generated each (n+1) simulation steps
+(a small value means more frames and smooth animation)]]></description>
+		</element>
+		<element name="imgex_startf" type="integer">
+			<description><![CDATA[Starting number]]></description>
+		</element>
+		<element name="imgex_disable" function="true"/>
+		<element name="imgex_enable" function="true"/>
+		<element name="imgex_now" function="true"/>
 	</type>
 	<type name="NeuroDiagram" context="Command line interface">
@@ -5737,8 +7411,9 @@
 		<element name="mode" type="integer" min="0" max="2"/>
 		<element name="name" type="string"/>
+		<element name="prev_show" type="string"/>
 		<element name="regname" type="string"/>
 		<element name="show" type="string"/>
 		<element name="showlog" type="integer" min="0" max="1"/>
-		<element name="switchmode" type="integer" min="0" max="2"/>
+		<element name="switchmode" type="integer" min="0" max="3"/>
 		<element name="switchshows" type="string">
 			<description><![CDATA[names of the shows participating in automatic switching (comma separated). Use * as a wildcard.]]></description>
@@ -5774,10 +7449,10 @@
 <description><![CDATA[Camera object with the automatic target tracking ability.]]></description>
 		<element name="cam_change" type="integer" min="0" max="5" default="3"/>
-		<element name="cam_chspeed" type="float" min="0.1" max="10" default="1"/>
-		<element name="cam_dir" type="float" min="0" max="360" default="30"/>
+		<element name="cam_chspeed" type="float" min="0.1" max="10" default="1.0"/>
+		<element name="cam_dir" type="float" min="0" max="360" default="30.0"/>
 		<element name="cam_distrac" type="integer" min="0" max="1" default="0">
 			<description><![CDATA[Suspend automatic tracking when the camera is moved manually]]></description>
 		</element>
-		<element name="cam_h" type="float" min="0" max="360" default="45">
+		<element name="cam_h" type="float" min="0" max="360" default="45.0">
 			<description><![CDATA[0=side view, 90=top view]]></description>
 		</element>
@@ -5787,5 +7462,5 @@
 		</element>
 		<element name="cam_tracking" type="integer" min="0" max="3" default="1"/>
-		<element name="cam_trspeed" type="float" min="0.1" max="10" default="5"/>
+		<element name="cam_trspeed" type="float" min="0.1" max="10" default="5.0"/>
 		<element name="cam_zoom" type="float" min="0.2" max="3" default="0.8"/>
 		<element name="cam_restore" function="true" type="void">
Index: java/FramclipsePlugin/src/main/resources/framscript.xsl
===================================================================
--- java/FramclipsePlugin/src/main/resources/framscript.xsl	(revision 107)
+++ java/FramclipsePlugin/src/main/resources/framscript.xsl	(revision 108)
@@ -25,5 +25,5 @@
 
 <xsl:template match="element">
-  <li><b><xsl:value-of select="@name"/></b> - 
+  <li><xsl:choose><xsl:when test="@deprecated='true'"><strike><xsl:value-of select="@name"/></strike></xsl:when><xsl:otherwise><b><xsl:value-of select="@name"/></b></xsl:otherwise></xsl:choose> - 
    <xsl:if test="@function='true'">
     function <xsl:if test="@type!=''">returning <xsl:value-of select="@type"/></xsl:if>
