Darwinbots Forum

Code center => Suggestions => Topic started by: Botsareus on August 23, 2005, 05:24:57 PM

Title: More accurate model of Radiation
Post by: Botsareus on August 23, 2005, 05:24:57 PM
It's a lot to explain and half of it is still theoratical but as you can see I cant wait to get it out.

The current model of radiation and therefor mutations of our little bots is inaccurate.

To be clear it does not allow for rapid speciazation.
It does not allow for a species to live long enough (enough generations) take time for compatition to take over, resulting in that one of shvartz favorate terms (somthing esamins proractive or somthing like that) the one very robot does not improve and the evolution only makes them worse.

To solve all this problems I propose a new model of radiation.

To better understand this model we need to consider two things.

A. A ray of radiation hits an orgainism and it gets a lot of radiation at one time.

B. Radiation has a long half life and degrades in an organism slowly

C. The ammount of radiation an orginism has dromaticaly effects how mutch its going to mutate.

D. Radiation is past on from parant to child in big ammounts because the radiation is inside the organism.

E. An organism with experiance to radiation builds resestance to it. An organism that had no radiation for a long time loses resestance. (to getting effected by new radiation)

F. Half of this things I had to gess on.


So I rewrote the mutations part of the program a little and added a new variable to each robot called radiation. Sorry that I describe it not excatly in vb , if you have qustions about my discirption or anything please ask

main = "radiation" is passed on from parant to child

child.main = parant.main

Public Sub mutate(n As Integer)
'being that the avrage chance of robot getting hit with radiation is 1/3
'and the ammount of radiation a robot gets is in the range from 5 to 1
If rob(n).main = 0 And Int(Rnd * 12) < 5 Then rob(n).main = Int(Rnd * 5)
If rob(n).main > 0 Then
rob(n).main = rob(n).main - 1

...code that lead to actual mutations

Repeat the number of times of main
{
mutaterobots with nums and pys mutations and there rates for each
mutate the rates themselfs
}

... code for info updates etc.

end if


The resolt is robots with a lot of mutations are common and  the robots with the best dna always dominate the screen (not allowing the bad robots to kill them off)

The little problem is the program can't seem to find a better firstbot then the original. The good news is atleast the (nums, pys) mutation rates are slowly changing. Currently my best robots rates are different from the original robot.

The longest I ran the completed virsion is 20000 cycles (I am running it for long the first time now) so who knows?
Title: More accurate model of Radiation
Post by: Numsgil on August 23, 2005, 07:16:21 PM
Most mutations aren't caused by radiation.

We'va talked about this before Bots.  You make up solutions to percieved problems in mutations without checking if:

1.  It really is a problem

2. There isn't already a commonly accepted solution to mutation problems.

Avida is the Lingua Franca of evoultion sims.  Here's how its mutations work (http://www.krl.caltech.edu/~charles/avida/manual/mutation.html).

That's more or less what I'm turning DB's mutations into.

And for the love of Pete, run a simulation for more than 20 000 cycles, and at less mutation rates.

You're getting a Mueller's Ratchet.  That's what's happening.  The solution is to reduce the mutation rates or introduce effective sexual reproduction.
Title: More accurate model of Radiation
Post by: Botsareus on August 24, 2005, 01:09:31 PM
Mueller's Ratchet , thats what its called , thx Num.

With FirstBot low mutation rates are not effective because they only make stupid changes. We need big change for it to work.

I can however try it on low mutation rates and see what happens. If I was right then...  just waste 24hours on somthing I am sure won't work.


The idea was to keep Muller's Ratchet away by other means then increasing the feild size or giving more food.


The above formulas are off I got Muller's anyway. So after I try what Num is suggesting I try new numbers see if that will work.
Title: More accurate model of Radiation
Post by: Zelos on August 24, 2005, 01:51:54 PM
what is the real mutation rate in real life? I know that we humans have since we were apes changed atleast 30 basepairs per generation.
just some fun fact on our brain. it generally growed by 150000 brain cells each generation.
Title: More accurate model of Radiation
Post by: PurpleYouko on August 24, 2005, 03:17:48 PM
Another problem is that I don't think you understand radiation properly.

Quote
A ray of radiation hits an orgainism and it gets a lot of radiation at one time.
Radiation comes in several forms
When something is hit by a ray of radiation (I assume you mean a gamma ray) it is hit by one photon at a time, not a lot at once.

Quote
B. Radiation has a long half life and degrades in an organism slowly
The vast majority of radioactive isotopes actually have half lifes in the region of days or even as low as seconds. Longer lived isotopes include U235 (4.5 billion years) and  Th232 (can't remember its HL right now)
Almost everything we touch, drink, eat, has Uranium in it at a level of a few parts per million.

Quote
C. The ammount of radiation an orginism has dromaticaly effects how mutch its going to mutate.
Wrong. Organisms do not have different amounts of radiation. They may become exposed to different amounts of radiation but they do not retain it.


Quote
D. Radiation is past on from parant to child in big ammounts because the radiation is inside the organism.
No it isn't. Since radioactive isotopes (beyond normal background levels) are not retained within an organism, it cannot pass them on. Anything that would raise the level this much will outright kill the organism.

Quote
E. An organism with experiance to radiation builds resestance to it. An organism that had no radiation for a long time loses resestance. (to getting effected by new radiation)
:blink:
You ARE kidding? Right?
I guess you weren't.
Oh dear. Where to start?
This is just SO utterly wrong. You cannot ever build up a resistence to radiation by being exposed to it. Radiation damage happens at the molecular level, way below cellular level. It physically breaks covalent bonds. Some creatures may secrete a substance that is able to harmlessly absorb a little of the photon radiation (UV and to a lesser degree, gamma) but nothing can stop neutrons.
Hit C12 with a neutron and it becomes C13 which then beta decays to Berylium. Berylium does not share the same valency as Carbon so the molecule flys apart and there is nothing you can do about it.


Quote
F. Half of this things I had to gess on.
I could tell.

Organisms do not retain radiation unless they recieve a lethal dose in which case the organism will not be able to reproduce before it dies.
Radiation damage is an instantaneous thing.
Title: More accurate model of Radiation
Post by: Numsgil on August 24, 2005, 04:55:24 PM
The problem Bots is you're trying to quickly make evolution take a bot and make it better.  Other ALife sims can do this because the bots (or whatever) and the environment are more strictly designed.  Avida is a good example of this.  It's really quite easy to see if an organism is more or less fit in Avida, so it's really quite easy to see how evolution is progressing.

Darwinbots is way more open ended, to the point that it's almost impossible to really describe what the fitness functions are for the bots beyond the most basic level.  I've seen some really impressive adaptations, but you have to be willing to throw out preconcieved ideas of what is "better".  Some adaptations we might describe as "stupid".  But if your mutation rates are low enough, (negative) ratcheting evolution should be minimal (you hope that it will positively ratchet, that is, the organisms are always becoming better and better).

If you really want to evolve first bot to beat some F1 competitors, you're going to need millions of cycles.  Yes, millions.  Like not even 1 or 2 million.  Maybe 50 or 100 or even a billion.  And even then you can't really be sure the bots are adapting to become F1 competitors.

Perhaps a better way would be to take the longest surviving first bot in an F1 round and use him as your start bot for another F1 round.  Maybe I can set up some sort of macro for that.

If the bot eventually wins a whole match, move it to the next F1 competitor.  Theoretically something like this would work to evolve an F1 competitor.  But that's a big theoretical if.  You might need to refine the selection criteria a bit (maybe use most kills, or something like that).


I think that's right Zelos.  It's like 30 base pair mutations per person.  I'm not sure what it is for bacteria.  Organisms can actually change their mutation rates by having their DNA repair mechanisms improved/broken, so mutation rates aren't universal.

I've found that 5000 for everything is a decent starting point for a bot of maybe 50 to 100 instructions.  Smaller bots will need higher mutation rates.  Larger bots need lower.  (Especially multibots).
Title: More accurate model of Radiation
Post by: Botsareus on August 24, 2005, 06:29:16 PM
Quote
Perhaps a better way would be to take the longest surviving first bot in an F1 round and use him as your start bot for another F1 round. Maybe I can set up some sort of macro for that.

I tryed that before and I ran into a ton of problems:

The evolved robot can be Identical in skill to the new robot causes contests to last about 24 hours each.

Some other stuped problems simuler to the one above. I can recall that If I set the mutation too high the robot just dies all the time and the original stays.

Neverthless its a really promising method witch needs more attempts.



Right now I am "evolving" First Bot with low mutation rates. I can see what I expected by the 60000 cycles I am running it, the robot evolves somthing simple and stuped and gets killed. Evolution is dead. You know what? Thats it I had enough. I am going back to my Radiation ideas.
Title: More accurate model of Radiation
Post by: Numsgil on August 24, 2005, 06:54:59 PM
Quote
the robot evolves somthing simple and stuped and gets killed.
Then either it's a common pitfall that probably won't effect your whole population or it's actually not stupid, and there's a reason it's spreading.

Although there are some evolutionary paths that occassionally lead to utter destruction.  But usually they're rare, and you can steer bots away from it by tweaking the environment.
Title: More accurate model of Radiation
Post by: PurpleYouko on August 24, 2005, 06:58:45 PM
Has it occured to you that maybe Firstbot is already up an evolutionary dead end with no way out.
The straight line moving is efficient enough that any addition of turning just makes them less efficient and they get killed.
Try a bot that already turns a bit. You might have more luck.
Title: More accurate model of Radiation
Post by: Botsareus on August 24, 2005, 06:59:40 PM
Quote
and there's a reason it's spreading

Thats the point It gets killed after it evolved somthing , it had no time to "speciate".
Anyway I just tryed it for a good laff as Shen will say.

At some point I will have to run F1 simulatons all day the way Num suggests. I hope I won't have to go back to that pain.
Title: More accurate model of Radiation
Post by: Botsareus on August 24, 2005, 07:05:28 PM
Theoraticaly If two robots are Identical how can you cause 1 to win in F1 mode? I mean what I did lest time was time each round if it goes over the time limit I just gave a point to the parant robot. Leads to a whole lot of time wasted and the mutated robot never wins. Maybe I should try higher mutation rates? Still what was killing me was the wait for Identical or almost Identical robots to run out of time when you already know that the parent bot won.

I can see trying again with higher mutation rates. Thats all I can tell you Num.

I expect that after about 3000 retrys some kind of really lucky code will finaly win.
And thats only one contest.

P.S.
Yes PY all you say is true but I want to be blind to the facts a while longer if you don't mind.

P.P.S.
For the night I set up a better tweacked Radiation model, see what happens.

P.P.P.S.
Good News is tummorow is the lest day of my "make up for failing writing plasment test" class. Hopefully I will pass my test tummorw and be exepted to reguler collage.
Title: More accurate model of Radiation
Post by: Numsgil on August 24, 2005, 07:09:59 PM
Quote
Theoraticaly If two robots are Identical how can you cause 1 to win in F1 mode? I mean what I did lest time was time each round if it goes over the time limit I just gave a point to the parant robot. Leads to a whole lot of time wasted and the mutated robot never wins. Maybe I should try higher mutation rates? Still what was killing me was the wait for Identical or almost Identical robots to run out of time when you already know that the parent bot won.
If two sides of a coin each have 50% chance of being up after you flip it, why doesn't the coin ever land on its edge?

There is a slight possibility that F1 mode gives an advantage to bots that are listed first or last.  It's just a theory, I haven't been able to verify yet.  I remember when I worked out the leagues I proceeded on the notion that this was the case, and gave the defender the supposedly advantageous position.  You should probably do the same.

If your mutant bots are dying off against the unmuted version then you need to lower mutation rates.

Have you figured out the insta win buttons yet?
Title: More accurate model of Radiation
Post by: Botsareus on August 24, 2005, 07:18:15 PM
Problem is this is not a coin , its more like a <O> thing with the two edges being the wins and if it lends on its rounded side it gets drouped again. As I explained if I [span style=\'font-size:8pt;line-height:100%\']lower[/span] the mutation rates thats the most likly senerio. I was thinking maybe if a lot of new code generates at once it can actualy do a good thing.

Quote
Have you figured out the insta win buttons yet?

I might as well rought my time ran out for Identical bots thingy through the Insta win button to save on code indeed.
Title: More accurate model of Radiation
Post by: Numsgil on August 24, 2005, 07:24:29 PM
Okay, I did an experiment.  I ran an "F1" contest between two random ranges.  Each had a 50/50 of winning any given round (that is, they were identical).

The F1 contest did eventually pronounce a winner.  Unfortunately, it was after 30 000 rounds.  So it seems there's definately some unfairness going on in F1 mode.
Title: More accurate model of Radiation
Post by: Numsgil on August 24, 2005, 07:26:16 PM
Quote
I was thinking maybe if a lot of new code generates at once it can actualy do a good thing.
No no no no no no no no.  That is so wrong.  Remember that mutations are random.  Meaning most of the time you're just getting noise.  You need to throw mutations at a bot slowly so each little shout has a chance to work its magic.  The loewr your mutation rates, the more stable your mutations will be.  The only problem is the time involved.
Title: More accurate model of Radiation
Post by: Botsareus on August 24, 2005, 07:28:35 PM
Nice , wait for 30000 rounds on your free time, I love it. Poor Nums.

I was thinking making my "ran out of time" as a 3rd player and scoring him like a player. If "ran out of time" wins then the old bot is kept and the contest is restarted with a new "virsion" of the old bot.

Anyway got to run play some rift before the night and the test. Happy Bday again, see you later.
Title: More accurate model of Radiation
Post by: Numsgil on August 24, 2005, 07:33:01 PM
Problem with any sort of time limit is that some bots really take that long to win.  Ymir, when I was first working on it, was absolutely horrible this way.  I think it was Destinatus Praelitor or whatever that it would play "1 man vs. the world" with for 5 or 6 hours at a time.

Of course, Ymir would come from nowhere and wipe the floor with Desty.  But those were some long 5 or 6 hours.
Title: More accurate model of Radiation
Post by: Endy on August 24, 2005, 10:29:52 PM
I'm honestly not sure it is possible to evolve something to win at F1. The issue is that the bot is having to compete with nearly identical coppies for food. The problem can actually be compounded with bots being nice to each other. The group actions eventually lead to overcrowding conditions, allowing wasteful(for F1 contests) canni's to take the lead, by ensuring a large food supply available when the bot does become cannibotisitic.

The best I could recomend is taking a look at existing champions and attempting to build a bot to beat them. A sort of technological evolution rather than sim-biological. If your contender doesn't do too good, you take a look at where it is lacking and improve it. If the enemy has a special attack/counter attack you figure out a blocking method to counter it.

Evolution is however good for discovering the natural cheap actions the bots utilize. When a particular bot began gaining in numbers, I was able to track it down to increasing .shootval. Now I can take the knowledge and re-apply it in a more controlled fashion in contests.
Title: More accurate model of Radiation
Post by: Zelos on August 25, 2005, 07:42:11 AM
PY a organism is able to be more resistence to radiation (mutations). there is a archea that is able to live in a nuclear reactor while a few second there would almos mean certain death for a human.
Title: More accurate model of Radiation
Post by: Numsgil on August 25, 2005, 09:01:08 AM
I seem to remember reading about that too.  But you have to wonder what kind of radiation it's being exposed to.  If it really is neutron decay or whatever, then it must have some incredible DNA repairing mechanisms.
Title: More accurate model of Radiation
Post by: PurpleYouko on August 25, 2005, 10:49:57 AM
The most radiation resistant organism in the world is Deinococcus radiodurans (http://www.spacedaily.com/news/life-03c.html) according to this article and a load of others.
it does not specify the kind of radiation that it is resistent to but I strongly suspect it is going to be gamma and not neutrons.

The articles say that when the bacteria is subjected to a burst of radiation, its DNA is completely shredded but its repair mechanisms are such that it is able to put it all back together in a day.

However if this bacteria were subjected to a constant radiation source such as a reactor outer core (outer core has no fast neutrons left) where all there will be are a bunch of gamma rays, it would not have time to repair the damage and would still die.

I just don't buy it that these things could survive in a reactor.

These things have been known to survive the level of irradiation (gamma) used to sterilize food but that is still only an infinitesimal amount of the gammas in a reactor core.
The bacteria can survive 1.5 million rads of gamma or X-ray radiation.
An average reactor pressure vessel receives a gamma dose of 10,000,000,000,000 rads. (see this paper (http://72.14.207.104/search?q=cache:epgtbdl-lI0J:ww2.mne.ksu.edu/~jks/papers/SPIE_2004_MPFD.pdf+rads+in+a+reactor+core&hl=en) on reactor design)
That is just gamma. On top of that the fast and slow neutron reactons would physically convert almost every Carbon atom in the whole organism to Beryllium within a couple of hours.
No amount of DNA repair is going to save them when there are no available Carbon atoms.
Title: More accurate model of Radiation
Post by: Botsareus on August 25, 2005, 12:37:36 PM
Endy, I have developed a program before a while back that can win me in a shooter vedio game , it learned this by itself. on my weakends I am currently working on a pingpong game for microsoft word that should work the same way (I have not done it in a while , I need to be sure its not my imaginaton and I actualy did create a really effective naturaly evolving ai)

As for canni bots, try putting The One FirstBot frandly genes into the one and into my firstbot. If you put them in F1 mode TheONE will simply be gready to give FirstBot food and it will die form starvation. Thats the kind of effect I am planning to get.
Title: More accurate model of Radiation
Post by: Zelos on August 26, 2005, 01:02:48 PM
it can with stand so much damage cause the dna is so packed that if its smashed so it break the parts stay were they are unitel the bacteria can fix it
Title: More accurate model of Radiation
Post by: Numsgil on August 26, 2005, 04:23:58 PM
But again, that's probably resistance to photonic radiation (I hope that's a word!), which is quite different to resistance from neutronic radiation.  (I love making up words :P).

And as far as I can tell these little buggers feed on nuclear waste (or in nuclear waste?), which is quite different in rad levels from the inside of a reactor.