Changeset 417 for java/FramclipsePlugin/src/main
- Timestamp:
- 07/14/15 02:13:58 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/FramclipsePlugin/src/main/resources/framscript.xml
r331 r417 6 6 <element name="name" type="string"/> 7 7 <element name="info" type="string"/> 8 <element name="code" type="string" />8 <element name="code" type="string" flags="16384"/> 9 9 <element name="neurons" type="string"/> 10 10 </type> … … 30 30 <element name="name" type="string" flags="19"/> 31 31 <element name="info" type="string" flags="19"/> 32 <element name="code" type="string" flags=" 35"/>32 <element name="code" type="string" flags="16419"/> 33 33 <element name="streload" function="true" flags="2"/> 34 34 <element name="rebuild" function="true" flags="34"/> … … 45 45 <element name="userspeed" type="integer" min="0" max="5" default="3" flags="2"/> 46 46 <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"/> 48 48 <element name="expdef" type="string" flags="34"/> 49 49 <element name="reload" function="true" flags="2"/> … … 68 68 <description><![CDATA[names of shows excluded from the show menu. Use * as a wildcard.]]></description> 69 69 </element> 70 <element name="openfilename" type="string" flags="33"> 71 <description><![CDATA[Filename to be opened in onAppOpenFile()]]></description> 72 </element> 70 73 </type> 71 74 <type name="class" context="neuro file"> … … 73 76 <element name="longname" type="string"/> 74 77 <element name="description" type="string"/> 75 <element name="code" type="string" />78 <element name="code" type="string" flags="16384"/> 76 79 <element name="prefinputs" type="integer"/> 77 80 <element name="prefoutput" type="integer" min="0" max="1"/> … … 82 85 <type name="script" context="script file"> 83 86 <element name="name" type="string"/> 84 <element name="code" type="string" />87 <element name="code" type="string" flags="16384"/> 85 88 <element name="help" type="string"/> 86 89 <element name="group" type="string"/> … … 126 129 <element name="gnum" type="integer"/> 127 130 <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"/> 129 133 <element name="idleen" type="float"/> 130 134 <element name="energy" type="float"/> … … 293 297 </arguments> 294 298 </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> 297 305 <element name="geno" type="Geno" flags="35"> 298 306 <description><![CDATA[Source genotype for this creature]]></description> … … 399 407 </element> 400 408 <element name="gnum" type="integer"/> 401 <element name="energ 0" type="float"/>409 <element name="energy0" type="float"/> 402 410 <element name="idleen" type="float"/> 403 411 <element name="energy" type="float"/> … … 440 448 <description><![CDATA[By convention, the orientation of the creature is equal to the orientation of its first Part]]></description> 441 449 </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> 444 456 <element name="uid" type="string" flags="32"/> 445 457 </type> 446 458 <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). 460 Examples: 461 var d; 462 d=Dictionary.new(); 463 d.set("name","John"); 464 d.set("age",44); 465 Another way of doing the same: 466 d={}; 467 d["name"]="John"; 468 d["age"]=44; 469 And the most concise way: 470 d={ "name":"John", "age":44 }; 471 Iterating: 472 for(var i=0;i<d.size;i++) Simulator.print(d.getKey(i)+" is "+d.get(i));]]></description> 452 473 <element name="clear" function="true" type="void" flags="256"><arguments/></element> 453 474 <element name="size" type="integer" flags="257"/> 454 475 <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> 455 477 <arguments> 456 478 <argument name="key" type="untyped"/> … … 458 480 </element> 459 481 <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. 483 object.get(key) can be shortened to 'object[key]']]></description> 460 484 <arguments> 461 485 <argument name="key" type="untyped"/> … … 463 487 </element> 464 488 <element name="getKey" function="true" type="string" flags="256"> 489 <description><![CDATA[Returns the key of the indexed element (0 <= index < size)]]></description> 465 490 <arguments> 466 491 <argument name="index" type="integer"/> … … 468 493 </element> 469 494 <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). 496 object.set(key,value) can be shortened to object[key]=value]]></description> 470 497 <arguments> 471 498 <argument name="key" type="untyped"/> … … 473 500 </arguments> 474 501 </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> 477 504 <arguments> 478 505 <argument name="value" type="untyped"/> 479 506 </arguments> 480 507 </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> 482 511 <element name="toString" type="string" flags="257"/> 483 512 </type> … … 610 639 </type> 611 640 <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. 642 You can iterate directly over Genotypes in the GenePool using for(...in...) loops: 643 for(var genotype in GenePools[0]) Simulator.print(genotype.name); 644 645 See also: GenePools]]></description> 613 646 <element name="name" type="string"/> 614 647 <element name="index" type="integer" flags="35"/> … … 616 649 <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> 617 650 </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> 620 656 </element> 621 657 <element name="fitness" type="string"> … … 639 675 </element> 640 676 <element name="findGeno" function="true" type="integer" deprecated="true" flags="8226"> 641 <description><![CDATA[Finds the Genotype matchingthe 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. 678 Returns the Genotype index or -1 if not found. 679 Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.]]></description> 644 680 <arguments> 645 681 <argument type="Geno"/> … … 647 683 </element> 648 684 <element name="findGenotype" function="true" type="Genotype" flags="34"> 649 <description><![CDATA[Finds the Genotype matchingthe 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. 686 Returns the Genotype object or null if not found.]]></description> 651 687 <arguments> 652 688 <argument name="genotype object or geno object or string genotype" type="untyped"/> … … 661 697 <description><![CDATA[Creates a new Genotype from the supplied Geno object. 662 698 Returns the created Genotype. 663 Deprecated. Use the more versatile add() instead of this function.]]></description>699 Deprecated. Use the more versatile GenePool.add() instead of this function.]]></description> 664 700 <arguments> 665 701 <argument type="Geno"/> … … 668 704 <element name="createFromGeno" function="true" type="Genotype" deprecated="true" flags="8226"> 669 705 <description><![CDATA[same as addGeno (to comply with createFrom... convention) 670 Deprecated. Use the more versatile add() instead of this function.]]></description>706 Deprecated. Use the more versatile GenePool.add() instead of this function.]]></description> 671 707 <arguments> 672 708 <argument name="genotype" type="Geno"/> … … 674 710 </element> 675 711 <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. 713 Deprecated. Use the more versatile GenePool.add() instead of this function.]]></description> 678 714 <arguments> 679 715 <argument name="genotype" type="string"/> … … 742 778 <arguments/></element> 743 779 <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> 745 781 <arguments/></element> 746 782 <element name="splitInstances" function="true" type="void" flags="34"> 747 <description><![CDATA[Split genotype instances]]></description>783 <description><![CDATA[Splits genotype instances.]]></description> 748 784 <arguments/></element> 749 785 <element name="iterator" type="Object" flags="291"/> … … 766 802 </arguments> 767 803 </element> 804 <element name="refreshGUI" function="true" type="void" flags="32"> 805 <description><![CDATA[Notify list content changed]]></description> 806 <arguments/></element> 768 807 </type> 769 808 <type name="GenePools" context="Global context"> 770 809 <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> 810 You 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 813 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. 814 815 The old way: 816 GenePools.newGenotype("X"); 817 GenePools.mutateSelected(); 818 Genotype.info="my favorite genotype"; 819 GenePools.copySelected(0); 820 821 Doing 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> 783 825 <element name="group" type="integer" deprecated="true" flags="8226"> 784 826 <description><![CDATA[Index of the currently selected group (GenePool).]]></description> … … 861 903 </element> 862 904 <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) 906 Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.]]></description> 864 907 <arguments/></element> 865 908 <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. 910 Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.]]></description> 867 911 <arguments/></element> 868 912 <element name="addGroup" function="true" type="GenePool" flags="34"> … … 1460 1504 <description><![CDATA[Genotype format]]></description> 1461 1505 </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"/> 1464 1511 <element name="getConverted" function="true" type="Geno" flags="256"> 1465 1512 <arguments> … … 1496 1543 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> 1497 1544 <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> 1499 1548 <element name="info" type="string"> 1500 1549 <description><![CDATA[Additional information or comments]]></description> … … 1505 1554 http://www.framsticks.com/node/890]]></description> 1506 1555 </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"/> 1516 1566 <element name="num" type="integer"/> 1517 1567 <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"> 1520 1572 <description><![CDATA[Copies of this genotype]]></description> 1521 1573 </element> … … 1541 1593 <element name="user3" type="untyped"/> 1542 1594 <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"/> 1544 1597 <element name="getNormalized" function="true" type="float" flags="35"> 1545 1598 <arguments> … … 1548 1601 </element> 1549 1602 <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> 1551 1604 </element> 1552 1605 <element name="uid" type="string" flags="33"> … … 1599 1652 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> 1600 1653 </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> 1601 1656 </type> 1602 1657 <type name="Interface" context="Global context"> … … 1986 2041 http://www.framsticks.com/node/795 1987 2042 http://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>1991 2043 <element name="simil_parts" type="float" min="0" max="100" default="0.0"> 1992 2044 <description><![CDATA[Differing number of parts is also handled by the 'part degree' similarity component.]]></description> … … 1995 2047 <description><![CDATA[]]></description> 1996 2048 </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"> 1998 2053 <description><![CDATA[]]></description> 1999 2054 </element> … … 2735 2790 </type> 2736 2791 <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). 2793 You can iterate directly over Creatures in a Population using for(...in...) loops: 2794 for(var c in Populations[0]) Simulator.print(c.name);]]></description> 2738 2795 <element name="index" type="integer" flags="35"/> 2739 2796 <element name="name" type="string"/> … … 2749 2806 </element> 2750 2807 <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> 2752 2809 </element> 2753 2810 <element name="stabilperiod" type="integer" min="0" max="1000000" default="100"> … … 2763 2820 <description><![CDATA[Stabilization means no significant movement during a specified period of time.]]></description> 2764 2821 </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> 2767 2824 </element> 2768 2825 <element name="selfmask" type="integer" min="0" max="2147483647" default="0" flags="32"> … … 2782 2839 2783 2840 1.With one group, all possible combinations of the collision handlers are as follows: 2784 2785 2786 2787 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) 2788 2845 2789 2846 2.Two groups yield more interesting cases. Let us consider the 'standard.expdef' setting: 2790 2791 2847 Creatures: selfmask=0x10001, othermask=0x20001 2848 Food: selfmask=0x20002, othermask=0x10002 2792 2849 There 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). 2796 2853 ]]></description> 2797 2854 </element> … … 2856 2913 - exclude (creature object) 2857 2914 works 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> 2915 The 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> 2865 2923 <arguments> 2866 2924 <argument name="x" type="float"/> … … 2911 2969 </arguments> 2912 2970 </element> 2971 <element name="refreshGUI" function="true" type="void" flags="32"> 2972 <description><![CDATA[Notify list content changed]]></description> 2973 <arguments/></element> 2913 2974 </type> 2914 2975 <type name="Populations" context="Global context"> 2915 2976 <description><![CDATA[Manages all Creature objects in the experiment, organized in one or more groups. 2977 You 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 2916 2980 Before 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. 2917 2981 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]);2982 The old way: 2983 Populations.group=0; 2984 Populations.creature=0; 2985 GenePools.getFromCreature(); 2986 GenePools.copyTo(0); 2987 2988 Doing the same the new way: 2989 Genotype.newFromCreature(Populations[0][0]).moveTo(GenePools[0]); 2926 2990 2927 2991 See also: Creature, Population.]]></description> … … 3073 3137 </type> 3074 3138 <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> 3075 3140 <element name="clear" function="true"> 3076 3141 <description><![CDATA[Removes custom display settings that might have been defined by various scripts (expdef or show).]]></description> … … 3172 3237 <element name="import" function="true" type="void" flags="32"> 3173 3238 <description><![CDATA[Load some data from file. The second optional argument selects what section(s) will be imported: 3174 3175 3176 3177 3178 3179 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) 3181 3246 3182 3247 The 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> … … 3279 3344 <description><![CDATA[Creatures grown with warnings will not be simulated.]]></description> 3280 3345 </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"/> 3284 3347 <element name="vmdebug" type="integer" min="0" max="1"/> 3285 3348 <element name="resetToDefaults" function="true" type="void"> … … 3298 3361 <element name="expparams" type="ExpParams" flags="35"/> 3299 3362 <element name="expstate" type="ExpState" flags="35"/> 3363 <element name="genman" type="GenMan" flags="35"/> 3300 3364 <element name="loadNeurons" function="true" type="void" flags="32"> 3301 3365 <arguments> … … 3307 3371 <description><![CDATA[-1 for master simulator, 0...count-1 for slaves]]></description> 3308 3372 </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> 3309 3376 <element name="clear" function="true" flags="34"/> 3310 3377 <element name="add" function="true" flags="34"/> … … 4191 4258 time (t) float 0..6.28319]]></description> 4192 4259 </element> 4193 <element name="simil_method" type="integer" min="0" max="1" default="0">4194 <description><![CDATA[]]></description>4195 </element>4196 4260 <element name="simil_parts" type="float" min="0" max="100" default="0.0"> 4197 4261 <description><![CDATA[Differing number of parts is also handled by the 'part degree' similarity component.]]></description> … … 4200 4264 <description><![CDATA[]]></description> 4201 4265 </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"> 4203 4270 <description><![CDATA[]]></description> 4204 4271 </element> … … 4324 4391 <element name="import" function="true" type="void" flags="32"> 4325 4392 <description><![CDATA[Load some data from file. The second optional argument selects what section(s) will be imported: 4326 4327 4328 4329 4330 4331 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) 4333 4400 4334 4401 The 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> … … 4431 4498 <description><![CDATA[Creatures grown with warnings will not be simulated.]]></description> 4432 4499 </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"/> 4436 4501 <element name="vmdebug" type="integer" min="0" max="1"/> 4437 4502 <element name="resetToDefaults" function="true" type="void"> … … 4450 4515 <element name="expparams" type="ExpParams" flags="35"/> 4451 4516 <element name="expstate" type="ExpState" flags="35"/> 4517 <element name="genman" type="GenMan" flags="35"/> 4452 4518 <element name="loadNeurons" function="true" type="void" flags="32"> 4453 4519 <arguments> … … 4459 4525 <description><![CDATA[-1 for master simulator, 0...count-1 for slaves]]></description> 4460 4526 </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> 4461 4530 </type> 4462 4531 <type name="SlaveSimulators" context="Global context"> … … 4846 4915 </type> 4847 4916 <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. 4918 Examples: 4919 var v1=Vector.new(); 4920 v1.add(123); 4921 v1.add("string"); 4922 A short way of doing the same (square brackets create a vector): 4923 var v2=[123,"string"]; 4924 Simulate a 2D array: 4925 var v3=[[1,2,3],[4,5],[6]]; 4926 You can iterate directly over values of a Vector using for(...in...) loops: 4927 for(var element in v3) Simulator.print(element);]]></description> 4852 4928 <element name="clear" function="true" type="void" flags="256"><arguments/></element> 4853 4929 <element name="size" type="integer" flags="257"/> … … 4858 4934 </element> 4859 4935 <element name="get" function="true" type="untyped" flags="256"> 4936 <description><![CDATA[object[position] can be always used instead of object.get(position)]]></description> 4860 4937 <arguments> 4861 4938 <argument name="position" type="integer"/> … … 4863 4940 </element> 4864 4941 <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> 4865 4943 <arguments> 4866 4944 <argument name="position" type="integer"/> … … 5261 5339 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> 5262 5340 <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> 5264 5344 <element name="info" type="string"> 5265 5345 <description><![CDATA[Additional information or comments]]></description> … … 5270 5350 http://www.framsticks.com/node/890]]></description> 5271 5351 </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"/> 5281 5362 <element name="num" type="integer"/> 5282 5363 <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"> 5285 5368 <description><![CDATA[Copies of this genotype]]></description> 5286 5369 </element> … … 5306 5389 <element name="user3" type="untyped"/> 5307 5390 <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"/> 5309 5393 <element name="getNormalized" function="true" type="float" flags="35"> 5310 5394 <arguments> … … 5313 5397 </element> 5314 5398 <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> 5316 5400 </element> 5317 5401 <element name="uid" type="string" flags="33"> … … 5364 5448 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> 5365 5449 </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> 5366 5452 </type> 5367 5453 <type name="Creature" context="Visual style definition"> … … 5384 5470 <element name="gnum" type="integer"/> 5385 5471 <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"/> 5387 5474 <element name="idleen" type="float"/> 5388 5475 <element name="energy" type="float"/> … … 5551 5638 </arguments> 5552 5639 </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> 5555 5646 <element name="geno" type="Geno" flags="35"> 5556 5647 <description><![CDATA[Source genotype for this creature]]></description> … … 5954 6045 <element name="name" type="string" flags="19"/> 5955 6046 <element name="info" type="string" flags="19"/> 5956 <element name="code" type="string" flags=" 35"/>6047 <element name="code" type="string" flags="16419"/> 5957 6048 <element name="streload" function="true" flags="2"/> 5958 6049 <element name="rebuild" function="true" flags="34"/> … … 6379 6470 <element name="userspeed" type="integer" min="0" max="5" default="3" flags="2"/> 6380 6471 <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"/> 6382 6473 <element name="expdef" type="string" flags="34"/> 6383 6474 <element name="reload" function="true" flags="2"/> … … 6401 6492 <element name="excludeshows" type="string" flags="32"> 6402 6493 <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> 6403 6497 </element> 6404 6498 <element name="clear" function="true" flags="34"/> … … 6448 6542 <element name="cam_chspeed" type="float" min="0.1" max="10" default="1.0"/> 6449 6543 <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"> 6452 6546 <description><![CDATA[0=side view, 90=top view]]></description> 6453 6547 </element> … … 6483 6577 </element> 6484 6578 <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> 6485 6585 </type> 6486 6586 <type name="VisualStyle" context="Command line interface"> … … 6488 6588 <element name="name" type="string" flags="19"/> 6489 6589 <element name="info" type="string" flags="19"/> 6490 <element name="code" type="string" flags=" 35"/>6590 <element name="code" type="string" flags="16419"/> 6491 6591 <element name="streload" function="true" flags="2"/> 6492 6592 <element name="rebuild" function="true" flags="34"/>
Note: See TracChangeset
for help on using the changeset viewer.