Bots and Simulations > Bot Tavern
Super crazy/awesome idea
Numsgil:
Infinite loops are illegal. Though a finite loop could be unrolled...
Or more precisely, there's only one loop, and it happens once per cycle when the DNA is re-executed.
You might be able to create something that let you simulate loops. Though I imagine it would be a huge pain.
bacillus:
This sounds familiar...
Anyway, the two best options to prevent infinite loops it to have a metastructure that simulates looping by accessing the substructures or 'genes', or to have a limiting factor, such as time or a command cap. The second option could be a bit wobbly, as you don't want the execution to suddenly break off in the middle of some important gene. Having some built-in infinite-loop detector would have to re-check at every mutation, but could be thee best option for low-mutation simulations.
Numsgil:
--- Quote from: bacillus ---Having some built-in infinite-loop detector would have to re-check at every mutation, but could be thee best option for low-mutation simulations.
--- End quote ---
Infinite loops alone aren't the entire problem, though. Imagine 3 nested loops of 1..1000 each. The result is O(n^3) = 1 Billion operations. Meaning, per bot, that loop would take something on the order of a second to execute. So the only realistic way to allow looping is to have only a single loop at a time that can run. But that's such an arbitrary rule.
Or charging per bp executed, or giving only finite processing time, but both are against the spirit of Darwinbots IMO.
bacillus:
So metastructuring seems to be the best option. While not exactly looping, it would be much easier than copy/pasting the same code over and over.
ashton15:
Is
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']cond
*.timer 10 >
start
0 .timer store
stop
not an infinite loop?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version