Author Topic: Chloroplasts  (Read 23867 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Chloroplasts
« Reply #75 on: August 14, 2013, 05:37:21 PM »
That's pretty much what it is right now anyway.  I'm mostly saying we should do it like this to provide a bridge transparently for legacy veggies while still allowing new robots that are more sophisticated.  There are other ways to provide that sort of bridge, but this is probably the least invasive.

The slider is set at a simulation level right now.  So for evo sims you might start the sim with the slider set relatively high, and then slowly wean your evolving bots down to a purely nrg based diet.  That would work similarly with chloroplasts.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #76 on: August 15, 2013, 06:25:29 AM »
Are you finished making your changes? I couldn't tell if you were.

EDIT:

Are there any other changes that you wish me to make?

At any point, if I see places where the code can be made more efficient(like removing duplicate if statements between methods), should I?]

Oh and permanent waste is given to children. Won't that eventually build up?

Wouldn't it have been easier to update all of the bots memory counts separately to everything else. They all seem to be updated much more than once all the way through it.
« Last Edit: August 15, 2013, 06:08:19 PM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Chloroplasts
« Reply #77 on: August 15, 2013, 06:09:14 PM »
Oh and permanent waste is given to children. Won't that eventually build up?

It gets split between mother/daughter, yeah.  But it gets diluted every time a bot splits, since both halves get only half the amount.  The idea is that a reproductive strain has to reproduce often enough to keep its values at a manageable level.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #78 on: August 15, 2013, 06:11:55 PM »
Oh and permanent waste is given to children. Won't that eventually build up?

It gets split between mother/daughter, yeah.  But it gets diluted every time a bot splits, since both halves get only half the amount.  The idea is that a reproductive strain has to reproduce often enough to keep its values at a manageable level.

But the speed at which they have to reproduce would have to continue to increase, wouldn't it?



EDIT: I guess a lot of the issues of inefficient code are going to be faced in DB3? It is a large task to change anything in DB2 because of the number of different areas you have to change, with the same code, just to change one little bit of the code.
« Last Edit: August 15, 2013, 06:23:29 PM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Chloroplasts
« Reply #79 on: August 15, 2013, 08:00:34 PM »
Quote
But the speed at which they have to reproduce would have to continue to increase, wouldn't it?

Assuming it builds up at a constant rate, they can also reproduce at a constant rate and reach a long term steady state level.  Like if it takes 10K cycles to go from 100 to 200 waste, and then it reproduces 50/50, it has another 10K cycles before it has to reproduce again.  And on like that.

EDIT: I guess a lot of the issues of inefficient code are going to be faced in DB3? It is a large task to change anything in DB2 because of the number of different areas you have to change, with the same code, just to change one little bit of the code.

To a certain extent.  But it's also going to be a lot more code.  I think I already have approximately as much code as DB2, and I don't have any of the UI or gameplay code really going yet.  But it's more strictly architected and tested, which should mean you can change one system without even knowing how the others work.

My experiences in the code base so far have been positive, at least.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #80 on: August 16, 2013, 05:32:11 AM »
Botsareus? You know the "light available"? Shouldn't that be the corrected area, because, the more bot area there is, the less light available for them? It currently increases when there are more bots.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #81 on: August 16, 2013, 02:59:54 PM »
I thought it was:

1 - total robot area /  screen area


So like if robot area is 1000 units and screen area is 1000 units then ...

eh, I see your point

Yes you right "light available" should be corrected area, that day was intense I probably fuged it up. :P

Move stuff out of global and move the proper variable to global.

I'll review stuff this Sunday.

edit:

I need to be a little more clear:

sudo:

That light sysvar should be = ( 1 - robot.area / screen.area ) * 32000

so, at max density it will be zero and at little density it will be close to 32000



Hey btw Panda, you might want to consider adding in a way to share chloroplasts trough ties. (Now that I actually understand your approach that sounds like a good idea)

edit: Also I think we need to add "addchlr" ( or is it mkchlr as in mk47) , "rmchlr" and "chlr" as separate variables

I think "chlr" should be a read only variable

we should charge for addchlr (or is it mkchlr)

we should not give a robot free energy for rmchlr in my opinion.



Quote
Wouldn't it have been easier to update all of the bots memory counts separately to everything else. They all seem to be updated much more than once all the way through it.

That is a lot of recoding, and there are later memory depending on earlier memory. But, what specifically did you have in mind?



Numsgil still wants some kind of automated system to help old plants transition into the new system.

Panda, Put together an Alga minimalis that uses the new feeding methods (I still don't know if we are going to use AddChlr or Chlr so I don't have a clue how this robot will look like)

I am seriously considering having a checkbox something like "Add a chloroplast gene" in the settings that automatically inserts the gene into the robot. It must be simple, cost effective, and normalize at 16K Chloroplasts.

edit: I see a few ways of doing this, I can take this part over when it is time



Not so good news:

I really wish I can do more then just give instructions  :banghead:,
But, If that was the case I would have start digging into DB3 and trying to figure it out :)

Good news: I am getting an UPS for my laptop this weekend.
« Last Edit: August 18, 2013, 09:00:17 AM by Botsareus »

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Chloroplasts
« Reply #82 on: August 16, 2013, 04:09:20 PM »
Why an UPS for your laptop, dead battery?
Oh my god, who the hell cares.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #83 on: August 16, 2013, 07:33:39 PM »
Right, I'm probably dropping off the radar this weekend. I can't really submit my changes as they're mid change. Do you plan on adding anything soon?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #84 on: August 18, 2013, 08:56:33 AM »
Quote
Why an UPS for your laptop, dead battery?

People strongly recommend not to use your battery when running a laptop 247, something to do with it unchanging and then charging again. Don't know to what extent this is true for a vaio laptop from 5 years ago.



Quote
Right, I'm probably dropping off the radar this weekend. I can't really submit my changes as they're mid change. Do you plan on adding anything soon?

Few, Panda, that is a good thing because I am kinda overwhelmed with this project right now, I keep making stupid mistakes in my descriptions.

Leave the lighaval code the way it is, I might have to use it for something else later:

Code: [Select]
 
  LightAval = TotalRobotArea / ScreenArea 'Panda 8/14/2013 Figure out AreaInverted a.k.a. available light
 
  AreaCorrection = (1 - LightAval) ^ 2 * 4
 

When you actually tell the robot how much light it has available then we invert it:

Code: [Select]
rob(n).mem(light) = 32000 - LightAval * 32000
sorry for the confusion :)

I kinda have to wait for you to submit before we can test it.



Quote
Oh, we need to add chloroplasts also to 'snapshot' and my three 'custom graphs' for snapshot I already created space for it , it should be the last cstr(0), not sure about custom graphs though.

This is also not a very important change on this stage, I'll take a look at this before we go live with the project.



Also, I would like to have your ideas on this little subroutine:
Code: [Select]
Public Sub feedveg2(t As Integer) 'gives veg an additional meal based on waste
  With rob(t)
  If .nrg + (.Waste / 2) < 32000 Then
    .nrg = .nrg + (.Waste / 2)
    '.Waste = .Waste - (.Waste / 2)
    .Waste = 0
  End If
  End With
End Sub
« Last Edit: August 18, 2013, 09:19:45 AM by Botsareus »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #85 on: August 31, 2013, 04:04:38 PM »
Let's test it! Let's test it!

attached alga and Animal_Minimalis please copy to your 'Robots' folder

I am running two experiments:

Robsbecomevegs target goal is for robots to become plants

Vegsbecomerobts target goal is for plants to become robots

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #86 on: August 31, 2013, 04:31:26 PM »
noticing something already:

I am not sure if robots mutate the new commands, we need a robot we a bunch of zeros and test copyerror and insertion.

Here is something else I am noticing, it is rather disturbing:
« Last Edit: August 31, 2013, 04:41:40 PM by Botsareus »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #87 on: August 31, 2013, 05:01:48 PM »
I am thinking of this fix, what do you think panda?

Code: [Select]
Public Function FindRadius(ByVal bodypoints As Single, ByVal chloroplasts As Single) As Single
  If bodypoints < 1 Then bodypoints = 1
  If chloroplasts > bodypoints Then bodypoints = chloroplasts 'Botsareus 8/31/2013 prevent ultra small robots
  If SimOpts.FixedBotRadii Then
    FindRadius = half
  Else
    ' EricL 10/20/2007 Added log(bodypoints) to increase the size variation in bots.
    FindRadius = (Log(bodypoints) * bodypoints * CubicTwipPerBody * 3 * 0.25 / PI) ^ (1 / 3)
    If FindRadius < 1 Then FindRadius = 1
  End If
End Function

we need a way to prevent these ultra small robots, the only other way I think is by force killing them...

edit: hmmm... it looks like I solved the problem just by adding costs
« Last Edit: August 31, 2013, 06:47:27 PM by Botsareus »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #88 on: September 02, 2013, 05:59:15 PM »
Yeah, it's either costs that you have to increase or decrease the amount of energy that they get from the simulation.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #89 on: September 02, 2013, 06:05:17 PM »
My biggest problem was getting a predator prey system going. Usually I would get a good 5 cycles and then one would die off. I'm not sure how to solve this, either. I'll find an example. Maybe I need to write a better veggie bot.