Bots and Simulations > Bot Tavern

Dominator not eating well

<< < (2/2)

Numsgil:
Haha, yeah, like we'd specifically rig the program to favour our bots...   :unsure:

Okay, I've been known to introduce a new feature or two that then totally owns all other bots, but I never introduce things that break older bots.

Anyway, you should report run-time bugs when you run across them.  The idea of open source is that we all share our collective knowledge.  Not that we all design our own programs from a common source.

Botsareus:
too late now , I did not comment my fixes , now I have to unzip the source code to another folder... get windiff... at any rate I do some dougy bug fixes here and there as always so you may not like them anyway.

ah hell, Here is the trouble code from the old virsion with my fixes:


--- Quote ---Private Sub finddist(n As Integer)
  Dim a As Single  'target xpos
  Dim b As Single  'target ypos
  Dim c As Single  'robot's xpos
  Dim d As Single  'robot's ypos
  Dim e As Single  'distance to target
  b = readst(n)
  a = readst(n)
  c = rob(n).x
  d = rob(n).Y
  e = ((c - a) ^ 2 + (d - B) ^ 2) ^ 0.5
  If e > 32000 Then e = 32000
  writest n, Int(e)
End Sub
--- End quote ---


--- Quote ---Public Sub mutate(n As Integer)
'I admit I did modify the mutations model in several places , here is one example:
 'appears to be broken.  genenum never > 0 Too bad , fixed by BAU
  If Random(1, CountGenes(rob(n).DNA)) = 1 Then
    a = a + SplitRandomPos(rob(n).DNA, (rob(n).mutarray(5)) / SimOpts.MutCurrMult, x)
  End If
'the rest I am not telling yet... and num wrote a new mutation system anyway...
End Sub
--- End quote ---


--- Quote ---Private Function newvars(n As Integer) As Integer
  Dim a As Integer, t As Integer
  newvars = 0
  If Random(1, Int(rob(n).mutarray(11) / SimOpts.MutCurrMult)) = 1 Then
    newvars = newvars + 1
    Dim uv(1000) As Boolean
    For t = 1 To rob(n).maxusedvars
      If rob(t).usedvars(t) > 0 Then uv(rob(t).usedvars(t)) = True
    Next t
    a = 1
    While uv(a)
      a = Random(1, rob(n).maxusedvars)
      a = rob(n).usedvars(a) + Random(-10, 10)
     If a > 1000 Then a = 1000
      If a < 1 Then a = 1
    Wend
    rob(n).maxusedvars = rob(n).maxusedvars + 1
    rob(n).usedvars(rob(n).maxusedvars) = a
  End If
End Function
--- End quote ---


--- Quote ---'function is called or near updatepos()
  While t < rp
    If rep(t) > 0 Then
     Dim tmpmem As Long
      tmpmem = CLng(rob(rep(t)).mem(repro)) + CLng(rob(rep(t)).mem(mrepro))
      If tmpmem > 32000 Then tmpmem = 32000
      Reproduce rep(t), CInt(tmpmem)      rob(rep(t)).mem(repro) = 0
      rob(rep(t)).mem(mrepro) = 0
--- End quote ---


--- Quote ---
thats all for now
--- End quote ---

spork22:
Maybe the robots are evolving to eat our computers!  :O
SCARY!!  :(
Heh, just kidding.

spike43884:

--- Quote from: spork22 on June 02, 2014, 12:27:57 AM ---Maybe the robots are evolving to eat our computers!  :O
SCARY!!  :(
Heh, just kidding.

--- End quote ---
hmm, you gave me a idea spork...
Using comunication on bots to send them into different positions via ties when the HEAD eats a certain bot...WE COULD MAKE A BOT ANIME!

Navigation

[0] Message Index

[*] Previous page

Go to full version