Author Topic: Slow sexrepro  (Read 996 times)

Offline MysticalDumpling

  • Bot Destroyer
  • ***
  • Posts: 205
  • Kurwa chuj!
    • View Profile
Slow sexrepro
« on: February 25, 2014, 02:49:15 PM »
Heh. I like IM...

Maybe put in some LoveBots and rape/crash/murder some sims.
« Last Edit: February 25, 2014, 04:20:28 PM by Botsareus »
To być albo nie być, oto jest ze pytanie

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Re: Breaking news: Internet Mode horrible, non-functional
« Reply #1 on: February 25, 2014, 03:13:00 PM »
Dumpling, please do put some love bots, I want to figure out if it is a real crash or not!

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Re: Breaking news: Internet Mode horrible, non-functional
« Reply #2 on: February 25, 2014, 03:22:07 PM »
Never mind, sex repro is SLOW! 32 seconds restriction is being reached, that is every time love reproduces it eats 32 seconds. I had to find a balance bw proper sex repro and speed. :/
« Last Edit: February 25, 2014, 03:24:41 PM by Botsareus »

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Re: Breaking news: Internet Mode horrible, non-functional
« Reply #3 on: February 25, 2014, 03:57:59 PM »
32 seconds, not a infinite loop?
Oh my god, who the hell cares.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Re: Breaking news: Internet Mode horrible, non-functional
« Reply #4 on: February 25, 2014, 04:02:31 PM »
I am working on it right now, it is just bloody slow, and the 32 second restriction is not helping much.


Code: [Select]
'si = start index, ei = end index, iinc = layer
Private Sub FindLongestSequences(ByRef rob1() As block2, ByRef rob2() As block2, si1 As Integer, ei1 As Integer, si2 As Integer, ei2 As Integer, ByVal timee As Long)
'Step1 What index range is smaller?
Dim searchlen As Integer
searchlen = ei1 - si1
If ei2 - si2 < searchlen Then searchlen = ei2 - si2
'Step2 Recrusivelly sweep from largest to shortest searchlen until match is found
Dim mylen As Integer
For mylen = (searchlen + 1) To 1 Step -1

If Timer - 5 > timee Then Exit Sub 'safe Botsarreusnotdone changed 32 to 5, debug

    'Step2A The sweep itself
    Dim sweep1 As Integer
    Dim sweep2 As Integer
   
    For sweep1 = si1 To ei1 - (mylen - 1)
        For sweep2 = si2 To ei2 - (mylen - 1)
       
            'the match algo
            Dim lenloop As Integer
            Dim allmatch As Boolean 'are all values the same for this sweep?
            allmatch = True
            For lenloop = 0 To mylen - 1
                If rob1(lenloop + sweep1).tipo <> rob2(lenloop + sweep2).tipo Or rob1(lenloop + sweep1).value <> rob2(lenloop + sweep2).value Then
                    allmatch = False
                    Exit For
                End If
            Next
            If allmatch Then
            'match is found, goto step3
                iinc = iinc + 1
                For lenloop = 0 To mylen - 1
                    rob1(lenloop + sweep1).match = iinc
                    rob2(lenloop + sweep2).match = iinc
                Next
                GoTo step3
            End If
        Next
    Next
Next
Exit Sub
step3:
'find lefthand subsequance
If sweep1 > si1 And sweep2 > si2 Then FindLongestSequences rob1, rob2, si1, sweep1 - 1, si2, sweep2 - 1, timee
'find righthand subsequance
If sweep1 + (mylen - 1) < ei1 And sweep2 + (mylen - 1) < ei2 Then FindLongestSequences rob1, rob2, sweep1 + mylen, ei1, sweep2 + mylen, ei2, timee
End Sub

Code: [Select]
      'Step2 Find longest sequance
      iinc = 0
      FindLongestSequences dna1, dna2, 0, UBound(dna1), 0, UBound(dna2), Timer
      'If robot is too unsimiler then do not reproduce and block sex reproduction for 16 cycles
      MsgBox GeneticDistance(dna1, dna2)
      If GeneticDistance(dna1, dna2) > 0.6 Then
        rob(female).fertilized = -26
        Exit Function
      End If
      'Step3 do crossover and optionaly save to file
   
      Dim Outdna() As block
      ReDim Outdna(0)
      crossover dna1, dna2, Outdna

The crossover itself is fine, it is the figuring out of what to crossover a complete pain.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Re: Breaking news: Internet Mode horrible, non-functional
« Reply #5 on: February 25, 2014, 04:06:45 PM »
That is 32 seconds per robot...

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Slow sexrepro
« Reply #6 on: February 25, 2014, 04:23:32 PM »
I am going to try JR's:

Quote
Dim nucleic As Long
nucleic = tipo * 2^16          ' Edit: You will still probably need to cast tipo as a long for this to work
nucleic = nucleic Or value

I have tried about everything else.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Slow sexrepro
« Reply #7 on: February 25, 2014, 04:51:19 PM »
Did not help one bit :/ edit: Possible Pone here.

Offline MysticalDumpling

  • Bot Destroyer
  • ***
  • Posts: 205
  • Kurwa chuj!
    • View Profile
Re: Slow sexrepro
« Reply #8 on: February 25, 2014, 04:55:58 PM »
Shoot. I hoped that Lovebot could rape Saber, and see what horrors cometh forth! Mabye there should be a manual .sexrepro. Select 2 bots, and presto: your own unloved mutant child  :D
To być albo nie być, oto jest ze pytanie

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Slow sexrepro
« Reply #9 on: February 25, 2014, 05:51:38 PM »
I have a hack that might actually work. It does the same as the time limit although way more selective and accurate. Soon. I am calling it a day as well.

Offline MysticalDumpling

  • Bot Destroyer
  • ***
  • Posts: 205
  • Kurwa chuj!
    • View Profile
Re: Slow sexrepro
« Reply #10 on: February 25, 2014, 06:19:02 PM »
Yays. Hopefully it will work

I really want to make some hybrid mutants...
To być albo nie być, oto jest ze pytanie

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Slow sexrepro
« Reply #11 on: March 01, 2014, 04:51:18 PM »
[Bump]

It is somewhat better, still parsing wrong in places. This is turning out to be a bigger project then I thought. Stay tuned.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Slow sexrepro
« Reply #12 on: March 05, 2014, 10:58:05 AM »
Posted in announcements...