Author Topic: Preybot V1  (Read 8088 times)

Offline Old Henk

  • Bot Destroyer
  • ***
  • Posts: 229
    • View Profile
Preybot V1
« on: January 28, 2006, 11:31:03 AM »
Hey all,

this is the first version of the prey bot that is to be used in the Wraith-bot simulation.

Currently it features:
  • It defines it's territory based on the place where it was born.
  • It stays within the borders of it's own territory.
  • It eats vegs.
  • It avoid friends (conspecifics).
  • It reproduces close to the center of it's territory.
  • Colonies slowly migrate over time (is this a problem? IMO not)
I've had varied results with this bot. Sometimes certain territories are bursting with bots, sometimes the starting bot is the only thing that lives for a long period of time.

Noted in file are comments (well, only one this time ;) ), that I ask other members of the project (or DB'ers in general) to have a look at. The comments are placed in <...> marks, <so this would be a comment>.

Also, if you choose to alter/improve this bot for Preybot V2, I ask you to note your changes, and annotate them with a name and date. In notepad this can be done by pressing the F5 key, then typing your name behind the date/time.

I would like all changes to be send to me, so I can combine them in Preybot V2

Henk

DNA of this bot

BTW, for some weird reason I can't upload .txt files to the forum :wacko:

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Preybot V1
« Reply #1 on: January 28, 2006, 12:07:54 PM »
I think we've been having problems with the forum's uploading filters from time to time.  I have no idea why.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Preybot V1
« Reply #2 on: January 28, 2006, 02:07:54 PM »
Brilliant!

 :D

No, It's not a problem at all that the communities migrate over time, in fact it might give the Keepers something to think about.

Suggested changes:
- For preybot to help other's of it's species by firing nrg at them if my nrg > conspec's nrg by more than 10%.
- For preybot to be less agressive and not kill as many veggies
- For preybot to flee strong enemies, but atack if it's conspecifics or territory are threatened
- And to be more durable as a species (ie. can survive decimation)

Man that thing is cool  :)  You've done a great job Henk


I'm including an estimate of the kind of settings I will probably use for the sim. Just add your preybot. Can't wait for version 2  :D
« Last Edit: January 28, 2006, 02:10:53 PM by Elite »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Preybot V1
« Reply #3 on: January 28, 2006, 03:09:39 PM »
I think not decimating veggies is a useful but seldom looked at behavior.

You want to kill some or they will simply overcrowd you.  You want to leave at least a few around to reproduce on their own.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Preybot V1
« Reply #4 on: January 28, 2006, 04:15:22 PM »
Yeah, I was thinking some rnd function to make the bot have a random chance of turning away from vegs.

Some more suggestions Henk:
 - You need to make the praybots weaker by making them leave veggies alone and stop feeding when they've reached a threshold nrg (around 3000-5000)
 - The Preybots could repro ,say, once every 500cy or something like that, rather than when they have so much nrg. Or when they don't see many conspecs (ie. if they see less than so many conspecs in so many cycles then they repro) - I like the latter option better.
 - You appear to have missed out the condition:

Code: [Select]
*.numties 0 =
In gene 2 of the territory genes
 - You need to make them flee bots that aren't conspecs and aren't vegs

I dropped an Una into a community to simulate a culling and they ripped it to shreds :o - Probably something to do with their .repro level being so high - they all had around 30000 nrg!
They need to be easily 'killable' but durable as a species
« Last Edit: January 28, 2006, 04:17:03 PM by Elite »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Preybot V1
« Reply #5 on: January 28, 2006, 05:15:17 PM »
Maybe you should drop an Una in there more often, so they don't get the chance to reach 30K energy.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Preybot V1
« Reply #6 on: January 28, 2006, 05:38:31 PM »
They're supposed to be culled periodically by the Wraithbots when they reach high populations. So they should be easy to kill, or else the hungry wraithbots will just die when they attempt to feed.
They should never reach 30000 nrg, just stop feeding when they reach 4000.
That way they can be easily culled by the wraithbots.
The cullings will be thousand cycles apart, and will last only a few cycles.

The ecosystem is cyclic:
At the start:
- The Wraithbot and Preybot populations 'settle in'
Then:
- The Wraithbots decimate the Praybots
When the Praybot population is low:
- The Wraithbots go into hibernation
When the Praybot population is high again:
- The Wraithbots decimate the Praybots
... and so on.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Preybot V1
« Reply #7 on: January 28, 2006, 07:41:44 PM »
IME bots purposely making themselves weak is incredibly unstable.  Generally you need to examine what it is you want to have happen and set up the circumstances such that that is the natural consequence.

I hope that made sense, my mind is a little tired.   :D

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Preybot V1
« Reply #8 on: January 29, 2006, 06:17:03 AM »
I understand what you're saying  :)

I'm not so much trying to make the bots weak as limiting the amount of nrg they can take in by stopping them from eating when they are 'full'
That and making the bots scatter at the sight of predators (just like some real herbivores).
Limiting their feeding to when they are 'hungry' will also stop the bots killing as many vegs just for the sake of feeding. And the nrg is collecting more 'interest' in the vegs (via photosynthesis) than in the Praybots.
It's not good for a species to consume everything  :evil:
And it would make the species more durable since there will still be vegs for them to feed on when they get decimated.

- Only feed when hungry (don't be greedy)
- Share nrg between the species (be altruistic)

They could be more sucessful with these rules than what they are now since they seem to run out of vegs in their area when they eat them all.

So just to clarify: Not weak, just less agressive with the feeding
« Last Edit: January 29, 2006, 06:24:10 AM by Elite »

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Preybot V1
« Reply #9 on: January 29, 2006, 07:02:44 AM »
Here you go - I've finished some modifications  :D

New features:
- Only reproduces when it senses that the population is low
- Corrected gene 2
- Only feeds when it's nrg is less than 5000

It quickly builds the population and stays stable. It doesn't kill as many vegs and the communities last longer  :) .
Problem: All bots have around 200 nrg  :o

When I dropped an Una in they were decimated and didn't fight back (they weren't hungry) - need to make them flee (and hide behind vegs?).

Just some suggestions  :)
« Last Edit: January 29, 2006, 07:06:52 AM by Elite »

Offline Old Henk

  • Bot Destroyer
  • ***
  • Posts: 229
    • View Profile
Preybot V1
« Reply #10 on: January 29, 2006, 09:21:12 AM »
Thank you!

Running more simulations with Preybot I realized I had possibly made the territories to small, causing unlucky populations to die out quickly and succesful populations to starve themselves to death because of their eating habits.

I changed territory from 500 units to each side into 2500 to each side (giving the bots a 5000 by 5000 territory)

After about 2500 cycles I noticed the following pattern:


Of course 2500 cycles is a small period of time, but still the resemblance to the ant bots struck me. If my assumptions are true then Prey bot is the first non-queenbased antbot!

I base this on several observations:
  • The highest concentration of bots is near the territory center, much like the queenbased antbots are concentrated around the queen.
  • Foraging raids are carried out. Bots wander outside their territory if they see there's food outside their territory, and return when they can't find more food.
  • The energy that is retrieved is given to the collective (in a sense), because it is used to reproduce and create more bots
I will continue to run this simulation to see if my assumptions are still true after a longer period of time.

EDIT: the following screenshot is taken at about 7000 cycles. The center of the population has expanded, and is taking up quite a lot of space in the simulation now.


This expanding territorial center is due to the fact that all bots base their territory on their own birthplace, which isn't the same for every bot, obviously. I am planning on removing that, and making the population center a heritagial thing. Furthermore it seem obvious to me that this bot needs a good predator (Wraith), or else it'll conquer the simulation eventually.
« Last Edit: January 29, 2006, 09:40:10 AM by Henk »

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Preybot V1
« Reply #11 on: January 29, 2006, 09:39:14 AM »
Are you using Preybot v1 or my modified version?

Most interesting, if the bots share nrg then they will be like a decentralized antbot   -_-

They're interesting even without the wraithbots  :D

Offline Old Henk

  • Bot Destroyer
  • ***
  • Posts: 229
    • View Profile
Preybot V1
« Reply #12 on: January 29, 2006, 09:41:44 AM »
Yeah they are, aren't they?

Maybe I can force them to return to their territorial center at night and tie to everything, then share their nrg. Hmmm, this is getting more interesting by the minute :)

Offline Old Henk

  • Bot Destroyer
  • ***
  • Posts: 229
    • View Profile
Preybot V1
« Reply #13 on: January 29, 2006, 09:46:30 AM »
I see migration behavior now. The center of the population has decentralized now, and a 'migration ring' has formed. Cool!



:D

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Preybot V1
« Reply #14 on: January 29, 2006, 10:14:45 AM »
Hey, we could use the Preybot as a base and add hibernation, Keepers etc.

We could build Wraithbot out of Preybot  ^_^

Add a sterile Keeper caste
Add a Queen
Add hibernation
Have them come out of their Hive to decimate the Preybots periodically
etc.

Interesting prey  :) . I'm going to try and code some nrg-sharing (via shots) and 'fleeing' into Preybot.


For your sims are you using your version or mine? Mine adds a population control and only feeds when hungry

Good idea with the bigger territories  :)