Author Topic: Evolution  (Read 2281 times)

Offline Gaiacarra

  • Bot Neophyte
  • *
  • Posts: 7
    • View Profile
Evolution
« on: October 13, 2007, 06:23:40 PM »
I'm trying to create a bot that decides whether or not to attack the target based on the target's strength - perhaps a bit advanced, but I like to jump right into things.

Maybe I should give details on what I'm trying to do: the bot seeks out other bots. It eats vegetables if it finds them. If it finds a member of its own species, it checks its strength. If it's weak, it eats it, if not it leaves it alone. It does the reverse to different-species bots (eats the strong, leaves the weak). The idea is that in this way, the bot not only perpetuates beneficial natural selection within it's own species, but also prevents other species from evolving beneficial traits.

So I'd like to know more on evolution in DB. How does DNA change from generation to generation? If I understand correctly it only works with spontaneous mutations, and the mutants who are stronger reproduce more, like in real life. But, for example, how complex can these mutations be? Are they just minor changes to genes, or can genes get deleted or entirely new ones added?

Additionally: do different species deal different amounts of damage with their shots; and do different species have different amounts of max energy/velocity? And if so, can these values change over the generations?

Thanks.

Oh, and while I'm at it -- what's a Zero Bot?
« Last Edit: October 13, 2007, 06:27:37 PM by Gaiacarra »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7722
    • View Profile
Evolution
« Reply #1 on: October 13, 2007, 09:38:34 PM »
Quote from: Gaiacarra
I'm trying to create a bot that decides whether or not to attack the target based on the target's strength - perhaps a bit advanced, but I like to jump right into things.

Welcome!  By all means, aggressively dig in.  Best way to learn.

Quote
Maybe I should give details on what I'm trying to do: the bot seeks out other bots. It eats vegetables if it finds them. If it finds a member of its own species, it checks its strength. If it's weak, it eats it, if not it leaves it alone. It does the reverse to different-species bots (eats the strong, leaves the weak). The idea is that in this way, the bot not only perpetuates beneficial natural selection within it's own species, but also prevents other species from evolving beneficial traits.

You might want to give Enitor Comesum a look.  It's a pretty simple bot that just eats anything weaker than it, and runs from anything stronger than it (that's not a veggy).

Quote
So I'd like to know more on evolution in DB. How does DNA change from generation to generation? If I understand correctly it only works with spontaneous mutations, and the mutants who are stronger reproduce more, like in real life. But, for example, how complex can these mutations be? Are they just minor changes to genes, or can genes get deleted or entirely new ones added?

The DNA defines the behavior of a bot.  A mutation can either be a single point mutation that just changes a single random base pair, or it can do more interesting things like insert random DNA or delete a section of DNA.  Viruses are also a common way to add a lot of DNA to a bot.  A virus rampantly going through a population of bots can totally overwhelm any natural DNA a bot has.

Quote
Additionally: do different species deal different amounts of damage with their shots; and do different species have different amounts of max energy/velocity? And if so, can these values change over the generations?

Shot strength and most othing things are determined by how many body points a bot has.  The more body, the stronger the bot is.  Bots can also power up shots by spending more energy, but this isn't a very widespread feature.

Quote
Oh, and while I'm at it -- what's a Zero Bot?

A zerobot is just a bot whose DNA is all 0s.  You would then leave it floating in the environment and random point mutations would eventually, if the settings are right, produce a simple bot that can reproduce and feed.  In theory it would then be possible to carefully grow this ex nihilo bot species into a formidable and awesomely adapted species.

Offline Gaiacarra

  • Bot Neophyte
  • *
  • Posts: 7
    • View Profile
Evolution
« Reply #2 on: October 14, 2007, 06:28:32 AM »
Ok... so most bots reproduce when they have a certain amount of Energy, right? And Body is allocated to offspring just like Energy? So if this thing kills bots with high Body, all the offspring are gonna have low body, right? Or am I completely and utterly wrong?

In any case, how do bots check if a target is of their own species or not? Just *.refeye *.myeye != ?

Another unrelated question... can a bot evolve an immunity to a certain virus/poison/venom?
« Last Edit: October 14, 2007, 07:36:32 AM by Gaiacarra »

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
Evolution
« Reply #3 on: October 14, 2007, 10:16:11 AM »
Quote from: Gaiacarra
Ok... so most bots reproduce when they have a certain amount of Energy, right? And Body is allocated to offspring just like Energy?
Yes and yes

Quote from: Gaiacarra
So if this thing kills bots with high Body, all the offspring are gonna have low body, right? Or am I completely and utterly wrong?
No it kills bots with less body than it has

Quote from: Gaiacarra
In any case, how do bots check if a target is of their own species or not? Just *.refeye *.myeye != ?

That is one of the oldest ways to determine if someone is friend or foe by assuming someone  with the same number of eye commands is the same species as yourself, there are many other methods.

Quote from: Gaiacarra
Another unrelated question... can a bot evolve an immunity to a certain virus/poison/venom?
No
« Last Edit: October 14, 2007, 10:19:21 AM by Light »

Offline Gaiacarra

  • Bot Neophyte
  • *
  • Posts: 7
    • View Profile
Evolution
« Reply #4 on: October 14, 2007, 11:03:09 AM »
Quote from: Light
Quote from: Gaiacarra
So if this thing kills bots with high Body, all the offspring are gonna have low body, right? Or am I completely and utterly wrong?
No it kills bots with less body than it has
Perhaps I should have explained better.

If you have a bot programmed to 10 .repro store at 20000 Energy, then when it reaches 20000 Energy, it'll produce an offspring with 2000 Energy and 10% of its own body. So if it has 10 body the kid will have 1 body, if it has 1000 body the kid'll have 100.

Now, if this bot I'm making (who I'll refer to as Genocidis Darwini from here on out) eats all the bots of a certain species with more than, say, 10000 Body before they can reproduce, then the survivors (the ones with low Body) will all produce offspring with low body, and so on and so forth.

...if, of course, I am correct in my many assumptions.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Evolution
« Reply #5 on: October 14, 2007, 12:04:53 PM »
You're right, if a bot reproduce at 5000 nrg, you keep the body of all bots down by shooting them under 1000 or something. And by reproducing they kee a low body.

That works if there isn't a gene or genes that connect nrg with body, using nrg to make the body at all time bigger than 1000, would kill probalbly all bots of the specie.

If I understand it right you want to kill all bots that have a body above 1000, so keep shooting if the body becomes lower and killing it, that could be a problem let the bot in fact shoot a bot that is weaker, and don't shoot natural strong bots. Or do you want to just keep the body low without killing.

If you want to use this to get weaker opponent, I am not sure if it will work mine multiply for example has a low body, raticus(or something, the one from jez I thought) an extreme high one. Multiply wins becouse of higher numbers, something like ten multiplys are needed to kill one raticus, but it wins.

There are different ways to evolve, you could make extreme heavy strong bots. Or alot smaller ones, most evolutions I run the sim prefers just the smaller ones with joung ages and fast reproducing-time. Some cases almost cancercious. Seldom there repro-time takes longer.

Of cource there are more ways to evolve then body or number, poison or infoshots or ties or anything else.
Oh my god, who the hell cares.

Offline Gaiacarra

  • Bot Neophyte
  • *
  • Posts: 7
    • View Profile
Evolution
« Reply #6 on: October 14, 2007, 04:11:56 PM »
Ok I have another unrelated quesiton; is there anyway to make a bot selfdestruct?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7722
    • View Profile
Evolution
« Reply #7 on: October 14, 2007, 04:47:06 PM »
It's getting harder and harder to do, but a good, if a bit old fashioned, way is to make it shoot out all its nrg with something like:

*.nrg .shootval store
-2 .shoot store

Although there might be safeguards to prevent a bot from shooting out all of its nrg.  You might try something like:

*.nrg 99 mult 100 div .shootval store
-2 .shoot store

Which would make a bot lose 99% of its nrg every cycle.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Evolution
« Reply #8 on: October 14, 2007, 08:57:52 PM »
FYI, there are in fact, no safeguards on -2 shots which would prevent a bot from commiting suicide.

*.nrg .shootval store
-2 .shoot store

serves to kill a bot quite nicely in a single cycle.
Many beers....

Offline fulizer

  • Bot Destroyer
  • ***
  • Posts: 198
    • View Profile
    • http://www.freewebs.com/explodeimplode/
Evolution
« Reply #9 on: November 11, 2007, 04:33:41 AM »
generally if it finds a member of its own species thats stronger than it it wont live much longer anyway I tend to not make canniblastic species
"If this is coffee bring me tea, If this is tea, bring me coffee"