Code center > Bug reports
Unassigned variable when using InstaWin
EricL:
In answer to Griz's specific question about running leagues, well, to be honest, I'm not really sure. I barely understand what a league is! I'm still a real Newbie, one who can code (can you say 'dangerous'?) but still really quite the DB newbie.
What I can do is load a sim with a couple of bots and check the F1 checkbox on the 'Restart and League' page and I get the Contest Results dialog with dynamic population counters. Very useful that, league or no league. With my little crahs fix, I can press the Istawin button and not crash. It seems to play a number of rounds though there are still some quirks. Sometimes Instawin kills the loosing bots but doesn't start another round for example. But in particular, I have not played around with (nor do I fully understand yet) the other setttings on the page, including the Challenge league stuff. Will do tomorrow.
Griz:
ah.
yeah ... that's not the same as loading in a league ...
that's where I get my crash.
will have to try it like you were ... yes that's useful too.
play with it in version 2.37.6 ... as everything works there. I think.
well, I seem to have problems limiting the number of rounds ...
I figured best of 3 was good enough but it always seemed to keep
going longer than that.
I think someone was going to do a page on the wiki on leagues ...
as I'm still not sure how it's supposed to work.
seems you do have to have the league tables in place.
I don't think they come with the later versions ...
you may have to go back to ver 2.34 or something to get them.
maybe a 'search' here for leagues might turn up a message or two
to get you started. seems I asked when I was starting ...
and now it's been so long I don't recall how to do them anymore. ;)
I ended up making my own leagues ... with just 3 or 4 bots ...
never did play with F1 ... other than just to see if it worked.
that InstaWin fix is good ...
I had that crash too ... probably while doing the same thing as you ...
and with bots that were simply mutations or bots with only slightly
different values in their dna ... they tended to be evenly matched ...
and if left to the contest ... never would select a winner.
so what I did was manually select a winner after a given number of cycles.
it would be nice to have that option work ... stopping the contest
after a given number of cycles.
try loading F1 league in version 2.4.A ...
the error I got often was some path error.
I never did do it via VB and try to debug.
time! I need a 36 hour day. ;)
let me know if you discover anything more.
Griz:
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>
so ... ?????????????????
just running under F1 conditions ...
the contest mode works ...
and clicking on InstaWin ...
I get Run-time error '91':
Object variable or With block variable not set.
commenting out 't = nd.robn then takes care of this ...
as Eric1 said.
also encountered the .mem(837) = .Paracount overflow
and fixed that wih his patch as well.
thanks Eric!
so this is great, as I use this much as eric does ...
to evaluate a few bots with minor differences.
also ... keeping mutations enabled ...
and saving the dna of successful winners ...
one can so a bit of 'evolving' here as well.
it would be nice to be able to save the robots
at the end of each round and have a way to look
at them to find such mutants.
perhaps I can work the Invested Energy King bot thing
into this, using # of offspring along with # of mutations
as the criteria.
we will see
Griz:
Eric ...
in case you hadn't noticed:
in ver 2.4.A ...
the error.sim save is named differently than in 2.37.6
it is not 'on error go to fine' as it is there.
in:
~~~
' main procedure. Oh yes!
Private Sub main()
Dim clocks As Long
clocks = GetTickCount
Do
If Active Then
If MDIForm1.ignoreerror = True Then
On Error Resume Next
Else
'On Error GoTo SaveError '<uncomment this line for the 'compiled' version>
End If
~~~
then it will save as error.sim running compiled.
commented out in the VB ... it won't and you can Debug.
hmmmm ...
wondering if we could set this up to be 'toggled' from within the program
so I wouldn't keep forgetting to uncomment it for the compiled version.
Numsgil:
--- 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')
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version