Author Topic: Advanced Randomness Generation Thread  (Read 19514 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Advanced Randomness Generation Thread
« Reply #15 on: March 17, 2005, 12:24:08 PM »
I never sayed "mutation dont work" , PY read the whole Tread to figure it out.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Advanced Randomness Generation Thread
« Reply #16 on: March 17, 2005, 12:26:27 PM »
Maybe not in this thread but you most certainly have said that in the past.

 <_<  PY  <_<
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
Advanced Randomness Generation Thread
« Reply #17 on: March 17, 2005, 12:29:01 PM »
Quote
cond  head of the second gene
  *30 
  0
  >  if memory cell 30 content is >0

Reguler "variables" do not become this kind of "variables" with any settings.

The Program cant change a variable to become this variable , The Program cant add a new variable of that type

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Advanced Randomness Generation Thread
« Reply #18 on: March 17, 2005, 12:32:43 PM »
Quote
*31
  *30
  store  we put the content of cell 31 in the cell pointed by cell 30

The above does not get added to the "start...stop" part of the gene.

Nothing changes to become the other one ex:

Quote
97 'changed from *31
  957 'change from *30
  store  we put value 97 directly into memory location 957

The flip side is true also:

Quote
*31 'changed from 97
  *30 'changed from 957
  store

Does not happen.
« Last Edit: March 17, 2005, 12:33:15 PM by Botsareus »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Advanced Randomness Generation Thread
« Reply #19 on: March 17, 2005, 12:44:00 PM »
Quote
*957 'The above value must be able to change into stuff like *210 *310
*30  '[you]The below value must be able to change into stuff like *210 *310[/you]
>

more so,

Quote
Quote
 *.refypos
  0
  >
  *.ypos
  20
  <
  *.sun
  0
  =

  *.ypos 'yes this changes but
  *.sun '[you]The below value can be a variable[/you]
  >
  *.ypos 'yes this changes but
  *.sun '[you]The below value can be a variable[/you]
  <
  *.ypos 'yes this changes but
  *.sun '[you]The below value can be a variable[/you]
  =

« Last Edit: March 17, 2005, 12:55:36 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Advanced Randomness Generation Thread
« Reply #20 on: March 17, 2005, 12:44:02 PM »
OK Here is the code which inserts a NEW condition.

Code: [Select]
' inserts a new condition
Public Function DNAInsertCond(n As Integer, x As String, DNAto As String) As Integer
  Dim t As Integer, k As Integer, inizio As Integer
  Dim a As Integer
  Dim b As Integer
  Dim genestart As Integer
  t = 1
  DNAInsertCond = 0
  With rob(n)
  While Not (.DNA(t).tipo = 4 And .DNA(t).value = 4)
    If rob(n).DNA(t).tipo = 4 And rob(n).DNA(t).value = 1 Then
      If Random(1, Int(rob(n).mutarray(8) / SimOpts.MutCurrMult)) = 1 And DNACondsInGene(n, t) < MaxDnaCond Then
        DNAInsertCond = DNAInsertCond + 1
        x = x + "Condition inserted at pos " + CStr(t + 1) + " through " + CStr(t + 3) + vbCrLf
        k = t
        inizio = t + 1
        If DNAMakeSpace(n, t + 1, 3) Then
          .DNA(t + 1).tipo = 1
          .DNA(t + 1).value = rob(n).usedvars(Random(1, rob(n).maxusedvars))
          .DNA(t + 2).tipo = 0
          If Random(1, 10) = 1 Then
            .DNA(t + 2).value = Random(-10, 0)
          Else
            .DNA(t + 2).value = Random(0, 32000)
          End If
          .DNA(t + 3).tipo = 3
          .DNA(t + 3).value = Random(1, 6)
          x = x + "new condition = " + varname(CStr(.DNA(t + 1).value))
          
          x = x + " " + Str$(rob(n).DNA(t + 2).value)
          
          x = x + " " + Condname(rob(n).DNA(t + 3).value) + vbCrLf
          DNAto = DNAto + " " + varname(CStr(.DNA(t + 1).value))
        End If
      End If
    End If
    t = t + 1
  Wend
  End With
End Function

Note the line....

.DNA(t + 1).value = rob(n).usedvars(Random(1, rob(n).maxusedvars))

This line puts a random value into the DNA file at a position equal to the first part of the conditional statement.
It does appear that it is only able to grab a value from the "Usedvars" list which contains the memory values of all the sysvars.

From this code it does indeed appear to be impossible to generate a condition like..

*55 24 !=

since *55 does not appear in the "Usedvars" list

Is this what you are getting at Bots?

 :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
Advanced Randomness Generation Thread
« Reply #21 on: March 17, 2005, 12:47:07 PM »
Yes that [you]one[/you] of the problems.

Read the other two also.

(PY FINALY YOU GETTING IT :) :) :) )

That a problem

That a problem
« Last Edit: March 17, 2005, 12:49:19 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Advanced Randomness Generation Thread
« Reply #22 on: March 17, 2005, 12:50:38 PM »
I don't quite follow what you mean though.

Are you saying that it isn't possible to change the conditional at the end of the 3 part condition?

eg. from...

*.vel 30 >

to....

*.vel 30 !=

 :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
Advanced Randomness Generation Thread
« Reply #23 on: March 17, 2005, 12:52:11 PM »
"Are you saying that it isn't possible to change the conditional at the end of the 3 part condition?"

NO you got it right before , no no thats not it.

I am talking about *55 in your example , not about the conditional

-----------------------------------------------------------------------------------------------

Quote
From this code it does indeed appear to be impossible to generate a condition like..

*55 24 !=

since *55 does not appear in the "Usedvars" list

Is this what you are getting at Bots?

Thats it man thats what I am talking about.
« Last Edit: March 17, 2005, 12:54:19 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Advanced Randomness Generation Thread
« Reply #24 on: March 17, 2005, 12:56:59 PM »
OK I think I finally understand what your problem is.

I will check it out and see what can be done. Shouldn't be too hard.

I do think that the vast mojority of mutations aught to point to something that makes sense though.

It makes a lot more sense for a new condition to read something like...

*.ypos 567 >

than if it came out as...

*567 284 !=

or...

*894 *28 !%=

The first one is usable while the other two are just garbage. That is why the mutations are designed to point toward something usable in the present system.

It should be possible to get garbage conditions and actions though

 :D  PY  :D
« Last Edit: March 17, 2005, 12:58:24 PM by PurpleYouko »
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
Advanced Randomness Generation Thread
« Reply #25 on: March 17, 2005, 01:00:36 PM »
Py I thought you were a Mathematician , How is it garbage? Its actualy wery usefull.
« Last Edit: March 17, 2005, 01:00:52 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Advanced Randomness Generation Thread
« Reply #26 on: March 17, 2005, 01:02:08 PM »
Most of the time any kind of useful mutation will in some way reference an actual sysvar and not just a random memory location.  That said, anything a bot programmer can do the mutations system should be able to do.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Advanced Randomness Generation Thread
« Reply #27 on: March 17, 2005, 01:03:01 PM »
Quote
That said, anything a bot programmer can do the mutations system should be able to do.
Right on Num , Good words.


Py check out the other two specific problems

That's a problem

That's a problem


----------------------------------------------
Quote
Most of the time any kind of useful mutation will in some way reference an actual sysvar and not just a random memory location.

The point of mutation rates is to figure out witch mutations are more usefull. If we make  seporate rates for the stuff I am talking about it should work fine.
« Last Edit: March 17, 2005, 01:07:27 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Advanced Randomness Generation Thread
« Reply #28 on: March 17, 2005, 01:06:07 PM »
Useful for what?

The vast majority of robots couldn't give a crap if memory location 894 is almost equal to memory location 28.

Unless they happen to be using those memory locations for something then it is indeed garbage.

Maybe one day they might start to use those locations but face it the chances are pretty slim.

I know mutation is a hit and miss thing but making this kind of change will just multiply the number of misses by orders of magnitude.

 :D  PY  :D

PS I am a research Chemist, not a mathemetician.
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
Advanced Randomness Generation Thread
« Reply #29 on: March 17, 2005, 01:06:17 PM »
I'd love to help but the mutations code is still garbage to me.  I've probably studied every line of every part of the program except the stuff for ties and mutations.

P.S. I'm the mathematician.
« Last Edit: March 17, 2005, 01:07:16 PM by Numsgil »