Darwinbots Forum
Bots and Simulations => DNA - General => Tips and Tricks => Topic started by: Numsgil on May 24, 2005, 04:04:18 PM
-
This is a quick bot that will help you understand the nature of collisions in DB. Put it in a sim with veggies that get 40 energy per cycle, and you can get an idea of collisions at different mass differences.
cond
start
*.robage 100 mod
stop
cond
0 =
start
50 .up store
stop
end
-
whats mod? :unsure:
-
okay I understand now :)
-
Mod is a wonderful but never used command that came with 2.35. Whereas div takes the quotient, mod takes the remainder.
Ie: mod = modulos command. 5 6 mod is 5. 6 5 mod is 1. (5/6 = 0 remainder 5. 6/5 = 1 remainder 1).
There are a few other never used commands as well. pyth being an example (would be useful in complex vector manipulations.)
They're all listed in the readme for 2.35, as well as how they work.