Reproducing

From WikiManual
Revision as of 23:19, 3 July 2008 by Jarbon (talk | contribs) (Sexual: Updated article to include sexual reproduction since it has been brought back.)
Jump to: navigation, search

In darwinbots there are three primary methods of reproduction. Mitoses, Sexual and Mutational.

Sysvars:

Reproducing:

.robage 9
.mass 10
.timer 12
.repro 300
.mrepro 301
.sexrepro 302
.fertilized 303

Examples:

cond
 *.nrg 6000 >
start
 50 .repro store
stop

If the bot has more than 6000 energy it stores "50" in memory location 300 (.repro). This causes Mitoses reproduction infront of the bot if there is enough free space: "50"% of the bots energy and body points get transfered to a new bot infront of this bot.

Reproduction control

.robage stores the age of the bot in cycles up to 32000

.mass stores the mass of a bot (energy and body points)

A reproduction gene that only gets activated by ".nrg > 2" can easily mutate into a Cancerous Bot or a sterile Big Bertha.

Mitoses

.repro allows a bot to reproduce an exact duplicate of itself. The number stored in .repro defines the percentage of energy and body to transfer into the child. Like all reproduction methods this takes a single cycle, after which a new bot is produced directly in front of you (ie: eye5) and facing you.

While the eyes begin working immediatly for the newborn, it takes a cycle before the refs begin reading back. This can cause wasteful attacks by the child, a good idea then is to limit the childs firing until at least one cycle of age.

Mutational

.mrepro is like .repro but mutation rates are 10 times the normal values. This reproduction method will cause mutations even if all mutation settings are disabled.

Sexual

The command .sexrepro, takes the DNA of a bot that has shot the bot with a sperm shot and mixes it with a bot's own to create a new bot's DNA. A bot can discover that it has been shot by checking the .fertilized sysvar.

Future Stuff

On the drawing boards are: