Genotype class, available in: Global contextA Genotype with the associated performance information. Adding genotypes to GenePool makes them accessible in Framsticks GUI and enables the use of GenePool selection methods. See also GenePools.This class has 59 members:
sdleiFepytoneG
string nameName
multiline string genotypeGenotypeGenes as a string of characters.
int isValid RO0 .. 1 (false/true)ValidUse 'is_valid' instead of 'isValid'.
int is_valid-1 .. 1
default=-1
Validity0 = invalid genotype
1 = valid genotype
-1 = validity is not known. This is a transient state. The value of "is_valid" will never be -1 when read. It is safe to treat is_valid as boolean in statements like "if (g.is_valid) ...". Setting "is_valid=-1" will make it 0 or 1 again. This third state (-1) is only needed for loading Genotype objects from files where the "is_valid" field might not be present.
Geno geno ROGenoA Geno object for this Genotype
string uid RO#Unique identifier that is generated on object creation. "uid" is only unique during a single application run. Subsequent runs generate the same sequence of uid values.
See also: num
GenePool genepool ROgene poolGenePool object or null when not in pool
int index ROcurrent index in gene pool-1 when not in pool.
Note that the index changes depending on the current genotype position in the pool. Use Genotype.uid if you need a permanent identifier that persists through the entire object lifetime.
setoN
float info_timestamp0 .. -1
default=0.0
Last modified
string info_authorAuthor name
int info_author_ispublic0 .. 1 (false/true)
default=1
Author name is public
string info_emailAuthor email
int info_email_ispublic0 .. 1 (false/true)
default=0
Author email is public
multiline string infoDescriptionShort description of key features of this creature.
int info_origin0 .. 4
  • 0 = Unspecified (default)
  • 1 = Designed
  • 2 = Designed and evolved
  • 3 = Evolved under various conditions
  • 4 = Evolved using single, constant setup
  • OriginDeclaration of how this genotype originated.
    multiline string info_how_createdHow createdDescription of the process of designing and/or evolving this genotype.
    multiline string info_performancePerformance notesDescription of why this genotype is special/interesting and how it performs.
    ydoB
    float simi ROSimilarityAverage of 'dissimilarity(thisgeno,othergeno)' calculated for all other Genotype instances. This property is meant as fitness multiplier, included in the fitness function when similarity speciation (ExpProperties.cr_simi) is enabled.
    Read about details of dissimilarity calculation and its applications:
    http://www.framsticks.com/bib/Komosinski-et-al-2001
    http://www.framsticks.com/bib/Komosinski-and-Kubiak-2011
    http://www.framsticks.com/bib/Komosinski-2016
    float energ0 ROStarting energy
    float energy00 .. -1
    default=0.0
    Starting energy
    int strsiz ROBody parts (deprecated; use numparts)
    int strjoints ROBody joints (deprecated; use numjoints)
    int nnsiz ROBrain size (deprecated; use numneurons)
    int nncon ROBrain connections (deprecated; use numconnections)
    int numpartsNumber of body Parts
    int numjointsNumber of body Joints
    int numneuronsNumber of neurons
    int numconnectionsNumber of neural connections
    ecnamrofreP
    int numOrdinal numberActs as a unique identifier, but less strict than "uid". Unlike "uid", "num" can be changed and therefore can be saved and restored, providing persistence and continuity beyond a single application run. "num" is only guaranteed to be unique if it is autogenerated and not changed by the user, otherwise it is user's responsibility to manage the proper values of "num". "Genotype.num" is generated on adding a Genotype object to a group, unless it already has a non-zero "num" (previously autogenerated or user-assigned). Autogenerated "num" is always equal to the largest previously used "num" + 1. The largest previously used value is stored in Simulator.last_genotype_num and can be changed as well (and is automatically saved and restored as a part of the Simulator state). Limitation: being a 32-bit integer, "num" overflows at about 2 billion counts.
    See also: uid
    int gnumGeneration
    int popsizPopulation sizePlease use 'instances' instead of 'popsiz'.
    int instancesInstancesCopies of this genotype
    float lifespanLife spanSee Creature.lifespan
    float velocityVelocitySee Creature.velocity
    float distanceDistanceSee Creature.distance
    float vertvelVertical velocitySee Creature.vertvel
    float vertposVertical positionSee Creature.vertpos
    Dictionary dataCustom fields dictionary
    untyped user1User field 1
    untyped user2User field 2
    untyped user3User field 3
    ssentiF
    float fit ROFitness
    float fit2 ROFinal fitnessFitness shifted by (avg-n*stddev)
    snoisrevnoC
    multiline string f0genotype ROf0 genotypeconverted to f0 genotype
    multiline string convtrace1 ROConversion backtrace [1]
    snoitcnuF
    function addPerformanceFromCreature(Creature)doesn't return a valueUpdates the Genotype's performance values merging them with the supplied Creture's performance. It assumes the Genotype.instances has a reasonable value and performs the proper weighting. Use your own function instead if these conditions are not met in your experiment.
    function afterLoad()doesn't return a valueAfter loading
    function beforeLoad()doesn't return a valueBefore loading
    function clone RO()returns Genotypecreate a copy of the genotypeReturns a duplicated genotype, not attached to any gene pool. All genotype fields are copied including 'data' (for which Dictionary.clone() produces a shallow copy).
    function delete()doesn't return a valueremove from the pool
    function deleteOne()doesn't return a valuedelete single instance from the pool
    function getModel RO()returns ModelModel object
    function getNormalized RO(untyped property_name_or_index)returns floatget normalized property
    function moveTo(GenePool pool)doesn't return a valuemove to another gene poolthe genotype is removed from its current pool when pool=null
    function mutate()doesn't return a valueMutate
    function newFromCreature(Creature)returns Genotypecreate new object
    function newFromGeno(Geno)returns Genotypecreate new object
    function newFromString(string genotype)returns Genotypecreate new object
    function splitInstances()doesn't return a valuesplit instances
    Global context