Author Topic: I'm back, yet again.  (Read 4587 times)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
I'm back, yet again.
« on: October 14, 2012, 12:16:24 PM »
I'm back from having a summer of destroying my liver to hopefully help with anything. I want to see if I can get the chloroplasts working again without breaking something. I don't have much time but I need all the programming experience I can get.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: I'm back, yet again.
« Reply #1 on: October 16, 2012, 02:31:42 AM »
Sounds good; can't wait!

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: I'm back, yet again.
« Reply #2 on: October 17, 2012, 05:12:47 PM »
Hey Panda, the chloroplasts code is nice, but I REALLY need help with a sexrepro fix, see this thread:

http://forum.darwinbots.com/index.php/topic,3671.0.html

Quote
I don't think the crossover code works correctly at all:
2nd page and on...

thank you for considering it,
Bots



Also I was doing some research on how to better implement chloroplast to energy, energy to chloroplast conversion, attached is what I came up with:



If you plan to do work use my updates (version 2.45.02c) on the SVN.
Just please clearly comment changes like I was doing, or else start a new branch or something.

Once again, thank you for your time.
Bots



Eh, destroying your liver? Did you have an alcohol addiction or something? Also, how is collage?
« Last Edit: October 17, 2012, 05:28:42 PM by Botsareus »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: I'm back, yet again.
« Reply #3 on: October 17, 2012, 10:17:51 PM »
I'll have a look at that whenever I can. :) Do you know exactly what's wrong yet?



Was the previous one just a linear scale or based on size or something? It's been a while since I've looked at it. I am in the process of finding my VB6. I've no idea where I've put it. When I do, I'll look at it all again. I think I need to get an SVN username and password again but I don't know.



Of course I will, don't worry. :)



No, I didn't but I was probably close enough. Drank with friends 4/7 days, really. XD University is brilliant! Tiring but brilliant.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: I'm back, yet again.
« Reply #4 on: October 20, 2012, 10:45:03 AM »
Quote
I'll have a look at that whenever I can. :) Do you know exactly what's wrong yet?

Assuming the code worked, there was no easy way to mod it so it returns genetic distance.

Unfortunately, all what the code returns is ether the whole DNA of the Papa robot or the whole DNA of the Mama robot.

Here are the bones of the fix I was thinking about, it is a pretty solid approach to solve this problem:

Code: [Select]
Private Type blockarray
  DNA() As block
End Type

Private Type block2
  tipo As Integer
  value As Integer
  match As Integer ' -1 means no match, 0 means longest match, 1 means second longest, etc.
End Type

'Before the code calls on FindLongestSequences we copy both robots DNA into block2 setting -1 for all match values.

Private Sub FindLongestSequences(ByRef rob1() As block2, ByRef rob2() As block2)
'recrusive code to figure out longest sequences
'The result is passed by ByRef to do work on it such as GeneticDistance or Crossover
End Sub

Private Function GeneticDistance(ByRef rob1() As block2, ByRef rob2() As block2) As Double
'this code returns the ratio of parts that have -1 to total dna (both robots)
'vb6 wants me to pass by ByRef here, idk why
End Function

Private Function Crossover(ByRef rob1() As block2, ByRef rob2() As block2) As blockarray
'this code will perform the actual cross over and return as a blockarray
'   there could be situations where on one side two consecutive array elements will have different numbers greater then -1 for the match value
'   this simply means that DNA was deleted on the other side, and, you can choose whether to apply this DNA or not in your crossover
'   other crossovers are more straight forward
'vb6 wants me to pass by ByRef here, idk why
End Function



Quote
No, I didn't but I was probably close enough. Drank with friends 4/7 days, really. XD University is brilliant! Tiring but brilliant.

I am glad u ok
« Last Edit: October 20, 2012, 10:56:26 AM by Botsareus »