Bots and Simulations > DNA - General
Basic Math
Botsareus:
Dim memory(1000) as Intager 'this actualy already Exists in the program
Do '<--- this loop is the robot stack loop itself
memory(0) = 0
Do
memory(0) = memory(0) + 1
Debug.Print memory(0) 'there should be some kind of Debug in Db right
If memory(0) > 100 Then Exit Do
Loop
Loop
***The above is inpossible to program in DB for me , CAN ANYONE GIVE ME A WORKING DNA FOR THAT WITH A INFORMATION ON HOW TO DEBUG AS WELL?
Numsgil:
There aren't any loops in the DNA. If we added them, infinite loops could potentially develop. Straightforward DNA execution helps add to program stability.
Botsareus:
I know there is no loops, I am talking about each sycle increases the number by 1. So it takes 100 sycles to increase the number to 100
Numsgil:
I'm not sure what it is you want then.
Unless you just want to have:
cond
*.var 100 <
start
.var inc
stop
And to debug, load up the console for a robot. It has all kinds of useful debugging tools. Type help to get a list of them.
Botsareus:
There we go , lest time I tryed that it did not work , the robot console was returning 0 , also how do I later reset the number back to 0 when its over 100 so it repeats the whole thing again
by "*.var" what do you mean? There is only memory locations from 1 to 1000
if *.var did mean a memory location , I have never seen
--- Quote ---*.var 100 <
--- End quote ---
mutate naturaly in the program
forget about
--- Quote ---*.var *.var <
--- End quote ---
I am hopeing that num ment somthing like:
--- Quote ---cond
*.32 100 <
start
*32 inc
stop
--- End quote ---
Navigation
[0] Message Index
[#] Next page
Go to full version