Author Topic: Chloroplasts  (Read 24319 times)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #60 on: August 14, 2013, 01:24:30 PM »
So which part of the code do I modify further, then?

One final problem that I see is that if all robots use chloroplasts then they're all going to get energy, right? Or have I missed something.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #61 on: August 14, 2013, 01:29:01 PM »
You will need to change the reproduction codes to split chloroplasts the same as they do energy and body

You will need to modify ManageChlr function to charge energy for adding chloroplasts

Quote
One final problem that I see is that if all robots use chloroplasts then they're all going to get energy, right? Or have I missed something.

Only if there is low population density

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #62 on: August 14, 2013, 01:31:31 PM »
Sorry, I mean, do I use the trunk again? *doesn't often use SVN*

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Chloroplasts
« Reply #63 on: August 14, 2013, 01:31:48 PM »
Can I just code this stuff in in peace plz?

With great power comes great responsibility.  It's important to have a vision of what you want the program to become, but at the same time it serves no one, least of all yourself, if you're unwilling to accept or consider constructive criticism.

I'd say that my primary concerns are:
1.  Integrate smoothly and cleanly with the existing infrastructure, so to an end user's perspective there's no seams between new features and old features.  The program is pretty hard to grok as it is.  We need to follow the principle of least surprise.

2.  As best as possible, let old DNA files produce viable bots.  We've had some changes in the past that broke all previous bots, and BOY was that a snafu.

3.  Don't break or eliminate existing features without carefully considering the implication.  Especially around veggy feeding there are dozens of different options in the UI to tweak the settings.  At the very least we should have a good idea of how they interact with new features.

4.  Keep the changes as small and atomic as possible, to keep the source code in a clean state.  Massive systemic changes are dangerous in such a fragile code base.  Trying to do even 3 or 4 things simultaneously is a recipe for heartache.

...

Oh, another part of the code that will need changing: -6 and -1 shots steal a certain amount of nrg from the body of the bots they're feeding on.  You'll probably want to consider chloroplasts in this as well.

Also, in cases where you need to assign arbitrary constants (such as the nrg cost of building a chloroplast, etc.), you should expose it through the UI.  There's a separate UI form for costs and constants, so I don't think it'll cause problems with the widget limit.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #64 on: August 14, 2013, 01:37:43 PM »
hmmm....

Just thought of something,

What we will do with existing plants such as Alga_Minimalis that has not chloroplast code in it?



Yes Panda, as soon as I am done, please use the trunk again.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #65 on: August 14, 2013, 01:50:14 PM »
A new version can be uploaded with the new version?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #66 on: August 14, 2013, 01:51:12 PM »
Good enough, when I give you the project back, figure out the new code.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #67 on: August 14, 2013, 02:08:28 PM »
Panda,

When we select a robot to repopulate, we need to ask the user if he wants to add a new chloroplast gene (optionally) to make old plants work correctly. What I mean is, you will need to figure out what that code should be.



We will need a new graph that shows total chloroplasts over all inserted species



We will need to repleace the UI element on the bottom of the screen.

It currently is counting total robots, total vegs, and total objects

We need the one that say total vegs be replaced with
Code: [Select]
Allchlr / 16000


You will need to move AllChlr to global because the Repopulate function will need it as well.

The Repopulate function prevents 'repopulating robots' from repopulating further when a condition is met

Code: [Select]
'attempt to stop veg overpopulation but will it work?
  If rob(n).Veg = True And (totvegsDisplayed > SimOpts.MaxPopulation Or totvegsDisplayed < 0) Then GoTo getout

edit: I think we need this to get robots to start eating.



I am adding your updates to the trunk,

In the future please label any change you make with 'Name Date Details' please keep date in US style format if you can, just easier for me to read  :P
« Last Edit: August 14, 2013, 02:10:09 PM by Botsareus »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #68 on: August 14, 2013, 02:19:07 PM »
Quote
Panda,

When we select a robot to repopulate, we need to ask the user if he wants to add a new chloroplast gene (optionally) to make old plants work correctly. What I mean is, you will need to figure out what that code should be.

What if they already have a chloroplast gene, already? I think it would be best just to warn the user that the system has changed and that they will need to use chloroplasts for a few versions and then remove that warning?

I'm fine with the rest!

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #69 on: August 14, 2013, 02:39:51 PM »
Good enough,

I think you should put a new version of Alga_Minimals together. One reason being, I want to play with it ;)

I had trouble figuring out SVN myself. Apparently you have to completely delete your local copy to get the new changes in. Unless, of course, Numsgil has a better solution?

edit: Few, need some coffee (I meant local copy not working copy)
« Last Edit: August 14, 2013, 02:41:54 PM by Botsareus »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #70 on: August 14, 2013, 02:57:05 PM »
Are we going to use .chlr to increase and decrease chloroplasts or are we going to have .mkchlr and .rmchlr?

EDIT: I will write it after we've made all the changes. It should only take a few hours to make the changes, now.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Chloroplasts
« Reply #71 on: August 14, 2013, 03:05:15 PM »
Good enough,

I think you should put a new version of Alga_Minimals together. One reason being, I want to play with it ;)

I had trouble figuring out SVN myself. Apparently you have to completely delete your local copy to get the new changes in. Unless, of course, Numsgil has a better solution?

edit: Few, need some coffee (I meant local copy not working copy)
What's the difference between local and working copy?

You should be able to update, if there are conflicts you could force update or revert+update, but you'll lose changes.

Ought to be a way to resolve conflicts or branch and merge if you got conflicting changes, but that depends on what tool you use.
Oh my god, who the hell cares.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #72 on: August 14, 2013, 03:23:35 PM »
The bot will be uploaded to the trunk installer->bots directory and to here as well and then you can do whatever you please with it. :)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Chloroplasts
« Reply #73 on: August 14, 2013, 05:15:24 PM »
I may not have made this point very well before:

Currently the system is set up to automatically give veggies body in addition to nrg.  This is necessary to prevent legacy veggies (like alga minimalis) from being unable to reproduce once their body falls too low.  Also for cases where veggies get fed based on kilobody points.

You can use that system for the new chloroplasts: instead of giving veggies body give them chloroplasts.  Then all of our old legacy veggies work basically the same as ever without any changes.  You don't have to try and automatically add in chloroplast genes or anything like that.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #74 on: August 14, 2013, 05:22:34 PM »
That is a good idea. However, alga_minimalis loses it's function as a robot, really. It's no longer a vegetable robot, it's just an empty shell that can reproduce. The feature of nrg-body is also required for the ones that evolve chloroplasts.