Bots and Simulations > The Gene depository

Timerless timer

<< < (2/4) > >>

bacillus:
Yes, I remember reading this on several forums, and a guy recently put on the wiki. Thanks for the reminder though.

Peksa:
The problem with using timer is that it's the same for every bot. If bot relies on *.timer X mod Y =, all bots of the same species trigger at the same time. Of course you could add some randomness with rnd command, but that needs a new gene or some extra lines of code.

fulizer:
cond
*.robage 20 10 rnd sub mod 1 =
start
stop

would this work

Peksa:

--- Quote from: fulizer ---cond
*.robage 20 10 rnd sub mod 1 =
start
stop

would this work
--- End quote ---

Not with *.robage over 32000. That's the reason to use .timer instead of .robage. There's no need for rnd with trigger with robage as condition. And while I'm at, probably not too much with .timer either. It could cause slight problems in leaguebots when eg. all periodical venom shooting happened during one cycle as opposed to nearly even spread that can be archieved by .robage. League matches rarely last over 32 kcycles though.

gymsum:

--- Quote from: Peksa ---
--- Quote from: fulizer ---cond
*.robage 20 10 rnd sub mod 1 =
start
stop

would this work
--- End quote ---

Not with *.robage over 32000. That's the reason to use .timer instead of .robage. There's no need for rnd with trigger with robage as condition. And while I'm at, probably not too much with .timer either. It could cause slight problems in leaguebots when eg. all periodical venom shooting happened during one cycle as opposed to nearly even spread that can be archieved by .robage. League matches rarely last over 32 kcycles though.

--- End quote ---

cond
*.robage 32000 sub mod 1 =
start
stop

this works even at birth aeven if it lives to see hundreds of generations at 320,000 cycles (never seen it myself).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version