Darwinbots Forum
Code center => Bugs and fixes => Topic started by: Endy on March 08, 2005, 01:20:55 AM
-
Made this bot to test which way repro will go and instead found a bug. It seems .sexrepro isn't being stoped correctly, letting the bots undergo a massive burst of reproduction, far over the population limits. The other 2 repro's serve only to allow sexrepro to take place(No, I don't understand the logic fully either :D ).
Be careful testing in the beta, can cause a rapid shutdown.
' Small agla randomely uses all three repro's
' Able to rapidly expand with sexrepro
cond
start
300 2 rnd add inc
314 rnd .aimdx store
stop
end
Endy B)
-
I'll look into it. Stupid bugs. :bash:
-
Endy or someone, when you have time. Mind explaining me how you got different reproduction methods from ".repro 2 rnd add inc", I only see one type of reproduction there.
-
The "2 rnd" adds a random number from 0-2 to the value of 300. This gives the bot the added abilities to mutation reproduce (.mrepro 301) and sexually reproduce (sexrepro 302). Nothing really major occurs until the bots hit on sexrepro and then there is a population explosion, it only stops rising when the program finally figures out that the population is too high.
Endy B)
-
ok nice, but then there are .repro 2 rnd [you]add inc[/you] what happend to the "store" , I need further help here...
-
okay, here's what's happening:
2 rnd -> returns a value of either 0, 1, 2
.repro was already on the stack, so we have:
.repro + [0,1, or 2]
.mrepro is .repro +1
and .sexrepro is .repro + 2
that's what the add does.
Now the inc command works. It increments the sysvar on the top of the stack. That's either .repro, .mrepro, .sexrepro
that's the same as 1 (.repro, .mrpero or .sexrepro) store
-
O I see , thx , now I am a better bot builder