GenMan class in Global context

Manages various genetic operations, using appropriate operators for the argument genotype format.

107 members:

integer changedProperty
integer

last changed property #

string changedPropertyId
string

last changed property id

float f0_c_del
float, 0 .. 100
default=5

Delete connection

float f0_c_new
float, 0 .. 100
default=5

New connection

float f0_c_wei
float, 0 .. 100
default=10

Change weight

float f0_j_del
float, 0 .. 100
default=5

Delete joint

float f0_j_new
float, 0 .. 100
default=5

New joint

float f0_j_rsf
float, 0 .. 100
default=10

Rotational stiffness

float f0_j_stf
float, 0 .. 100
default=10

Stiffness

float f0_j_stm
float, 0 .. 100
default=10

Stamina

float f0_n_del
float, 0 .. 100
default=5

Delete neuron

float f0_n_new
float, 0 .. 100
default=5

New neuron

float f0_n_prp
float, 0 .. 100
default=10

Change properties

integer f0_nodel_tag
integer, 0 .. 1 (false/true)
default=1

Respect the 'delete inhibit' tag

You can tag elements using their 'i' field and the i="mi=d" tag.
Mutations will not delete such elements.
The i="mi=dm" combination is allowed.

integer f0_nomod_tag
integer, 0 .. 1 (false/true)
default=1

Respect the 'modify inhibit' tag

You can tag elements using their 'i' field and the i="mi=m" tag.
Mutations will not modify properties of such elements.
The i="mi=md" combination is allowed.

float f0_p_asm
float, 0 .. 100
default=10

Assimilation

float f0_p_del
float, 0 .. 100
default=5

Delete part

float f0_p_frc
float, 0 .. 100
default=10

Friction

float f0_p_ing
float, 0 .. 100
default=10

Ingest

float f0_p_mas
float, 0 .. 100
default=10

Mass

float f0_p_new
float, 0 .. 100
default=5

New part

float f0_p_pos
float, 0 .. 100
default=10

Position

float f0_p_swp
float, 0 .. 100
default=10

Swap parts

integer f0Fuzzy_maxRules
integer, 0 .. 999

Max. rules

Maximum number of fuzzy rules

integer f0Fuzzy_maxSets
integer, 0 .. 999

Max. sets

Maximum number of fuzzy sets

float f0Fuzzy_prob0
float, 0 .. 1

Add new fuzzy set (with simple rule)

Probability of adding new fuzzy set with simple rule, which uses this set (1=proceed on all genes, 0.1=proceed on ten percent)

float f0Fuzzy_prob1
float, 0 .. 1

Remove fuzzy set

Probability of removing fuzzy set (1=proceed on all genes, 0.1=proceed on ten percent)

float f0Fuzzy_prob2
float, 0 .. 1

Add new rule

Probability of adding new rule (1=proceed on all genes, 0.1=proceed on ten percent)

float f0Fuzzy_prob3
float, 0 .. 1

Remove rule

Probability of removing rule (1=proceed on all genes, 0.1=proceed on ten percent)

float f0Fuzzy_prob4
float, 0 .. 1

Add new input/output to existing rule

Probability of adding new input or output to exisitng rule (1=proceed on all genes, 0.1=proceed on ten percent)

float f0Fuzzy_prob5
float, 0 .. 1

Remove input/output from existing rule

Probability of removing input or output from exisitng rule (1=proceed on all genes, 0.1=proceed on ten percent)

string f1_mut_exmod
string

Excluded modifiers

Modifiers that will not be added nor deleted during mutation
(all: RrLlAaCcFfMmSsIiQqWwEe)

float f1_nmConn
float, 0 .. 100
default=0.1

Add/remove neural connection

float f1_nmNeu
float, 0 .. 100
default=0.05

Add/remove a neuron

Adds a (connected) neuron or removes a neuron

float f1_nmProp
float, 0 .. 100
default=0.1

Add/remove neuron property setting

float f1_nmVal
float, 0 .. 100
default=0.05

Change property value

float f1_nmWei
float, 0 .. 100
default=1

Change connection weight

float f1_smComma
float, 0 .. 100
default=0.02

Add/remove a comma ,

float f1_smJunct
float, 0 .. 100
default=0.02

Add/remove a branch ( )

float f1_smModif
float, 0 .. 100
default=0.1

Add/remove a modifier

Modifiers: RrLlAaCcFfMmSsIiQqWwEe

float f1_smX
float, 0 .. 100
default=0.05

Add/remove a stick X

integer f1_xo_propor
integer, 0 .. 1 (false/true)
default=1

Proportional crossover

Cross over (exchange) corresponding segments of the two parent genotypes?

f1 uses a two-point crossing over.
If this option is turned on, cut points will be selected proportionally to neural genes.
Thus, if both parents have the same number of neurons, then this will be preserved in their children.

float f2_mutAddOper
float, 0 .. 1
default=0.4

Add element

float f2_mutConnElem
float, 0 .. 1
default=0.33

- add connection

float f2_mutDelOper
float, 0 .. 1
default=0.1

Delete element

float f2_mutHandleOper
float, 0 .. 1
default=0.3

Change handle

float f2_mutJointElem
float, 0 .. 1
default=0.33

- add joint

float f2_mutNeuroElem
float, 0 .. 1
default=0.33

- add neuron

float f2_mutPropOper
float, 0 .. 1
default=0.2

Change properties

float f3_mutDelIns
float, 0 .. 1
default=0.1

Deletion/insertion

integer f3_mutDelInsLength
integer, 1 .. 100
default=5

- length of changed sequence

float f3_mutDelInsPerChar
float, 0 .. 1
default=0.05

- probability per char

float f3_mutDuplication
float, 0 .. 1
default=0.05

Gene duplication

float f3_mutSubstitution
float, 0 .. 1
default=0.6

Substitution

float f3_mutSubstPerChar
float, 0 .. 1
default=0.1

- probability per char

float f3_mutTranslocation
float, 0 .. 1
default=0.15

Translocation

float f3_xovCrossingOver
float, 0 .. 1
default=0.2

Crossing over

float f3_xovGeneTransfer
float, 0 .. 1
default=0.8

Horizontal gene transfer

float f4_mut_add
float, 0 .. 100
default=50

Add node

mutation: probability of adding a node

float f4_mut_add_conn
float, 0 .. 100
default=15

- add connection

add node mutation: probability of adding a neural connection

float f4_mut_add_div
float, 0 .. 100
default=20

- add division

add node mutation: probability of adding a division

float f4_mut_add_neupar
float, 0 .. 100
default=5

- add neuron property

add node mutation: probability of adding a neuron property/modifier

float f4_mut_add_rep
float, 0 .. 100
default=10

- add repetition

add node mutation: probability of adding a repetition

float f4_mut_add_simp
float, 0 .. 100
default=50

- add simple node

add node mutation: probability of adding a random, simple gene

float f4_mut_del
float, 0 .. 100
default=20

Delete node

mutation: probability of deleting a node

float f4_mut_mod
float, 0 .. 100
default=30

Modify node

mutation: probability of changing a node

integer gen_extmutinfo
integer, 0 .. 2
  • 0 = Off (default)
  • 1 = Method ID
  • 2 = Method description
  • Extended mutation info

    If active, information about employed mutation method will be stored in the 'info' field of each mutated genotype.

    integer gen_hilite
    integer, 0 .. 1 (false/true)
    default=1

    Use syntax highlighting

    Use colors for genes?
    (slows down viewing/editing of huge genotypes)

    integer gen_hist
    integer, 0 .. 1 (false/true)
    default=0

    Remember history of genetic operations

    Required for phylogenetic analysis

    integer genoper_f0
    integer, 0 .. 1
  • 0 = Default
  • 1 = Fuzzy control system
  • Operators for f0

    integer genoper_f1
    integer, 0 .. 0
  • 0 = Default
  • Operators for f1

    integer genoper_f2
    integer, 0 .. 0
  • 0 = Default
  • Operators for f2

    integer genoper_f3
    integer, 0 .. 0
  • 0 = Default
  • Operators for f3

    integer genoper_f4
    integer, 0 .. 0
  • 0 = Default
  • Operators for f4

    integer neuadd_N
    integer, 0 .. 1 (false/true)

    Neuron (N)

    Standard neuron

    Characteristics:
    supports any number of inputs
    provides output value
    does not require location in body


    Properties:
    Inertia (in) float 0..1
    Force (fo) float 0..999
    Sigmoid (si) float -99999..99999
    State (s) float -1..1

    integer neuadd_Nu
    integer, 0 .. 1 (false/true)

    Unipolar neuron [EXPERIMENTAL!] (Nu)

    Works like standard neuron (N) but the output value is scaled to 0...+1 instead of -1...+1.
    Having 0 as one of the saturation states should help in "gate circuits", where input signal is passed through or blocked depending on the other singal.

    Characteristics:
    supports any number of inputs
    provides output value
    does not require location in body


    Properties:
    Inertia (in) float 0..1
    Force (fo) float 0..999
    Sigmoid (si) float -99999..99999
    State (s) float -1..1

    integer neuadd_G
    integer, 0 .. 1 (false/true)

    Gyroscope (G)

    Equilibrium sensor.
    0=the stick is horizontal
    +1/-1=the stick is vertical

    Characteristics:
    does not use inputs
    provides output value
    should be located on a Joint

    integer neuadd_T
    integer, 0 .. 1 (false/true)

    Touch (T)

    Touch sensor.
    -1=no contact
    0=just touching
    >0=pressing, value depends on the force applied

    Characteristics:
    does not use inputs
    provides output value
    should be located on a Part


    Properties:
    Range (r) float 0..1

    integer neuadd_S
    integer, 0 .. 1 (false/true)

    Smell (S)

    Smell sensor. Aggregated "smell of energy" experienced from all energy objects (creatures and food pieces).
    Close objects have bigger influence than the distant ones: for each energy source, its partial feeling is proportional to its energy/(distance^2)

    Characteristics:
    does not use inputs
    provides output value
    should be located on a Part

    integer neuadd_*
    integer, 0 .. 1 (false/true)

    Constant (*)

    Constant value

    Characteristics:
    does not use inputs
    provides output value
    does not require location in body

    integer neuadd_|
    integer, 0 .. 1 (false/true)

    Bend muscle (|)

    Characteristics:
    uses single input
    does not provide output value
    should be located on a Joint


    Properties:
    power (p) float 0.01..1
    bending range (r) float 0..1

    integer neuadd_@
    integer, 0 .. 1 (false/true)

    Rotation muscle (@)

    Characteristics:
    uses single input
    does not provide output value
    should be located on a Joint


    Properties:
    power (p) float 0.01..1

    integer neuadd_D
    integer, 0 .. 1 (false/true)

    Differentiate (D)

    Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights

    Characteristics:
    supports any number of inputs
    provides output value
    does not require location in body

    integer neuadd_Fuzzy
    integer, 0 .. 1 (false/true)

    Fuzzy system [EXPERIMENTAL!] (Fuzzy)

    Refer to publications to learn about this neuron

    Characteristics:
    supports any number of inputs
    provides output value
    does not require location in body


    Properties:
    number of fuzzy sets (ns) integer
    number of rules (nr) integer
    fuzzy sets (fs) string
    fuzzy rules (fr) string

    integer neuadd_VEye
    integer, 0 .. 1 (false/true)

    Vector Eye [EXPERIMENTAL!] (VEye)

    Characteristics:
    uses single input
    provides output value
    should be located on a Part


    Properties:
    target.x (tx) float
    target.y (ty) float
    target.z (tz) float
    target shape (ts) string
    perspective (p) float 0.1..10
    scale (s) float 0.1..100
    show hidden lines (h) integer 0..1
    output lines count (each line needs four channels) (o) integer 0..99
    debug (d) integer 0..1

    integer neuadd_VMotor
    integer, 0 .. 1 (false/true)

    Visual-Motor Cortex [EXPERIMENTAL!] (VMotor)

    Must be connected to the VEye and properly set up.

    Characteristics:
    supports any number of inputs
    provides output value
    does not require location in body


    Properties:
    number of basic features (noIF) integer
    number of degrees of freedom (noDim) integer
    parameters (params) string

    integer neuadd_Sti
    integer, 0 .. 1 (false/true)

    Sticky [EXPERIMENTAL!] (Sti)

    Characteristics:
    uses single input
    does not provide output value
    should be located on a Part

    integer neuadd_LMu
    integer, 0 .. 1 (false/true)

    Linear muscle [EXPERIMENTAL!] (LMu)

    Characteristics:
    uses single input
    does not provide output value
    should be located on a Joint


    Properties:
    power (p) float 0.01..1

    integer neuadd_Water
    integer, 0 .. 1 (false/true)

    Water detector (Water)

    Output signal:
    0=on or above water surface
    1=under water (deeper than 1)
    0..1=in the transient area just below water surface

    Characteristics:
    does not use inputs
    provides output value
    should be located on a Part

    integer neuadd_Energy
    integer, 0 .. 1 (false/true)

    Energy level (Energy)

    The current energy level divided by the initial energy level.
    Usually falls from initial 1.0 down to 0.0 and then the creature dies. It can rise above 1.0 if enough food is ingested

    Characteristics:
    does not use inputs
    provides output value
    does not require location in body

    integer neuadd_Ch
    integer, 0 .. 1 (false/true)

    Channelize (Ch)

    Combines all input signals into a single multichannel output; Note: ChSel and ChMux are the only neurons which support multiple channels. Other neurons discard everything except the first channel.

    Characteristics:
    supports any number of inputs
    provides output value
    does not require location in body

    integer neuadd_ChMux
    integer, 0 .. 1 (false/true)

    Channel multiplexer (ChMux)

    Outputs the selected channel from the second (multichannel) input. The first input is used as the selector value (-1=select first channel, .., 1=last channel)

    Characteristics:
    uses 2 inputs
    provides output value
    does not require location in body

    integer neuadd_ChSel
    integer, 0 .. 1 (false/true)

    Channel selector (ChSel)

    Outputs a single channel (selected by the "ch" parameter) from multichannel input

    Characteristics:
    uses single input
    provides output value
    does not require location in body


    Properties:
    channel (ch) integer

    integer neuadd_Rnd
    integer, 0 .. 1 (false/true)

    Random noise (Rnd)

    Generates random noise (subsequent random values in the range of -1..+1)

    Characteristics:
    does not use inputs
    provides output value
    does not require location in body

    integer neuadd_Sin
    integer, 0 .. 1 (false/true)

    Sinus generator (Sin)

    Output frequency = f0+input

    Characteristics:
    uses single input
    provides output value
    does not require location in body


    Properties:
    base frequency (f0) float -1..1
    time (t) float 0..6.28319

    function add

    add property (id,type,name,help)

    function add()
    function addGroup

    add group (name)

    function addGroup()
    function clear

    remove all properties

    function clear()
    function crossOver
    returns Geno

    Crossover

    function crossOver(Geno, Geno)

    returns crossed over genotype

    function getSimplest
    returns Geno

    Get simplest genotype

    function getSimplest(integer format)

    returns the simplest genotype for a given encoding (format). 0 means f0, 4 means f4, etc.

    function mutate
    returns Geno

    Mutate

    function mutate(Geno)

    returns mutated Geno object from supplied Geno

    function operReport
    doesn't return a value

    Operators report

    function operReport()

    Show available genetic operators

    function remove

    remove property (index)

    function remove()
    function removeGroup

    remove group (index)

    function removeGroup()
    function toHTML
    returns string

    HTMLize a genotype

    function toHTML(string)

    returns genotype expressed as colored HTML

    function toHTMLshort
    returns string

    HTMLize a genotype, shorten if needed

    function toHTMLshort(string)

    returns genotype (abbreviated if needed) expressed as colored HTML

    function validate
    returns Geno

    Validate

    function validate(Geno)

    returns validated (if possible) Geno object from supplied Geno


    Global context