Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

lol dumb question but why dosent this work

drowjamdrowjam Member Posts: 2
[code]
Public Sub Set_Best()
Dim B As Gene = Pop(0)
For lp As Integer = 1 To Pop.GetUpperBound(0)
If B.Fit < Pop(lp).Fit Then
B = Pop(lp)
B.Fit = Pop(lp).Fit
End If

Next
""""""""""""The problem is below best.fit keeps going down how is that possible when this is the only place in the code i use it. btw i know i shouldnt use letters it was just a quick throw together so dont be to harsh on me.
If Best.Fit < B.Fit Then
Best = B
Best.Fit = B.Fit
End If

End Sub
[/code]
Sign In or Register to comment.