Code center > Bug reports

Unassigned variable when using InstaWin

<< < (3/5) > >>

Griz:

--- Quote ---
--- Quote --- re: League errors in 2.4

ver 2.4.A
trying to load F1 League ...
I get error 9  Subscript out of range

debug takes me to the line in bold in:

Public Function DnaLen(DNA() As block) As Integer
  DnaLen = 1
  While Not (DNA(DnaLen).tipo = 10 And DNA(DnaLen).value = 1)
   DnaLen = DnaLen + 1
  Wend
End Function

where DnaLen = 20
DNA(DnaLen).tipo = <Subscript out of range>
DNA(DnaLen).value =  <Subscript out of range>
--- End quote ---
That's odd.  The code is trying to find the end of the DNA.  ALL DNA, as far as I remember, must end with tipo = 10 and value = 1 (the 'end')
--- End quote ---
looks like ...
and this was an established F1 league ...
obviously one that had been run before ...
not one I made up with my own bots.

will try it again trying to load F2 or make a new league ...
see if the numbers are the same.
what is the significance of DnaLen = 20?

oh well ...
onward

oh yeah ... a question:

did number of rounds ever work?
as I recall, they just keep going on up to 10.
and what is that sampling rate = 10 do/not-do?

Numsgil:
In order to win a contest, a bot must win Sqr(# rounds) + (rounds / 2)
So a 4-1 record won't win, but a 5-0 one will.

This was chosen way before I joined as being a statistically significant way to judge that one bot is better than another.

DnaLen of 20 is usually a veggy if I remember correctly.

PurpleYouko:
What the heck is the league function doing looking at DNA length??  :blink:

Numsgil:
I don't remember to be honest.

EricL:
The function that loads the robots (RobScriptLoad) calls DnaLen to set the length in the rob array when the league table is loaded/created.

I think the bug has to do with reuse of rob array elements.  Working on it...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version