Darwinbots Forum

Code center => Suggestions => Topic started by: Botsareus on April 19, 2005, 04:53:52 PM

Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 04:53:52 PM
1.) Insert a new value works for settings files ( my plasment control for settings files to if its not lost)

2.) I like PY's sliders he included in the mutation rates , I want them to actualy mutate and work for each robot seporatly, I cant say what there defult range should be , I use PY standerd it works fine exsept:
Quote
cond
30 'number
20 'number
>

is the same as

Quote
4 'number
1 'number
>
The solution is not to let two numbers mutate in one cond part.

3.) (Sliders Part Two) I need new sliders to reprosent the following:
The chance to insert *number , or *.sysvar, or any-number, or .sysvar-or-number
Into the actions part of the gene.

4.) All Mutation Rates are saved in the robots dna file , simuler to the way hash saves (but dont incript too heavy please)

5.)A Minor Bug with inserting [you]new instructions [/you]and [you]new values[/you]:
Quote
  While pos < fd
    If ppos = pos Then Exit Function
    ppos = pos
    pos = NextElement(DNA, pos, 4, 2) + 1 'position of the start element
    endg = NextElement(DNA, pos, 4, 3)    'end of the gene
    While pos <= endg
      If Random(1, prob) = 1 Then
        If MakeSpace(DNA, pos, 1) Then
          DNA(pos).tipo = 2
          DNA(pos).value = Random(1, 9)
          x = x + "Inserted instr," + Instrname(DNA(pos).value) + ", at pos " + CStr(pos) + vbCrLf
          InsertRandomInstr = InsertRandomInstr + 1
         'pos = pos +1 'MUST BE ADDED HERE
        End If
      End If
      pos = pos + 1
    Wend
  Wend

For bouth functions , the system forgets to skip positions after inserting a new value , witch means that all the new values and instructions always end up in the bigging of the gene.

6.)I cant even biggin to describe what happens if all rates or portions of rates are set to "1", I never seen so mutch hang-ups. As a long term project we need to fix the mutations not to mutate the dna so mutch that it causes hang-ups in the run time.


***
Num, How do you wont the charts to "save"?

***
If you need help on any of the items above please specify
Title: What I need done in mutations
Post by: PurpleYouko on April 19, 2005, 05:06:04 PM
Quote
6.)I cant even biggin to describe what happens if all rates or portions of rates are set to "1", I never seen so mutch hang-ups. As a long term project we need to fix the mutations not to mutate the dna so mutch that it causes hang-ups in the run time.
 :blink:
There must be something wrong with your system if this hangs up.
That is precisely the way that I test all the mutations.
Set them all to one and let it run. I can run for hours this way with multiple restarts and never once get a hang up.
Title: What I need done in mutations
Post by: PurpleYouko on April 19, 2005, 05:08:47 PM
Quote
That is precisely the way that I test all the mutations.
Set them all to one and let it run. I can run for hours this way with multiple restarts and never once get a hang up.

Famous last words.   :redface:

Just tried it one more time and the sim hung up before it even started properly.

Wonder which one of the settings is causing that then.
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 05:09:48 PM
6.) When "Portions of rates" (some rates) are set to 1... (I actualy acheved this by letting the rates jumb up and down like crazy  when I was complaining that mutation rate of mutation rates was changing it too little) Its still in there PY, unless ?you fixed it?

rofl , good voca: Portions = some

anyway we still got :

1.)...
2.)...
3.)...
4.)...
5.)...
6.)read post ^
Title: What I need done in mutations
Post by: PurpleYouko on April 19, 2005, 05:19:46 PM
Quote
rofl , good voca: Portions = some

WTF  :blink:

What does this mean?

I don't speak Gibberish.
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 05:23:02 PM
A.) If only [you]some rates [/you]are set to "1" and [you]some rates [/you]are set to ("1250" or "1500") then we get "hang-ups"

B.) voca. = vocabulary (for the lack of good spelling)

C.) 1. 2. 3. 4. 5. 6. ^ still need to reply to thouse....
Title: What I need done in mutations
Post by: PurpleYouko on April 19, 2005, 05:24:37 PM
Well you won't be getting it from me tonight cuz I'm going home.

Bye  :laugh:
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 05:31:40 PM
Cya , Dont Delay for more then a week please...

What about you Num, Still working on 3d games?
Title: What I need done in mutations
Post by: Numsgil on April 19, 2005, 05:33:31 PM
6.  I've noticed this some times actually.  There's an infinite loop somewhere in the code.  Problem is I have no idea where it is or what it is.  You can't even pause the VB code during the problem because events aren't being registered anymore.

Such a pain.

Charts:  You mean my reference to graphs in the simulations tools thread?  Probably comma deliminated(?) text file, like the snapshot utility.

Code: [Select]
3.  If I understand you correctly, you want to be able to control A, B, and (A or B) all seperately, right?  To get A or B given A and B, you take 100% - (A * B).  If we let you control A or B seperately, it creates a whole slew of statistical problems that I don't want to mess with, to be honest.
2.  I don't understand exactly what you're getting at.
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 05:33:44 PM
Quote
Just tried it one more time and the sim hung up before it even started properly.

I really should start reading all the posts man...
Title: What I need done in mutations
Post by: Numsgil on April 19, 2005, 05:35:46 PM
Yeah, been working on 3D programming off and on.  I've got stars, a sun, and a planet that you can navigate through with the mouse.
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 05:38:54 PM
anyway thats 6...


3.) Using the Py Slider controls , yes.
you know stuff like this:
=====\/==
==\/=====
===\/====
IN THE MUTPROB FORM

2.)  A: I need the sliders to work seporate for each robot.
 B: The quotes are an example of somthing that must not happen in the dna code when the cond part of the gene mutates, Look at the quotes they are the same as true.. and false..  ex:  9 5 > = true , 9 5 < = false , now whats the use of having dummy conditions evolve so often?
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 05:44:45 PM
3.) The new once will be four sliders from 0 to 10
===\/=== *.anynumber is 10
===\/=== *.sysvar is 5
===\/=== anynumber is 3
===\/=== sysvar is 4

generate a random number from 0 to (10+5+3+4)

0 to 10+ 0 to 5 + 0 to 3 + 0 to 4

5 = first type

------> 14 = 2nd type

---------> 16 = 3rd type

-----------------> 20 = 4rth type
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 05:49:08 PM
How do sliders mutate? 3 sliders from 0 to 10 a , b , c

A mutated: 2 (a = a +- 1)
B mutated: 3
C mutated: 4

total: 9

slider total avrage: 15


15/9 = A1/2
15/9 = B1/3
15/9 = C1/4

Just to make it easy on the user...

A = A1
B = B1
C = C1

fin...
Title: What I need done in mutations
Post by: Numsgil on April 19, 2005, 05:52:10 PM
2.  Because a condition is always true or always false doesn't mean we shouldn't be able to mutate it.

And to be honest, trying to police mutations is impossible.  There'll always be mutations we deem 'pointless' that fall through any cracks we leave.  And some 'pointless' mutations are actually worth developing.  Just let them do whatever you can possibly imagine.  Something interesting is bound to develop.

3.  I think my stats knowledge was wrong in my last post.  Nevermind the man behind the curtain...

I don't think you should be able to control that chance to A or B independantly of A and B.  That is, if:

*.sysvar = 33%
*number = 33%
number = 34%

then the chance of *.sysvars or *number should be 66%.  (*.sysvars + *number).
Title: What I need done in mutations
Post by: Numsgil on April 19, 2005, 05:54:18 PM
We probably should just have two sliders, one for number, one for sysvar, and then have a * operator that can appear or dissapear from infront of numbers.
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 05:57:31 PM
3.) Num, not [you]*.sysvar [/you]but[you] .sysvar [/you], I am talking about new stuff for the "actions" part of the gene, not the "conditions" part of the gene...

we need all four:

*.sysvar
.sysvar  (really is a number in a sertain range)
*.number
number

Num, There must be different chance for *.sysvar and .sysvar , do you get that?
Yes we can have *.sysvar  in the "actions" part of the gene. and numbers like 5 , 6 turn into:

Quote
.aimdx
store
.aimsx
store
if there is a store

Hell we can even have this

Quote
*.eye5
store

I have no idea who will need such a bizarre function call but we have it. Will it even work?

2.) ok forget the quotes , but what about mutating sliders?
Title: What I need done in mutations
Post by: Botsareus on April 19, 2005, 08:22:58 PM
OK Truly, this is how many sliders I have in mind, not "2 sliders overall" but:

I.)Cond part of gene

A.)Top Part of one cond

==\/=== *.sysvar
==\/=== *.number
==\/=== number

B.)Buttom Part of one cond (seporate mutations from top part)

==\/=== *.sysvar
==\/=== *.number
==\/=== number

II.)Actions part of gene

A.)Math Ops.

==\/=== *.sysvar
==\/=== *.number
==\/=== number

B.)Before "Store" operator

==\/=== *.sysvar (sysvar used as memory pointer)
==\/=== *.number (memory pointer)
==\/=== .sysvar (basic instruction)

I have Truly lost it this time eh? I am counting 12 sliders over here....
Title: What I need done in mutations
Post by: Numsgil on April 19, 2005, 11:20:31 PM
Yes, you have lost your mind.

lol.

Four; I am willing to imagine 4 at most.  But I still think just two with an optional * operator is the way to go.
Title: What I need done in mutations
Post by: PurpleYouko on April 20, 2005, 10:00:46 AM
Did you know that as far as the DNA is concerned there are only 2 types of number?

if DNA(n).tipo = 0 then DNA(n).value is determined to be a normal number. This can further be separated into a sysvar memory address such as ".poisoned" or a pure number such as "838". In either case the value stored in DNA(n).value is the same, 838

if DNA(n).tipo = 1 then DNA(n).value is the value stored in the location pointed at by either a sysvar (*.poisoned) or a label (*838). In either case the value stored in DNA(n).value is again the same, *838

Everything else is just somantics. The interpreter decides whether 838 is defined as a sysvar then displays it with the sysvar label equivalent of 838 if it is on the list.

In other words *838 becomes "*.poisoned" but *839 remains as *839 because no sysvar exists at memory location 839

I repeat there are only two types of number possible. Pure numbers and labels

Adding the third slider makes no difference whatsoever to the value stored in the DNA. It just changes the way it is displayed to make it more readable Adding a little more inteligence to the translation routine  would mean that we only need two sliders. We sure as heck don't need four.
Title: What I need done in mutations
Post by: Botsareus on April 20, 2005, 10:11:49 AM
Sry not 4 , and not 7 eather (I was sleepy), But 6 sliders , seporate for the store operator and for reguler math ops. I did a quick fix for this in the source I posted before, You guys did not like it, was wondering why...  :wacko:

And So The Dna can choose weather it wants to have 20 30 > 4 1 < stuff in there we have the top and the buttom part of a condition mutate seporatly , means 12 total sliders...
Title: What I need done in mutations
Post by: Botsareus on April 20, 2005, 10:16:05 AM
PY the pure numbers is the thing that also messes up a lot of store operators we get stuff like:

10000
store

wont work

If for store we have a [you]seporate system then for the math [/you] it will work good.


(Here I go again about policeing the dna , what a ...)
Title: What I need done in mutations
Post by: Botsareus on April 20, 2005, 10:27:11 AM
7.) almost forgot: Public Function DelRandomPos Does Not Work. It simply does nothing most of the time.
A quick fix for it will be:
Quote
Delete DNA, j, j +1


3.) If I atleast convinced you to add 4 more sliders its the day.....
Title: What I need done in mutations
Post by: Botsareus on April 20, 2005, 10:49:11 AM
6.) I think a lot of add stuff mutations and some change mutations cause it. the buttom line: its more then in one place. If you alt-tab to the vb window you can "breack" the hang-up easy. Just hit the || button.
Title: What I need done in mutations
Post by: Numsgil on April 20, 2005, 10:51:25 AM
Okay bots:

A.  The only possible differentiation allowed is between conditions and the bodies of genes.  That means you simply can't figure out if your mutating something stupid.  Trying to correlate what's around a segment of DNA to what it should mutate is both impossibly difficult and self defeating.  Real DNA doesn't do this.  What's the point of an ALife sim if you program in cheap tricks for the mutations?

10000 store is, you're right, stupid.  Good news: it won't cost you anything.  It's just junk that might, one day, do something.  Deal with it, it's NOT changing.

And also, I'm actually working to eliminate that difference, not increase it.  Eventually conditions and bodies will have only minor differences, so I am full heartedly against giving them different mutation rules.  That includes existing mutations code and new code.  Eventually the only difference between conditions and the bodies of genes:

Conditions (<, >, ~=) will only work in the conditions block, and store commands (store, dec, inc) will only work in the body part of genes.  Then mutations will move around, delete, and add cond, start, etc. to the genome.

B.  You read PY's posts, right?  sysvars and numbers are the same thing.  THE SAME THING.  A sysvar is just a number that's in the range 1 - 1000.  and a number in the range 1-1000 is a sysvar, assuming one exists for that number.

They both follow the same rules.  In truth, you just need two sliders:
*number and
number

C.  We tried to review your changes but you never answered us what they did.  I only found the two changes I pointed out, and then you got angry and left for a few days.  If you can't explain to us what you're doing, we're not just going to add it into the program (and no, the code WAS NOT self explanatory.  In fact, 'what does this do' was my subtle way of saying "you sloppy programmer, what the Hell were you trying to do?  This is drivle."  Isn't it better all around when we can read between the lines?)
Title: What I need done in mutations
Post by: Botsareus on April 20, 2005, 10:56:14 AM
:angry:  :( , If .sysvars are more common then *stuped** numbers like 1000 before "store" the dna mutates faster and better...

If we wont have 20 52 > 4 1 < etc. it will be filtered out in some way , (maybe 6 sliders) the dna will mutate faster and better...

Ok Num, lets have slowly mutating dna with a lot of errors in it, I give up


Quote
You read PY's posts, right? sysvars and numbers are the same thing. THE SAME THING. A sysvar is just a number that's in the range 1 - 1000. and a number in the range 1-1000 is a sysvar, assuming one exists for that number.

Well "daa" I added changes to that code myself , don't you think I figured out how it works first...

A.) sounds good Num, I have no idea how practical it is though...
Title: What I need done in mutations
Post by: Numsgil on April 20, 2005, 11:10:21 AM
Okay, DNAInsertRandomValue should have it's insertion of a number (-10000 to 10000, gaussian) and a sysvar (1 to 1000, linear) controllable with PY's sliders.  It currently does not (unless I have that wrong PY?)
Title: What I need done in mutations
Post by: PurpleYouko on April 20, 2005, 12:40:22 PM
Quote
Okay, DNAInsertRandomValue should have it's insertion of a number (-10000 to 10000, gaussian) and a sysvar (1 to 1000, linear) controllable with PY's sliders.  It currently does not (unless I have that wrong PY?)
You are right. There is no connection between that routine and any of the sliders.

This routine only deals with the "action" part of the gene anyway. It inserts a random value which has a 50:50 chance of being a sysvar/label or a pure number between the "start" and "stop" sections of a gene

Maybe it should be connected to aq slider and maybe not. I have no real preference here but I do feel that, even though fixing it that way would give more control, it also makes the mutations a little more "artificial".  :unsure:

One thing I did see from this routine is that Bots was right in that it is possible to evolve a piece of DNA such as

*853 9851 store

This would actually only be junk DNA and could notcrash the program. There are safeguards elsewhere to prevent that.

There is nothing at all wrong with junk DNA so I don't see why we should need to prevent this situation from happening.

Try this test bot out to prove it.

Code: [Select]
cond
start
854 9851 store
stop
end

It just sits there executing its gene but doing nothing else. No crashes!
It is just useless, junk DNA.
Where is the problem?
Title: What I need done in mutations
Post by: Botsareus on April 20, 2005, 04:46:45 PM
PY, If thats your point of view then why should we have any sliders at all?
(Just assume defaults for thouse sliders)


 :bigginangel: Bau  :bigginangel:
Title: What I need done in mutations
Post by: PurpleYouko on April 20, 2005, 04:58:51 PM
Quote
PY, If thats your point of view then why should we have any sliders at all?

Funny I distinctly heard myself say that I was unsure whether it was right to have too much control. I even put a nice little  :unsure:  at the end of it.

As it happens I am coming around to thinking that the whole idea of the sliders was a bit of a waste of time.

Basically I just put them in to see how well the idea would work and as usual I go along with popular consent when I have little or no preference either way.
The fact is that I really don't care about mutations at all except for the challenge of programming them to work properly. I just don't like stuff being busted.
Title: What I need done in mutations
Post by: Botsareus on April 20, 2005, 05:11:07 PM
Quote
The fact is that I really don't care about mutations at all except for the challenge of programming them to work properly. I just don't like stuff being busted.

 :angry:  Well thats were we should start eh?  :angry:

I seen some really cool first bot mutations PY:

One really good one was:

If someone shooting -1 partical on you, shoot them back a virus that causes them to shoot food particals instead of -1 particals

But gess what? This happend in the old oveflow virsion , so this robot had no time to become the top bot. (So I can select him using the "top bot button" (thats for proof))