Author Topic: Bot Diffusion  (Read 4541 times)

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Bot Diffusion
« 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.
Code: [Select]
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.
Code: [Select]
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.
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Bot Diffusion
« Reply #1 on: May 04, 2006, 09:42:01 PM »
Here's my solution to the same problem:

Code: [Select]
cond
*.myeye *.refeye =
*.eye5 0 >
*.velscalar 0 =
start
100 .dn store
stop

The idea is that it will only fire its engines if it stops moving.  Presumably if it's moving it's leaving a clump.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Bot Diffusion
« Reply #2 on: May 05, 2006, 08:50:15 AM »
Incidentally why is it that we actually get these clumps in 2.4?
We never did in previous versions.
Did you add some sort of gravity that draws bots together?
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Bot Diffusion
« Reply #3 on: May 05, 2006, 09:26:04 AM »
I see no new clumping in 2.4 that wasn't there in previous versions.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Bot Diffusion
« Reply #4 on: May 05, 2006, 10:06:21 AM »
It doesn't seem to happen with all species but a few of them form clumps where they didn't in other versions.

Try running a simple sim with Anon Terrifica to see what I mean.

Here is a piccy showing the odd behaviour.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Bot Diffusion
« Reply #5 on: May 05, 2006, 10:24:58 AM »
I have no idea.