332
« on: May 04, 2006, 08:49:32 PM »
If your bots are all living together in a lump, it makes your species much less likely to find food, no matter how fast you rotate. So because of that you need a system to help scatter your bots accross the field.
For that purpose, I made the 'diffusion' gene present in the bot Turbo.
cond
*.refeye *.myeye =
*.eye5 0 >
start
10 .dx store
314 .aimdx store
stop
The down side is that bots surrounded by conspecs will spend a LOT of energy doing this. The up side is that the bots on the far side of the group will move away from its family.
A problem encountered by this gene is that only the ones on the far end of the mass do very serious diffusing. And if you want the bots to space out more evenly, shouldnt the acceleration be based on the distance? Vector's diffusion is based on this concept.
cond
*.eye5 0 >
*.refeye *.myeye =
start
314 .aimdx store
*.maxvel *.vel add *.eye5 mult 50 div 15 ceil .dx store
stop
The diffusion now based on current velocity and distance. The 50 scales down the energy spent, and the 15 puts a cap on how much can be spent per cycle in this way. If you put bots with genes like this into an environment where vegs are scarce, this increases the species survival rate immensely.