Darwinbots Forum
General => Off Topic => Topic started by: Panda 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.
-
Sounds good; can't wait!
-
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
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?
-
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.
-
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:
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
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