Author Topic: More realistic mutations  (Read 15014 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
More realistic mutations
« on: February 23, 2005, 12:00:14 PM »
The idea behind this is simple:

A bot is more likely to have sharenrg mutate into sharebody than it is to have sharenrg change to shootval.

The machinery for sharing nrg is closer to sharing body than most other commands.  So in the mutations code, we assign probabilities for one thing to change into another thing, instead of having them more or less equal.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
More realistic mutations
« Reply #1 on: February 23, 2005, 12:03:23 PM »
Now that is a kick-ass idea.

We will probably have to subdivide all of the commands into catagories then give the highest probability of a mutation within the same catagory and a much smaller chance of crossing to a new one.

Like it

 :D  PY  :D
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
More realistic mutations
« Reply #2 on: February 23, 2005, 12:05:18 PM »
I have a printout of the sysvars where I group similar commands as a reference.  Maybe I can use that to create a probability table or similar sysvars.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
More realistic mutations
« Reply #3 on: February 23, 2005, 04:39:56 PM »
Any way to "normalize" the numbers that mutations come up with?

I get stuff like:

cond
*.refaim 31056 !%=
start
etc.
stop

All the time. Presumably this is because these don't carry any serious penalities, but at the same time they don't exactly hit on any values even vaguely close to normal for the commands.

Endy ;)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
More realistic mutations
« Reply #4 on: February 23, 2005, 04:48:27 PM »
I'd love to but I have no idea how to even start.

I can use modular math for numbers stored in things like setaim.  That helps things a little.  But it still doesn't solve the problem of wierd condition comparisons.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
More realistic mutations
« Reply #5 on: February 23, 2005, 04:52:25 PM »
It can be fixed but it involves a lot of very specific conditions.
In order to stop the program from returning stupid numbers in things that can only use numbers in specific ranges, you first have to identify what memory location stuff is being put into and then apply limits to the input value.

Lots and LOTs and [span style=\'font-size:14pt;line-height:100%\']LOTS[/span] of code.

 :unsure:  PY  :unsure:
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
More realistic mutations
« Reply #6 on: February 23, 2005, 10:19:06 PM »
Oh well. :unsure:

Maybe we can just think of it as junk dna, which could eventually develope into something more useable.

Endy ;)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
More realistic mutations
« Reply #7 on: February 24, 2005, 09:26:58 AM »
One thing we could easily change is to reduce the random number that will be put into the DNA on mutation.
I can't really think of any DNA command that can take a number higher than 1256. (correct me if you can think of one) So why are numbers as high as 32000 being put there?

This random number can be limited to a range of -1256 to +1256 which will give more chance of usable mutations.

 :D  PY  :D
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
More realistic mutations
« Reply #8 on: February 24, 2005, 10:28:17 AM »
HOW ABOUT OUR HIP RANDOM NUMBER IS EQUAL TO: = Choose(Int(Rnd * 3) + 1, Int(Rnd * 10), Int(Rnd * 255), Int(Rnd * 20000)) * IIf(Int(Rnd * 2) = 0, -1, 1)

'One/Three low values
'One/Three mid values
'One/Three huge values
'One/Two Negative or Posetive

'Good Game Huge numbers problem

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
More realistic mutations
« Reply #9 on: February 24, 2005, 12:44:56 PM »
Boyancy goes up to +/-2000.  (setboy)

I definately think it should be an option in the mutations panel.  Some masochists might decide that 32000 is a great number for mutations!



Bots, can you break down your statement into several smaller ones?  No need to optimize it yet  :rolleyes:

Guest

  • Guest
More realistic mutations
« Reply #10 on: February 24, 2005, 03:07:13 PM »
Dim a as integer
Dim b as integer
Dim c as integer
Dim d as integer

a = Int(Rnd * 10)
b = Int(Rnd * 255)
c = Int(Rnd * 20000)
d = IIf(Int(Rnd * 2) = 0, -1, 1)

theoutput = Choose(Int(Rnd * 3) + 1, a, b, c) * d

'theoutput is the final output

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
More realistic mutations
« Reply #11 on: February 24, 2005, 03:11:06 PM »
Ah, much better.  Now I can see how it works.   :D

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
More realistic mutations
« Reply #12 on: February 24, 2005, 03:14:31 PM »
Again I forgot to logon , great

Dont forget to add Randomize unless ofcorse its already there

This way we can have better chance of having small numbers without worrying about not having big numbers, theoutput is the final output

ranges for "a" , "b" , and "c" can be tweaked by PY and NUM, make "b" match the length of sysvars for example; I don’t recommend tweaking the range for "a" , I like it like that its a good range for that .shoot command

***
Well? Did you try it Num? Does PY like it too?
« Last Edit: February 24, 2005, 04:02:53 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
More realistic mutations
« Reply #13 on: February 24, 2005, 04:13:21 PM »
I started replying but then I had to look up a link and I got distracted.   <_<

This is an attempt at a gaussian distribution, right?

An interesting technique, did you come up with it yourself?

trying to do rnd * 2 to come up with a random bit has some subtle flaws (the distribution can be off).

Check this link on random numbers.

Chapter 7.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
More realistic mutations
« Reply #14 on: February 24, 2005, 05:03:46 PM »
Yes I did. So can we apply it to the problem for more realistic mutations ?

lest time I checked "IF int(rnd*2)=0" worked fine , checking now to be sure...

Nice link but I think I will Invent stuff myself before I find what I am looking for in there....
« Last Edit: February 24, 2005, 05:08:08 PM by Botsareus »