Ignore:
Timestamp:
07/14/15 02:13:58 (9 years ago)
Author:
sz
Message:

Updated framscript.xml to reflect the most recent Framsticks 4.3 release.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/FramclipsePlugin/src/main/resources/framscript.xml

    r331 r417  
    66                <element name="name" type="string"/>
    77                <element name="info" type="string"/>
    8                 <element name="code" type="string"/>
     8                <element name="code" type="string" flags="16384"/>
    99                <element name="neurons" type="string"/>
    1010        </type>
     
    3030                <element name="name" type="string" flags="19"/>
    3131                <element name="info" type="string" flags="19"/>
    32                 <element name="code" type="string" flags="35"/>
     32                <element name="code" type="string" flags="16419"/>
    3333                <element name="streload" function="true" flags="2"/>
    3434                <element name="rebuild" function="true" flags="34"/>
     
    4545                <element name="userspeed" type="integer" min="0" max="5" default="3" flags="2"/>
    4646                <element name="showlog" type="integer" min="0" max="1" flags="2"/>
    47                 <element name="code" type="string" flags="34"/>
     47                <element name="code" type="string" flags="16418"/>
    4848                <element name="expdef" type="string" flags="34"/>
    4949                <element name="reload" function="true" flags="2"/>
     
    6868                        <description><![CDATA[names of shows excluded from the show menu. Use * as a wildcard.]]></description>
    6969                </element>
     70                <element name="openfilename" type="string" flags="33">
     71                        <description><![CDATA[Filename to be opened in onAppOpenFile()]]></description>
     72                </element>
    7073        </type>
    7174        <type name="class" context="neuro file">
     
    7376                <element name="longname" type="string"/>
    7477                <element name="description" type="string"/>
    75                 <element name="code" type="string"/>
     78                <element name="code" type="string" flags="16384"/>
    7679                <element name="prefinputs" type="integer"/>
    7780                <element name="prefoutput" type="integer" min="0" max="1"/>
     
    8285        <type name="script" context="script file">
    8386                <element name="name" type="string"/>
    84                 <element name="code" type="string"/>
     87                <element name="code" type="string" flags="16384"/>
    8588                <element name="help" type="string"/>
    8689                <element name="group" type="string"/>
     
    126129                <element name="gnum" type="integer"/>
    127130                <element name="buildproblems" type="integer" flags="34"/>
    128                 <element name="energ0" type="float"/>
     131                <element name="energ0" type="float" deprecated="true" flags="8226"/>
     132                <element name="energy0" type="float"/>
    129133                <element name="idleen" type="float"/>
    130134                <element name="energy" type="float"/>
     
    293297                        </arguments>
    294298                </element>
    295                 <element name="selfmask" type="integer" min="0" max="2147483647" default="0" flags="32"/>
    296                 <element name="othermask" type="integer" min="0" max="2147483647" default="0" flags="32"/>
     299                <element name="selfmask" type="integer" min="0" max="2147483647" default="0" flags="32">
     300                        <description><![CDATA[Creature's selfmask is set according to the Creature's Population.selfmask. See Population.selfmask for detailed information about collision handling.]]></description>
     301                </element>
     302                <element name="othermask" type="integer" min="0" max="2147483647" default="0" flags="32">
     303                        <description><![CDATA[Creature's othermask is set according to the Creature's Population.othermask. See Population.selfmask for detailed information about collision handling.]]></description>
     304                </element>
    297305                <element name="geno" type="Geno" flags="35">
    298306                        <description><![CDATA[Source genotype for this creature]]></description>
     
    399407                </element>
    400408                <element name="gnum" type="integer"/>
    401                 <element name="energ0" type="float"/>
     409                <element name="energy0" type="float"/>
    402410                <element name="idleen" type="float"/>
    403411                <element name="energy" type="float"/>
     
    440448                        <description><![CDATA[By convention, the orientation of the creature is equal to the orientation of its first Part]]></description>
    441449                </element>
    442                 <element name="selfmask" type="integer" min="0" max="2147483647" default="0" flags="32"/>
    443                 <element name="othermask" type="integer" min="0" max="2147483647" default="0" flags="32"/>
     450                <element name="selfmask" type="integer" min="0" max="2147483647" default="0" flags="32">
     451                        <description><![CDATA[Creature's selfmask is set according to the Creature's Population.selfmask. See Population.selfmask for detailed information about collision handling.]]></description>
     452                </element>
     453                <element name="othermask" type="integer" min="0" max="2147483647" default="0" flags="32">
     454                        <description><![CDATA[Creature's othermask is set according to the Creature's Population.othermask. See Population.selfmask for detailed information about collision handling.]]></description>
     455                </element>
    444456                <element name="uid" type="string" flags="32"/>
    445457        </type>
    446458        <type name="Dictionary" context="Global context">
    447 <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).
    448 Example:
    449 var d=Dictionary.new(); d.set("name","John"); d.set("age",44);
    450 var i;
    451 for(i=0;i<d.size;i++) Simulator.print(d.getKey(i)+" is "+d.get(i));]]></description>
     459<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 (note that while iterating, the elements are returned in no particular order).
     460Examples:
     461        var d;
     462        d=Dictionary.new();
     463        d.set("name","John");
     464        d.set("age",44);
     465Another way of doing the same:
     466        d={};
     467        d["name"]="John";
     468        d["age"]=44;
     469And the most concise way:
     470        d={ "name":"John", "age":44 };
     471Iterating:
     472        for(var i=0;i<d.size;i++) Simulator.print(d.getKey(i)+" is "+d.get(i));]]></description>
    452473                <element name="clear" function="true" type="void" flags="256"><arguments/></element>
    453474                <element name="size" type="integer" flags="257"/>
    454475                <element name="remove" function="true" type="void" flags="256">
     476                        <description><![CDATA[Removes the named or indexed element (depending on the argument type: string or int).]]></description>
    455477                        <arguments>
    456478                                <argument name="key" type="untyped"/>
     
    458480                </element>
    459481                <element name="get" function="true" type="untyped" flags="256">
     482                        <description><![CDATA[Retrieves the named or indexed element (depending on the argument type: string or int). null is returned for nonexistent keys.
     483object.get(key) can be shortened to 'object[key]']]></description>
    460484                        <arguments>
    461485                                <argument name="key" type="untyped"/>
     
    463487                </element>
    464488                <element name="getKey" function="true" type="string" flags="256">
     489                        <description><![CDATA[Returns the key of the indexed element (0 <= index < size)]]></description>
    465490                        <arguments>
    466491                                <argument name="index" type="integer"/>
     
    468493                </element>
    469494                <element name="set" function="true" type="void" flags="256">
     495                        <description><![CDATA[Set element value for the specified key or index (depending on the argument type: string or int).
     496object.set(key,value) can be shortened to object[key]=value]]></description>
    470497                        <arguments>
    471498                                <argument name="key" type="untyped"/>
     
    473500                        </arguments>
    474501                </element>
    475                 <element name="find" function="true" type="string" flags="256">
    476                         <description><![CDATA[returns the element key or null if not found]]></description>
     502                <element name="find" function="true" type="untyped" flags="256">
     503                        <description><![CDATA[Returns the element key or null if not found.]]></description>
    477504                        <arguments>
    478505                                <argument name="value" type="untyped"/>
    479506                        </arguments>
    480507                </element>
    481                 <element name="new" function="true" type="Dictionary"><arguments/></element>
     508                <element name="new" function="true" type="Dictionary">
     509                        <description><![CDATA[Empty directory can be also created using the {} expression.]]></description>
     510<arguments/></element>
    482511                <element name="toString" type="string" flags="257"/>
    483512        </type>
     
    610639        </type>
    611640        <type name="GenePool" context="Global context">
    612 <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>
     641<description><![CDATA[GenePool objects are accessed by GenePools[index], or Genotype.genepool and created by GenePools.addGroup(). Usage of the static GenePool object is not recommended.
     642You can iterate directly over Genotypes in the GenePool using for(...in...) loops:
     643        for(var genotype in GenePools[0]) Simulator.print(genotype.name);
     644
     645See also: GenePools]]></description>
    613646                <element name="name" type="string"/>
    614647                <element name="index" type="integer" flags="35"/>
     
    616649                        <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>
    617650                </element>
    618                 <element name="totalpop" type="integer" flags="3">
    619                         <description><![CDATA[Takes into account the Genotype.instances field (which may give the total number of instances depending on the experiment definition).]]></description>
     651                <element name="genotype_instances" type="integer" flags="3">
     652                        <description><![CDATA[A sum of Genotype.instances values of all Genotypes in this gene pool.]]></description>
     653                </element>
     654                <element name="totalpop" type="integer" deprecated="true" flags="8195">
     655                        <description><![CDATA[Please use 'genotype_instances' instead of this field.]]></description>
    620656                </element>
    621657                <element name="fitness" type="string">
     
    639675                </element>
    640676                <element name="findGeno" function="true" type="integer" deprecated="true" flags="8226">
    641                         <description><![CDATA[Finds the Genotype matching the supplied Geno object.
    642 returns genotype index or -1 if not found.
    643 Deprecated. Use the more versatile find() instead of this function.]]></description>
     677                        <description><![CDATA[Finds the Genotype whose genes are identical to the supplied Geno object.
     678Returns the Genotype index or -1 if not found.
     679Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.]]></description>
    644680                        <arguments>
    645681                                <argument type="Geno"/>
     
    647683                </element>
    648684                <element name="findGenotype" function="true" type="Genotype" flags="34">
    649                         <description><![CDATA[Finds the Genotype matching the supplied Genotype object, Geno object, or genotype string.
    650 returns genotype object or null if not found.]]></description>
     685                        <description><![CDATA[Finds the Genotype whose genes are identical to the supplied Genotype object, Geno object, or genotype string.
     686Returns the Genotype object or null if not found.]]></description>
    651687                        <arguments>
    652688                                <argument name="genotype object or geno object or string genotype" type="untyped"/>
     
    661697                        <description><![CDATA[Creates a new Genotype from the supplied Geno object.
    662698Returns the created Genotype.
    663 Deprecated. Use the more versatile add() instead of this function.]]></description>
     699Deprecated. Use the more versatile GenePool.add() instead of this function.]]></description>
    664700                        <arguments>
    665701                                <argument type="Geno"/>
     
    668704                <element name="createFromGeno" function="true" type="Genotype" deprecated="true" flags="8226">
    669705                        <description><![CDATA[same as addGeno (to comply with createFrom... convention)
    670 Deprecated. Use the more versatile add() instead of this function.]]></description>
     706Deprecated. Use the more versatile GenePool.add() instead of this function.]]></description>
    671707                        <arguments>
    672708                                <argument name="genotype" type="Geno"/>
     
    674710                </element>
    675711                <element name="createFromString" function="true" type="Genotype" deprecated="true" flags="8226">
    676                         <description><![CDATA[Uses the supplied string argument
    677 Deprecated. Use the more versatile add() instead of this function.]]></description>
     712                        <description><![CDATA[Uses the supplied string argument.
     713Deprecated. Use the more versatile GenePool.add() instead of this function.]]></description>
    678714                        <arguments>
    679715                                <argument name="genotype" type="string"/>
     
    742778<arguments/></element>
    743779                <element name="mergeInstances" function="true" type="void" flags="34">
    744                         <description><![CDATA[Merge instances of the same genotype]]></description>
     780                        <description><![CDATA[Merges instances of the same genotype.]]></description>
    745781<arguments/></element>
    746782                <element name="splitInstances" function="true" type="void" flags="34">
    747                         <description><![CDATA[Split genotype instances]]></description>
     783                        <description><![CDATA[Splits genotype instances.]]></description>
    748784<arguments/></element>
    749785                <element name="iterator" type="Object" flags="291"/>
     
    766802                        </arguments>
    767803                </element>
     804                <element name="refreshGUI" function="true" type="void" flags="32">
     805                        <description><![CDATA[Notify list content changed]]></description>
     806<arguments/></element>
    768807        </type>
    769808        <type name="GenePools" context="Global context">
    770809<description><![CDATA[Manages all genotypes in the experiment, organized in one or more groups.
    771 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.
    772 
    773 // The old way:
    774 GenePools.newGenotype("X");
    775 GenePools.mutateSelected();
    776 Genotype.info="my favorite genotype";
    777 GenePools.copySelected(0);
    778 
    779 // Doing the same the new way:
    780 var g=Genotype.newFromGeno(GenMan.mutate(Geno.newFromString("X")));
    781 g.info="my favorite genotype";
    782 g.moveTo(GenePools[0]);]]></description>
     810You can iterate directly over GenePool objects in the GenePools collection using for(...in...) loops:
     811        for(var pool in GenePools) Simulator.print(pool.name);
     812
     813Before 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.
     814
     815The old way:
     816        GenePools.newGenotype("X");
     817        GenePools.mutateSelected();
     818        Genotype.info="my favorite genotype";
     819        GenePools.copySelected(0);
     820
     821Doing the same the new way:
     822        var g=Genotype.newFromGeno(GenMan.mutate(Geno.newFromString("X")));
     823        g.info="my favorite genotype";
     824        g.moveTo(GenePools[0]);]]></description>
    783825                <element name="group" type="integer" deprecated="true" flags="8226">
    784826                        <description><![CDATA[Index of the currently selected group (GenePool).]]></description>
     
    861903                </element>
    862904                <element name="findGenotype" function="true" type="integer" deprecated="true" flags="8226">
    863                         <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>
     905                        <description><![CDATA[Finds a genotype identical to the currently selected genotype. It is only useful when the currently selected genotype is not on the list of genotypes (for example it is a result of a genetic operator)
     906Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.]]></description>
    864907<arguments/></element>
    865908                <element name="findGenotypeForCreature" function="true" type="integer" deprecated="true" flags="8226">
    866                         <description><![CDATA[Finds a genotype matching the selected creature.]]></description>
     909                        <description><![CDATA[Finds a genotype identical to the genotype of the selected Creature.
     910Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.]]></description>
    867911<arguments/></element>
    868912                <element name="addGroup" function="true" type="GenePool" flags="34">
     
    14601504                        <description><![CDATA[Genotype format]]></description>
    14611505                </element>
    1462                 <element name="genotype" type="string" flags="257"/>
    1463                 <element name="isValid" type="integer" min="0" max="1" flags="257"/>
     1506                <element name="genotype" type="string" flags="257">
     1507                        <description><![CDATA[Genes as a string of characters]]></description>
     1508                </element>
     1509                <element name="isValid" type="integer" min="0" max="1" deprecated="true" flags="8449"/>
     1510                <element name="is_valid" type="integer" min="-1" max="1" default="-1" flags="256"/>
    14641511                <element name="getConverted" function="true" type="Geno" flags="256">
    14651512                        <arguments>
     
    14961543Before 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>
    14971544                <element name="name" type="string" max="40"/>
    1498                 <element name="genotype" type="string"/>
     1545                <element name="genotype" type="string">
     1546                        <description><![CDATA[Genes as a string of characters]]></description>
     1547                </element>
    14991548                <element name="info" type="string">
    15001549                        <description><![CDATA[Additional information or comments]]></description>
     
    15051554http://www.framsticks.com/node/890]]></description>
    15061555                </element>
    1507                 <element name="energ0" type="float" flags="3"/>
    1508                 <element name="strsiz" type="float" flags="35"/>
    1509                 <element name="strjoints" type="float" flags="35"/>
    1510                 <element name="nnsiz" type="float" flags="35"/>
    1511                 <element name="nncon" type="float" flags="35"/>
    1512                 <element name="numparts" type="float" flags="3"/>
    1513                 <element name="numjoints" type="float" flags="3"/>
    1514                 <element name="numneurons" type="float" flags="3"/>
    1515                 <element name="numconnections" type="float" flags="3"/>
     1556                <element name="energ0" type="float" deprecated="true" flags="8227"/>
     1557                <element name="energy0" type="float" min="0" max="-1" default="0.0" flags="16"/>
     1558                <element name="strsiz" type="integer" deprecated="true" flags="8227"/>
     1559                <element name="strjoints" type="integer" deprecated="true" flags="8227"/>
     1560                <element name="nnsiz" type="integer" deprecated="true" flags="8227"/>
     1561                <element name="nncon" type="integer" deprecated="true" flags="8227"/>
     1562                <element name="numparts" type="integer" flags="16"/>
     1563                <element name="numjoints" type="integer" flags="16"/>
     1564                <element name="numneurons" type="integer" flags="16"/>
     1565                <element name="numconnections" type="integer" flags="16"/>
    15161566                <element name="num" type="integer"/>
    15171567                <element name="gnum" type="integer"/>
    1518                 <element name="popsiz" type="integer" flags="32"/>
    1519                 <element name="instances" type="integer" flags="2">
     1568                <element name="popsiz" type="integer" deprecated="true" flags="8226">
     1569                        <description><![CDATA[Please use 'instances' instead of 'popsiz'.]]></description>
     1570                </element>
     1571                <element name="instances" type="integer">
    15201572                        <description><![CDATA[Copies of this genotype]]></description>
    15211573                </element>
     
    15411593                <element name="user3" type="untyped"/>
    15421594                <element name="mutate" function="true" type="void"><arguments/></element>
    1543                 <element name="isValid" type="integer" min="0" max="1" flags="35"/>
     1595                <element name="isValid" type="integer" min="0" max="1" deprecated="true" flags="8227"/>
     1596                <element name="is_valid" type="integer" min="-1" max="1" default="-1" flags="32"/>
    15441597                <element name="getNormalized" function="true" type="float" flags="35">
    15451598                        <arguments>
     
    15481601                </element>
    15491602                <element name="geno" type="Geno" flags="35">
    1550                         <description><![CDATA[Geno object for this Genotype]]></description>
     1603                        <description><![CDATA[A Geno object for this Genotype]]></description>
    15511604                </element>
    15521605                <element name="uid" type="string" flags="33">
     
    15991652Note 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>
    16001653                </element>
     1654                <element name="beforeLoad" function="true" type="void" flags="32"><arguments/></element>
     1655                <element name="afterLoad" function="true" type="void" flags="32"><arguments/></element>
    16011656        </type>
    16021657        <type name="Interface" context="Global context">
     
    19862041http://www.framsticks.com/node/795
    19872042http://www.framsticks.com/node/890]]></description>
    1988                 <element name="simil_method" type="integer" min="0" max="1" default="0">
    1989                         <description><![CDATA[]]></description>
    1990                 </element>
    19912043                <element name="simil_parts" type="float" min="0" max="100" default="0.0">
    19922044                        <description><![CDATA[Differing number of parts is also handled by the 'part degree' similarity component.]]></description>
     
    19952047                        <description><![CDATA[]]></description>
    19962048                </element>
    1997                 <element name="simil_neuro" type="float" min="0" max="100" default="0.5">
     2049                <element name="simil_neuro" type="float" min="0" max="100" default="0.1">
     2050                        <description><![CDATA[]]></description>
     2051                </element>
     2052                <element name="simil_partgeom" type="float" min="0" max="100" default="0.0">
    19982053                        <description><![CDATA[]]></description>
    19992054                </element>
     
    27352790        </type>
    27362791        <type name="Population" context="Global context">
    2737 <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>
     2792<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).
     2793You can iterate directly over Creatures in a Population using for(...in...) loops:
     2794        for(var c in Populations[0]) Simulator.print(c.name);]]></description>
    27382795                <element name="index" type="integer" flags="35"/>
    27392796                <element name="name" type="string"/>
     
    27492806                </element>
    27502807                <element name="perfperiod" type="integer" min="0" max="1000000" default="100">
    2751                         <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>
     2808                        <description><![CDATA[Defines how often onUpdate() events are called and how often the built-in performance counters (distance, speed, etc.) are calculated.]]></description>
    27522809                </element>
    27532810                <element name="stabilperiod" type="integer" min="0" max="1000000" default="100">
     
    27632820                        <description><![CDATA[Stabilization means no significant movement during a specified period of time.]]></description>
    27642821                </element>
    2765                 <element name="colmask" type="integer" min="0" max="65535" default="0" flags="32">
    2766                         <description><![CDATA[DEPRECATED. You should use selfmask and othermask (these masks are also much easier to understand than the old colmask field).]]></description>
     2822                <element name="colmask" type="integer" min="0" max="65535" default="0" deprecated="true" flags="8224">
     2823                        <description><![CDATA[You should use selfmask and othermask instead of colmask (these masks are also much easier to understand than the old colmask field).]]></description>
    27672824                </element>
    27682825                <element name="selfmask" type="integer" min="0" max="2147483647" default="0" flags="32">
     
    27822839
    278328401.With one group, all possible combinations of the collision handlers are as follows:
    2784   - ignore collisions (e.g. selfmask=othermask=0)
    2785   - use standard handling (e.g. selfmask=othermask=1)
    2786   - use custom handling (e.g. selfmask=othermask=0x10000)
    2787   - use standard and custom handling (e.g. selfmask=othermask=0x10001)
     2841        - ignore collisions (e.g. selfmask=othermask=0)
     2842        - use standard handling (e.g. selfmask=othermask=1)
     2843        - use custom handling (e.g. selfmask=othermask=0x10000)
     2844        - use standard and custom handling (e.g. selfmask=othermask=0x10001)
    27882845
    278928462.Two groups yield more interesting cases. Let us consider the 'standard.expdef' setting:
    2790   Creatures: selfmask=0x10001, othermask=0x20001
    2791   Food: selfmask=0x20002, othermask=0x10002
     2847        Creatures: selfmask=0x10001, othermask=0x20001
     2848        Food: selfmask=0x20002, othermask=0x10002
    27922849There are three possible scenarios:
    2793 - creature and creature: collision value = 0x10001 & 0x20001 = 1 -> Standard handling will be used (1 is one of the lower 16 bits)
    2794 - food and food: collision value = 0x20002 & 0x10002 = 2 -> As above.
    2795 - creature and food: collision value = (0x10001 & 0x10002) or (0x20002 & 0x20001) = 0x10000 or 0x20000 -> Custom handling will be used (the result falls into higher 16 bits).
     2850        - creature and creature: collision value = 0x10001 & 0x20001 = 1 -> Standard handling will be used (1 is one of the lower 16 bits)
     2851        - food and food: collision value = 0x20002 & 0x10002 = 2 -> As above.
     2852        - creature and food: collision value = (0x10001 & 0x10002) or (0x20002 & 0x20001) = 0x10000 or 0x20000 -> Custom handling will be used (the result falls into higher 16 bits).
    27962853]]></description>
    27972854                </element>
     
    28562913 - exclude (creature object)
    28572914works like a smell sensor for a given property (for all creatures in this group except "exclude").
    2858 The following function reproduces the "classic" framsticks "S" sensor:
    2859 function smellReceptorValue(x,y,z,exclude)
    2860 {
    2861 var i,s=0; for(i=0;i<Populations.size;i++)
    2862         s+=Populations[0].senseCreaturesProperty(x,y,z,"energy",exclude);
    2863 return s;
    2864 }]]></description>
     2915The following function reproduces the "classic" Framsticks "S" sensor:
     2916        function smellReceptorValue(x, y, z, exclude)
     2917        {
     2918        var i,s=0;
     2919        for(i=0; i<Populations.size; i++)
     2920                s += Populations[0].senseCreaturesProperty(x, y, z, "energy", exclude);
     2921        return s;
     2922        }]]></description>
    28652923                        <arguments>
    28662924                                <argument name="x" type="float"/>
     
    29112969                        </arguments>
    29122970                </element>
     2971                <element name="refreshGUI" function="true" type="void" flags="32">
     2972                        <description><![CDATA[Notify list content changed]]></description>
     2973<arguments/></element>
    29132974        </type>
    29142975        <type name="Populations" context="Global context">
    29152976<description><![CDATA[Manages all Creature objects in the experiment, organized in one or more groups.
     2977You can iterate directly over Population objects in the Populations collection using for(...in...) loops:
     2978        for(var pop in Populations) Simulator.print(pop.name);
     2979
    29162980Before version 4.0rc4 some operations could only be performed on the "selected" creature (the one pointed to by group/creature fields in Populations). Currently, the more convenient and recommended way is to call Creatures's functions that operate directly on the passed objects.
    29172981
    2918 // The old way:
    2919 Populations.group=0;
    2920 Populations.creature=0;
    2921 GenePools.getFromCreature();
    2922 GenePools.copyTo(0);
    2923 
    2924 // Doing the same the new way:
    2925 Genotype.newFromCreature(Populations[0][0]).moveTo(GenePools[0]);
     2982The old way:
     2983        Populations.group=0;
     2984        Populations.creature=0;
     2985        GenePools.getFromCreature();
     2986        GenePools.copyTo(0);
     2987
     2988Doing the same the new way:
     2989        Genotype.newFromCreature(Populations[0][0]).moveTo(GenePools[0]);
    29262990
    29272991See also: Creature, Population.]]></description>
     
    30733137        </type>
    30743138        <type name="SignalView" context="Global context">
     3139<description><![CDATA[This object can be used by an Experiment Definition or a Framsticks Theater show script to configure the preferred Signal visualization in the experiment. SignalView.mode and SignalView.label can also be adjusted in the Framsticks GUI (overriding the script-configured state).]]></description>
    30753140                <element name="clear" function="true">
    30763141                        <description><![CDATA[Removes custom display settings that might have been defined by various scripts (expdef or show).]]></description>
     
    31723237                <element name="import" function="true" type="void" flags="32">
    31733238                        <description><![CDATA[Load some data from file. The second optional argument selects what section(s) will be imported:
    3174  1 - experiment (works like "load" and can reset the simulator state!)
    3175  2 - genotypes
    3176  4 - simulator parameters
    3177  8 - genepool settings
    3178  16 - population settings
    3179  32 - new groups will be created for imported genepools and populations
    3180 64 - allow switching to a different expdef while importing parameters (4)
     3239        1 - experiment (works like "load" and can reset the simulator state!)
     3240        2 - genotypes
     3241        4 - simulator parameters
     3242        8 - genepool settings
     3243        16 - population settings
     3244        32 - new groups will be created for imported genepools and populations
     3245        64 - allow switching to a different expdef while importing parameters (4)
    31813246
    31823247The standard behavior (without the second argument) is to import genotypes, parameters, and genepool and population settings (2+4+8+16). Note that "64" is not included by default, because the expdef change resets all simulator parameters, which contradicts the usual meaning of "import" in Framsticks ("add data", as opposed to "load" meaning "replace data"). Moreover, using the "64" option in scripts can be dengerous, especially all expdef and show scripts should always declare the proper expdef name in their header rather than change the expdef directly. Without the "64" option, it is always safe to "import" any file in a script regardless of the current simulator state.]]></description>
     
    32793344                        <description><![CDATA[Creatures grown with warnings will not be simulated.]]></description>
    32803345                </element>
    3281                 <element name="importchk" type="integer" min="0" max="1"/>
    3282                 <element name="loadchk" type="integer" min="0" max="1"/>
    3283                 <element name="groupchk" type="integer" min="0" max="1"/>
     3346                <element name="groupchk" type="integer" min="0" max="1" default="1"/>
    32843347                <element name="vmdebug" type="integer" min="0" max="1"/>
    32853348                <element name="resetToDefaults" function="true" type="void">
     
    32983361                <element name="expparams" type="ExpParams" flags="35"/>
    32993362                <element name="expstate" type="ExpState" flags="35"/>
     3363                <element name="genman" type="GenMan" flags="35"/>
    33003364                <element name="loadNeurons" function="true" type="void" flags="32">
    33013365                        <arguments>
     
    33073371                        <description><![CDATA[-1 for master simulator, 0...count-1 for slaves]]></description>
    33083372                </element>
     3373                <element name="refreshGUI" function="true" type="void" flags="32">
     3374                        <description><![CDATA[Notify all populations and gene pools content changed.]]></description>
     3375<arguments/></element>
    33093376                <element name="clear" function="true" flags="34"/>
    33103377                <element name="add" function="true" flags="34"/>
     
    41914258   time (t) float 0..6.28319]]></description>
    41924259                </element>
    4193                 <element name="simil_method" type="integer" min="0" max="1" default="0">
    4194                         <description><![CDATA[]]></description>
    4195                 </element>
    41964260                <element name="simil_parts" type="float" min="0" max="100" default="0.0">
    41974261                        <description><![CDATA[Differing number of parts is also handled by the 'part degree' similarity component.]]></description>
     
    42004264                        <description><![CDATA[]]></description>
    42014265                </element>
    4202                 <element name="simil_neuro" type="float" min="0" max="100" default="0.5">
     4266                <element name="simil_neuro" type="float" min="0" max="100" default="0.1">
     4267                        <description><![CDATA[]]></description>
     4268                </element>
     4269                <element name="simil_partgeom" type="float" min="0" max="100" default="0.0">
    42034270                        <description><![CDATA[]]></description>
    42044271                </element>
     
    43244391                <element name="import" function="true" type="void" flags="32">
    43254392                        <description><![CDATA[Load some data from file. The second optional argument selects what section(s) will be imported:
    4326  1 - experiment (works like "load" and can reset the simulator state!)
    4327  2 - genotypes
    4328  4 - simulator parameters
    4329  8 - genepool settings
    4330  16 - population settings
    4331  32 - new groups will be created for imported genepools and populations
    4332 64 - allow switching to a different expdef while importing parameters (4)
     4393        1 - experiment (works like "load" and can reset the simulator state!)
     4394        2 - genotypes
     4395        4 - simulator parameters
     4396        8 - genepool settings
     4397        16 - population settings
     4398        32 - new groups will be created for imported genepools and populations
     4399        64 - allow switching to a different expdef while importing parameters (4)
    43334400
    43344401The standard behavior (without the second argument) is to import genotypes, parameters, and genepool and population settings (2+4+8+16). Note that "64" is not included by default, because the expdef change resets all simulator parameters, which contradicts the usual meaning of "import" in Framsticks ("add data", as opposed to "load" meaning "replace data"). Moreover, using the "64" option in scripts can be dengerous, especially all expdef and show scripts should always declare the proper expdef name in their header rather than change the expdef directly. Without the "64" option, it is always safe to "import" any file in a script regardless of the current simulator state.]]></description>
     
    44314498                        <description><![CDATA[Creatures grown with warnings will not be simulated.]]></description>
    44324499                </element>
    4433                 <element name="importchk" type="integer" min="0" max="1"/>
    4434                 <element name="loadchk" type="integer" min="0" max="1"/>
    4435                 <element name="groupchk" type="integer" min="0" max="1"/>
     4500                <element name="groupchk" type="integer" min="0" max="1" default="1"/>
    44364501                <element name="vmdebug" type="integer" min="0" max="1"/>
    44374502                <element name="resetToDefaults" function="true" type="void">
     
    44504515                <element name="expparams" type="ExpParams" flags="35"/>
    44514516                <element name="expstate" type="ExpState" flags="35"/>
     4517                <element name="genman" type="GenMan" flags="35"/>
    44524518                <element name="loadNeurons" function="true" type="void" flags="32">
    44534519                        <arguments>
     
    44594525                        <description><![CDATA[-1 for master simulator, 0...count-1 for slaves]]></description>
    44604526                </element>
     4527                <element name="refreshGUI" function="true" type="void" flags="32">
     4528                        <description><![CDATA[Notify all populations and gene pools content changed.]]></description>
     4529<arguments/></element>
    44614530        </type>
    44624531        <type name="SlaveSimulators" context="Global context">
     
    48464915        </type>
    48474916        <type name="Vector" context="Global context">
    4848 <description><![CDATA[Vector is 1-dimensional array, indexed by integer value (starting from 0). Multidimensional arrays can be simulated by putting other Vector objects into the Vector.
    4849 Example:
    4850 var v=Vector.new();
    4851 v.add(123); v.add("string");]]></description>
     4917<description><![CDATA[Vector is a 1-dimensional array indexed by an integer value (starting from 0). Multidimensional arrays can be simulated by putting other Vector objects into a Vector.
     4918Examples:
     4919        var v1=Vector.new();
     4920        v1.add(123);
     4921        v1.add("string");
     4922A short way of doing the same (square brackets create a vector):
     4923        var v2=[123,"string"];
     4924Simulate a 2D array:
     4925        var v3=[[1,2,3],[4,5],[6]];
     4926You can iterate directly over values of a Vector using for(...in...) loops:
     4927        for(var element in v3) Simulator.print(element);]]></description>
    48524928                <element name="clear" function="true" type="void" flags="256"><arguments/></element>
    48534929                <element name="size" type="integer" flags="257"/>
     
    48584934                </element>
    48594935                <element name="get" function="true" type="untyped" flags="256">
     4936                        <description><![CDATA[object[position] can be always used instead of object.get(position)]]></description>
    48604937                        <arguments>
    48614938                                <argument name="position" type="integer"/>
     
    48634940                </element>
    48644941                <element name="set" function="true" type="void" flags="256">
     4942                        <description><![CDATA[object[position]=value can be always used instead of object.set(position,value)]]></description>
    48654943                        <arguments>
    48664944                                <argument name="position" type="integer"/>
     
    52615339Before 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>
    52625340                <element name="name" type="string" max="40"/>
    5263                 <element name="genotype" type="string"/>
     5341                <element name="genotype" type="string">
     5342                        <description><![CDATA[Genes as a string of characters]]></description>
     5343                </element>
    52645344                <element name="info" type="string">
    52655345                        <description><![CDATA[Additional information or comments]]></description>
     
    52705350http://www.framsticks.com/node/890]]></description>
    52715351                </element>
    5272                 <element name="energ0" type="float" flags="3"/>
    5273                 <element name="strsiz" type="float" flags="35"/>
    5274                 <element name="strjoints" type="float" flags="35"/>
    5275                 <element name="nnsiz" type="float" flags="35"/>
    5276                 <element name="nncon" type="float" flags="35"/>
    5277                 <element name="numparts" type="float" flags="3"/>
    5278                 <element name="numjoints" type="float" flags="3"/>
    5279                 <element name="numneurons" type="float" flags="3"/>
    5280                 <element name="numconnections" type="float" flags="3"/>
     5352                <element name="energ0" type="float" deprecated="true" flags="8227"/>
     5353                <element name="energy0" type="float" min="0" max="-1" default="0.0" flags="16"/>
     5354                <element name="strsiz" type="integer" deprecated="true" flags="8227"/>
     5355                <element name="strjoints" type="integer" deprecated="true" flags="8227"/>
     5356                <element name="nnsiz" type="integer" deprecated="true" flags="8227"/>
     5357                <element name="nncon" type="integer" deprecated="true" flags="8227"/>
     5358                <element name="numparts" type="integer" flags="16"/>
     5359                <element name="numjoints" type="integer" flags="16"/>
     5360                <element name="numneurons" type="integer" flags="16"/>
     5361                <element name="numconnections" type="integer" flags="16"/>
    52815362                <element name="num" type="integer"/>
    52825363                <element name="gnum" type="integer"/>
    5283                 <element name="popsiz" type="integer" flags="32"/>
    5284                 <element name="instances" type="integer" flags="2">
     5364                <element name="popsiz" type="integer" deprecated="true" flags="8226">
     5365                        <description><![CDATA[Please use 'instances' instead of 'popsiz'.]]></description>
     5366                </element>
     5367                <element name="instances" type="integer">
    52855368                        <description><![CDATA[Copies of this genotype]]></description>
    52865369                </element>
     
    53065389                <element name="user3" type="untyped"/>
    53075390                <element name="mutate" function="true" type="void"><arguments/></element>
    5308                 <element name="isValid" type="integer" min="0" max="1" flags="35"/>
     5391                <element name="isValid" type="integer" min="0" max="1" deprecated="true" flags="8227"/>
     5392                <element name="is_valid" type="integer" min="-1" max="1" default="-1" flags="32"/>
    53095393                <element name="getNormalized" function="true" type="float" flags="35">
    53105394                        <arguments>
     
    53135397                </element>
    53145398                <element name="geno" type="Geno" flags="35">
    5315                         <description><![CDATA[Geno object for this Genotype]]></description>
     5399                        <description><![CDATA[A Geno object for this Genotype]]></description>
    53165400                </element>
    53175401                <element name="uid" type="string" flags="33">
     
    53645448Note 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>
    53655449                </element>
     5450                <element name="beforeLoad" function="true" type="void" flags="32"><arguments/></element>
     5451                <element name="afterLoad" function="true" type="void" flags="32"><arguments/></element>
    53665452        </type>
    53675453        <type name="Creature" context="Visual style definition">
     
    53845470                <element name="gnum" type="integer"/>
    53855471                <element name="buildproblems" type="integer" flags="34"/>
    5386                 <element name="energ0" type="float"/>
     5472                <element name="energ0" type="float" deprecated="true" flags="8226"/>
     5473                <element name="energy0" type="float"/>
    53875474                <element name="idleen" type="float"/>
    53885475                <element name="energy" type="float"/>
     
    55515638                        </arguments>
    55525639                </element>
    5553                 <element name="selfmask" type="integer" min="0" max="2147483647" default="0" flags="32"/>
    5554                 <element name="othermask" type="integer" min="0" max="2147483647" default="0" flags="32"/>
     5640                <element name="selfmask" type="integer" min="0" max="2147483647" default="0" flags="32">
     5641                        <description><![CDATA[Creature's selfmask is set according to the Creature's Population.selfmask. See Population.selfmask for detailed information about collision handling.]]></description>
     5642                </element>
     5643                <element name="othermask" type="integer" min="0" max="2147483647" default="0" flags="32">
     5644                        <description><![CDATA[Creature's othermask is set according to the Creature's Population.othermask. See Population.selfmask for detailed information about collision handling.]]></description>
     5645                </element>
    55555646                <element name="geno" type="Geno" flags="35">
    55565647                        <description><![CDATA[Source genotype for this creature]]></description>
     
    59546045                <element name="name" type="string" flags="19"/>
    59556046                <element name="info" type="string" flags="19"/>
    5956                 <element name="code" type="string" flags="35"/>
     6047                <element name="code" type="string" flags="16419"/>
    59576048                <element name="streload" function="true" flags="2"/>
    59586049                <element name="rebuild" function="true" flags="34"/>
     
    63796470                <element name="userspeed" type="integer" min="0" max="5" default="3" flags="2"/>
    63806471                <element name="showlog" type="integer" min="0" max="1" flags="2"/>
    6381                 <element name="code" type="string" flags="34"/>
     6472                <element name="code" type="string" flags="16418"/>
    63826473                <element name="expdef" type="string" flags="34"/>
    63836474                <element name="reload" function="true" flags="2"/>
     
    64016492                <element name="excludeshows" type="string" flags="32">
    64026493                        <description><![CDATA[names of shows excluded from the show menu. Use * as a wildcard.]]></description>
     6494                </element>
     6495                <element name="openfilename" type="string" flags="33">
     6496                        <description><![CDATA[Filename to be opened in onAppOpenFile()]]></description>
    64036497                </element>
    64046498                <element name="clear" function="true" flags="34"/>
     
    64486542                <element name="cam_chspeed" type="float" min="0.1" max="10" default="1.0"/>
    64496543                <element name="cam_zoom" type="float" min="0.2" max="3" default="0.8"/>
    6450                 <element name="cam_dir" type="float" min="0" max="360" default="30.0"/>
    6451                 <element name="cam_h" type="float" min="0" max="360" default="45.0">
     6544                <element name="cam_dir" type="float" min="0" max="-1" default="30.0"/>
     6545                <element name="cam_h" type="float" min="-90" max="90" default="45.0">
    64526546                        <description><![CDATA[0=side view, 90=top view]]></description>
    64536547                </element>
     
    64836577                </element>
    64846578                <element name="interacting" type="integer" min="0" max="2" flags="35"/>
     6579                <element name="tick" function="true" type="void" flags="32">
     6580                        <description><![CDATA[Display-less command line scripts can use tick() to advance time between frames]]></description>
     6581                        <arguments>
     6582                                <argument name="time span" type="float"/>
     6583                        </arguments>
     6584                </element>
    64856585        </type>
    64866586        <type name="VisualStyle" context="Command line interface">
     
    64886588                <element name="name" type="string" flags="19"/>
    64896589                <element name="info" type="string" flags="19"/>
    6490                 <element name="code" type="string" flags="35"/>
     6590                <element name="code" type="string" flags="16419"/>
    64916591                <element name="streload" function="true" flags="2"/>
    64926592                <element name="rebuild" function="true" flags="34"/>
Note: See TracChangeset for help on using the changeset viewer.