CAOS-Programmierung: Befehlsgruppen: Genetics

Muß noch bearbeitet werden
Genetics

GENE CLON (command) dest_agent (agent) dest_slot (integer) source_agent (agent) source_slot (integer)

Clones a genome, creating a new moniker and copying the genetics file.

GENE CROS (command) child_agent (agent) child_slot (integer) mum_agent (agent) mum_slot (integer) dad_agent (agent) dad_slot (integer) mum_chance_of_mutation (integer) mum_degree_of_mutation (integer) dad_chance_of_mutation (integer) dad_degree_of_mutation. (integer)

Crosses two genomes with mutation, and fills in a child geneme slot. Mutation variables may be in the range of 0 to 255.

GENE KILL (command) agent (agent) slot (integer)

Clears a genome slot.

GENE LOAD (command) agent (agent) slot (integer) gene_file (string)

Loads an engineered gene file into a slot. Slot 0 is a special slot used only for creatures, and contains the moniker they express. Only the NEW:  
CREA command fills it in. Other slot numbers are used in pregnant creatures, in eggs, or to temporarily store a genome before expressing it with NEW: CREA. You can use them as general purpose genome stores.
The gene file can have any name, and is loaded from the main genetics file. A new moniker is generated, and a copy of the gene file put in the world directory. You can use * and ? wildcards in the name, and a random matching file will be used. You can also load monikered files from the world genetics directory with this command. If so, the file is copied and a new moniker generated. Wildcards are matched first in the main genetics directory, and only if none match is the world genetics directory searched.

GENE MOVE (command) dest_agent (agent) dest_slot (integer) source_agent (agent) source_slot (integer)

Moves a genome from one slot to another.

GTOS (string) slot (integer)

Returns the target's moniker in the given gene variable slot. This universally unique identifier is the name of a genetics file. Slot 0 is a 
creature's actual genome. Other slots are used in pregnant creatures, eggs and other places.

MTOA (agent) moniker (string)

Returns the agent which references the given moniker. The moniker could be stored in any of the gene slots for that agent, including the special  
slot 0 for a creature. If the moniker is not currently used in the game, then returns NULL. This command can be slow - use MTOC if possible.

MTOC (agent) moniker (string)

Returns the creature with the given moniker. If there is no agent alive with that moniker, then returns NULL. See also MTOA.