Darwinbots Forum

Code center => Suggestions => Topic started by: Panda on October 14, 2010, 02:53:49 PM

Title: Chloroplasts
Post by: Panda on October 14, 2010, 02:53:49 PM
This is less of a suggestion, and more of, if you guys are okay with it, then I will program it all, as I can't wait until DB3 for the chloroplasts, and I can see that the current system is "outdated". :) Here's the ideas:

Chloroplasts - Idea 1
    Very low energy per "chloroplast" per cycle/custom energy per chloroplast
    Bot radius taken into account - larger radius means more energy
    Stop movement - fixes bot
    Stop firepower - except poison(maybe) and sperm
    Reproduction - child born with no chloroplasts
   
Chloroplasts - Idea 2
    Very low energy per "chloroplast" per cycle/custom energy per chloroplast
    Bot radius taken into account - larger radius means more energy
    Costs a lot to move and rotate - cost increases with each chloroplast
    Cost more to fire - cost increase with each chloroplast
    Reproductions splits chloroplasts like nrg and body
     
".setveg"
  A value in setveg makes the bot act as if it were designated an autotroph at startup
  Uses current Energy system - customizable nrg per cycle
  Fixes bot permenantly. Veg can no longer move
  Disables shots except sperm and poison
  Child keeps same value of ".setveg" as parent
  .setveg cannot be set by info shots.
  Once set, cannot be unset.

Also, give me your ideas. :)
Title: Re: Chloroplasts
Post by: Ammeh on October 15, 2010, 07:34:51 AM
anybody?
Title: Re: Chloroplasts
Post by: Testlund on October 15, 2010, 11:49:34 AM
I think .setveg sounds best to me, except for bot being permanently fixed. It should be alowed to floot around.
Title: Re: Chloroplasts
Post by: ikke on October 15, 2010, 12:13:30 PM
setveg in combination with energy related to body. Allow mutation on setveg.
Title: Re: Chloroplasts
Post by: Ammeh on October 16, 2010, 04:47:07 AM
I think .setveg sounds best to me, except for bot being permanently fixed. It should be alowed to floot around.

By float around, do you mean "not fixed, but not able to drive itself either", or that movement should be like a normal bot?
Title: Re: Chloroplasts
Post by: Testlund on October 18, 2010, 07:02:33 AM
Yes, I prefer no superimposed ristrictions on veggies, except for most of the shots. They should only be allowed to use poison and waste shots.

I like to set the energy intake such that the bot can't afford to waste energy on voluntary movement, to simulate plant metabolism.

I wonder why plants never evolved legs, teeth or eyes.  :P
Title: Re: Chloroplasts
Post by: ikke on October 18, 2010, 07:49:26 AM
I like to set the energy intake such that the bot can't afford to waste energy on voluntary movement, to simulate plant metabolism.

Relating energy intake to body will do this as good as it gets. Within the current db framework veggies get energy for free. This is what gives them the advantage
I wonder why plants never evolved legs, teeth or eyes.

Because most meat eating plants are smart enough to lure their prey to them and enter their stomachs volontarily :rolleyes:
I would seriously consider plants capable of doing almost anything animals can. Virtually anything that can be considered for disabling for plants in DB has real life examples. Plants probably have just one handicap: large surface to body ratios to maximise harvesting sunlight and/or nutrients.
Title: Re: Chloroplasts
Post by: Shasta on October 18, 2010, 12:14:45 PM
I'm not a huge fan of changing how the veggies work, except maybe how they are given energy. Also, setveg seems a bit odd to me; a one time toggle that does the same thing as marking them a veggie. May as well just mark them a veggie.
Title: Re: Chloroplasts
Post by: Panda on October 18, 2010, 12:26:17 PM
However, it would allow a bot to evolve to set themselves as veggie, but I can see problems with that method, just ask Sammeh about it, that one was her idea. :L
Title: Re: Chloroplasts
Post by: Numsgil on October 18, 2010, 02:37:05 PM
I would:


From just those two, that should (hopefully) provide most of the expected behavior.  Shooting will be weaker since they don't have much body.  Movement will be expensive since they're so massive.  And being so huge means they'll have a hard time fending off swarms of animal bots.

Or that's the theory.  It's such an emergent thing that it would be hard to figure out purely on paper.  But that's what I'd do.  If nothing else just tweak the values for mass and volume until the veggies can't not behave like veggies.  But IMO that ruleset meshes best with the current system, what I want to do with DB3, and real life.
Title: Re: Chloroplasts
Post by: Shasta on October 18, 2010, 06:17:54 PM
Yeah, that seems reasonable. However, they would die really quickly from body shots also, especially before they have time to build up shell. Maybe make body shots destroy chloroplasts also?
Title: Re: Chloroplasts
Post by: Ammeh on October 19, 2010, 02:20:02 AM
sounds good to me =] anyone not want that?
Title: Re: Chloroplasts
Post by: Testlund on October 19, 2010, 11:26:17 AM
Yeah, I agree with Nums. Sounds like the best idea so far. ...and body shots destroying chloroplasts just makes sense too.
Title: Re: Chloroplasts
Post by: Testlund on October 19, 2010, 11:32:47 AM
While you're at it maybe you can change DB so heterotrophs can't give more than 50% of their body to offspring either. As it is now they tend to just cheat death by transferring almost all their body to their offspring, if you have ageing costs on.
Title: Re: Chloroplasts
Post by: Numsgil on October 19, 2010, 01:45:47 PM
While you're at it maybe you can change DB so heterotrophs can't give more than 50% of their body to offspring either. As it is now they tend to just cheat death by transferring almost all their body to their offspring, if you have ageing costs on.

I think that was the idea of aging costs, actually.  But to get more of what I think you're after, maybe we can revamp the idea of "waste" a bit, or invent a separate substance with a similar idea:

Make it massless and volumeless, and have it accumulate at a constant rate every cycle for every bot.  (Or maybe proportional to the body of a bot). When a bot divides, it also divides the "waste".  Then have a cost per "waste" that the user can set.  You basically get the icy hand of death constantly chasing a strain as it divides.  There would still be ways to cheat this system, but they're less straightforward than simply reproducing.
Title: Re: Chloroplasts
Post by: Panda on October 19, 2010, 06:59:42 PM
So, I can have a go at putting this into place. I completely agree with what Nums says about what to do, and if nobody's got any objections, then I will have a go.
Title: Re: Chloroplasts
Post by: Testlund on October 19, 2010, 07:09:30 PM
Making the waste transfer when the bot divides sounds realistic and a cost you can set to simulate the waste wearing on the bots health, though I'm not so sure about waste building up all by itself. Maybe if a percentage of the energy intake will become waste per cycle....
Title: Re: Chloroplasts
Post by: ikke on October 20, 2010, 09:33:11 AM
I don't like the whole permanent waste idea. We have ageing cost to model it in a more controlled way. I don't recognise testlunds observation, but it cam be overcome with increased cost of reproduction (#turns proportional to ofspring body size?)
Title: Re: Chloroplasts
Post by: Panda on October 20, 2010, 11:54:32 AM
It would have to be a constant rate to the bot, of the total energy (energy and body?) Or bots could cheat it and just not have body, because, then being small has too many advantages, like it does at the moment.
Title: Re: Chloroplasts
Post by: Panda on October 20, 2010, 11:57:11 AM
And, maybe, if the bots have more body, more waste is needed to effect them, as it is more evenly distributed in the bot.
Title: Re: Chloroplasts
Post by: Testlund on October 20, 2010, 02:31:34 PM
I don't recognise testlunds observation...

I've seen many examples of bots producing a large offspring leaving a tiny parent. Thats practically just restarting the ageing cost from zero. The child has full size from the beginning and don't need to do anything.

Quote
...but it cam be overcome with increased cost of reproduction (#turns proportional to ofspring body size?)

Quote
It would have to be a constant rate to the bot, of the total energy (energy and body?) Or bots could cheat it and just not have body, because, then being small has too many advantages, like it does at the moment.

Yes! Exellent! Better than ageing cost.
Title: Re: Chloroplasts
Post by: Panda on October 20, 2010, 03:01:22 PM
I've always avoided ageing costs, I haven't really liked them. :/
Title: Re: Chloroplasts
Post by: Numsgil on October 20, 2010, 06:36:09 PM
They're definitely an artificial construct.  But they're a useful cattle-prod type tool if you want to encourage a particular type of evolution.  It's definitely a circular saw when you want a scalpel, though.
Title: Re: Chloroplasts
Post by: Testlund on October 21, 2010, 09:32:01 AM
It reminds me of my overbreeding catfishes. I've had problems with them becoming too many upsetting the balance in my aquarium. A few days ago I discovered that the PH level had gone up a bit too much, so I decided to lower it with aquacid. I'm afraid I used a little too much. The old fishes that I've had for many years started dying off. There skin had become irritated causing fungus and bacteria growth, which typically only attack older and weeker fishes.
That was my artificially introduced ageing cost.  :P
Title: Re: Chloroplasts
Post by: Panda on October 21, 2010, 12:18:40 PM
Do you want me to try and code this in or not?
Title: Re: Chloroplasts
Post by: Numsgil on October 21, 2010, 12:39:04 PM
Do you want me to try and code this in or not?

I do :)
Title: Re: Chloroplasts
Post by: Panda on October 21, 2010, 01:50:45 PM
Couldn't a veggie get body too, and then have powerful shots?
Title: Re: Chloroplasts
Post by: Numsgil on October 21, 2010, 04:14:50 PM
Yeah, it could, but it wouldn't be a very effective hunter since it can't move very agile-y.  Likewise, assuming the physics are reasonable (not sure where they were left off in this regard), a very large veggy would spend a lot of energy if it wanted to turn to face an attacker to fire back.  Though combined with aimshoot that might be a bit of a problem, since it wouldn't have to turn.  But even still, I think it should be balanced-ish.  Would be good to release a 'beta' version, and have people write bots for it, and see if it's in need of further balancing (ie: if veggies are overpowered).  Maybe have shots disperse more the larger a bot gets, or something.

I want to avoid arbitrary rules that prevent you from doing two things (animal vs. veggy).  It should be more that you can do two things, but you'll be less efficient than other bots that stick to one thing only.  Like you can be a predator that makes chloroplasts, but you burn so much energy being an animal that you're not as able to quickly reproduce as a pure plant, and you're so big as a plant that you can't effectively maneuver like a leaner pure animal could.
Title: Re: Chloroplasts
Post by: Panda on October 21, 2010, 04:30:24 PM
Yeah. What about leagues, I think we might have to change that around a little.
Title: Re: Chloroplasts
Post by: Panda on October 21, 2010, 06:48:41 PM
Got most of it done now. XD It didn't take half as long as I thought, but there are still one or two things that I have to add in, like the bot being able to know how many "chlr"s it has. And then something in the info-form telling the user how many "chlr"s the bot has. I will also need to change something on the teleporters, and mess around with the option's GUI. But the actual bots work.

At the moment a chloroplast weighs the same as body, and adds the same radius as body as well, but I am thinking about upping that, probably doubling it. The amount of "Chloroplasts needed for 1 NRG per cycle" is user changeable. It costs 10 to make a chloroplast, the same as it costs to make a body point. You get 0.05 energy back per chloroplast "removed".

"strchlr" - 316 - creates 1 chloroplast for every 10 stored in there. Max value = 100
"rmchlr" - 317 - removes 1 Chloroplast for every 10 stored in there. Max value = 100

If you want anything changing, just ask. :)
Title: Re: Chloroplasts
Post by: Shasta on October 21, 2010, 11:01:38 PM
"Chloroplasts needed for 1 NRG per cycle"
Nrg per kilo-chloroplast or something along those lines makes a bit more sense to me.
Title: Re: Chloroplasts
Post by: Panda on October 22, 2010, 02:32:29 AM
Yeah, I was thinking of a better way to put it, I'll change that now.
Title: Re: Chloroplasts
Post by: Panda on October 22, 2010, 02:41:09 AM
What about veg respawn, how can we do that?
Title: Re: Chloroplasts
Post by: ikke on October 22, 2010, 04:56:04 AM
What about veg respawn, how can we do that?
remove the veggie check option for a species and have respawn act on setveg...
Title: Re: Chloroplasts
Post by: Panda on October 22, 2010, 11:50:16 AM
We're doing chloroplasts, not ".setveg" now. :p
Title: Re: Chloroplasts
Post by: Panda on October 22, 2010, 12:13:11 PM
Now costs 100 to make a chloroplast.
Title: Re: Chloroplasts
Post by: Numsgil on October 22, 2010, 01:25:14 PM
At the moment a chloroplast weighs the same as body, and adds the same radius as body as well, but I am thinking about upping that, probably doubling it.

For them to be disadvantageous enough for 'animal' to be a viable evolutionary strategy I would start at more like 10x body in terms of mass and volume.  I think if anything we should overshoot the value and then scale it back.  Write some reasonable complex veggies and put them in league fights.  If they decimate the animal bots, scale up body and mass some more.  You could also do a bot against a veggy version of itself (where maybe 90% of excess energy is put towards chloroplasts instead of body).

For comparison to real life, plant cells are somewhere between 2 and 3 times as large as animal cells.
Title: Re: Chloroplasts
Post by: Numsgil on October 22, 2010, 01:26:28 PM
We're doing chloroplasts, not ".setveg" now. :p

You might want to take the opportunity to do a per-species respawn.  Sort of a whole other feature, though.
Title: Re: Chloroplasts
Post by: Panda on October 22, 2010, 01:31:18 PM
Committing changes I've made, I'm going away for a week.
Title: Re: Chloroplasts
Post by: Panda on October 22, 2010, 01:33:22 PM
And also, it is 1000 times heavier...
Title: Re: Chloroplasts
Post by: Ammeh on October 22, 2010, 03:37:00 PM
in theory, new veg will just evolve :P
Title: Re: Chloroplasts
Post by: Numsgil on October 22, 2010, 09:12:29 PM
And also, it is 1000 times heavier...

1000x mass and 1x volume, or 1000x mass and volume?
Title: Re: Chloroplasts
Post by: Panda on October 23, 2010, 07:05:35 AM
There is volume too? The radius increases at the same rate, for chloroplasts, as mass.
Title: Re: Chloroplasts
Post by: Numsgil on October 24, 2010, 05:15:29 AM
I think there is.  Check the calculation for bot radius.  I think it assumes a bot is a sphere, and works backwards to find the radius given the volume.
Title: Re: Chloroplasts
Post by: Panda on October 24, 2010, 07:14:45 AM
Chloroplasts have the same volume as mass, well, the same radius.
Title: Re: Chloroplasts
Post by: Numsgil on October 25, 2010, 05:38:17 PM
You should also probably retcon a way for alga minimalis to work with the new system.  Specifically, I'm thinking the veggy tick box gives bots chloroplasts instead of body, and the nrg/body slider for feeding veggies becomes nrg/chlorplasts (if/since chloroplasts represent more nrg than body does, you'll need to get the math to all make sense so you're not introducing any extra nrg into the sim than desired).  There might be some other random issues, too.  You might just do a search for everything that modifies or reads body and see if it needs to handle chloroplasts, too.
Title: Re: Chloroplasts
Post by: Panda on October 26, 2010, 06:14:18 AM
That, sort of, defeats the whole point of doing the chloroplasts, in the first place, letting them evolve really. I do like your idea of doing a per species respawn, or a per-species respawn. I would do that so that you can check whether their species should respawn, rather than a "every species should respawn" button.
Title: Re: Chloroplasts
Post by: Numsgil on October 26, 2010, 12:48:52 PM
Eh, not really.  I just mean rig up the options in the options panel to make sense with the new system.  So setting something as a veggie will give it chloroplasts instead of body when the simulation starts, but after that they can build body or chloroplasts as they want.

The options that are more difficult, like population limiting, I leave for you to figure out :)
Title: Re: Chloroplasts
Post by: Panda on October 27, 2010, 01:01:47 PM
I will figure it out! XD
Title: Re: Chloroplasts
Post by: ikke on October 28, 2010, 02:42:07 AM
I never use pop limit for my evo sims. I manage population by managing energy and (dynamic) cost. Additionally computational cost is mostly determined by my large dna bots and not default veggies.
Title: Re: Chloroplasts
Post by: Panda on October 28, 2010, 06:04:38 AM
We don't want a cap as such, we just want to stop all populations getting too high, due to excess energy. Night and day could still be used. However, if we make chloroplasts expensive and so that they give little energy, then, populations will struggle to grow higher than a certain point.!
Title: Re: Chloroplasts
Post by: Panda on November 01, 2010, 02:11:00 PM
So how exactly do you want the population to be limited? A complete physical limitation, or just a "partial" limitation?

And what about the respawn, will it happen for:
Title: Re: Chloroplasts
Post by: Panda on November 03, 2010, 04:13:21 PM
It's alright everybody, I need no help at all.  :glare:
Title: Re: Chloroplasts
Post by: Numsgil on November 03, 2010, 04:48:37 PM
I would do a respawn per species based on either individuals or total energy represented (as in, have both options).  We (well, you) can add other global population controls later, if necessary, but I don't think it will be.
Title: Re: Chloroplasts
Post by: Panda on November 03, 2010, 05:07:47 PM
:) Thanks. :)
Title: Re: Chloroplasts
Post by: Numsgil on November 03, 2010, 07:37:43 PM
That should have the benefit of replacing the 'respawn simulation when all bots die' option.
Title: Re: Chloroplasts
Post by: Panda on November 04, 2010, 01:27:36 PM
I should have made a list of what I should be doing. :/ Leaving it for almost two weeks has messed it up for me. :L
Title: Re: Chloroplasts
Post by: Panda on November 04, 2010, 01:59:58 PM
Could we do it so chloroplast degrade, very slowly... So there is some sort of upkeep cost for them.
Title: Re: Chloroplasts
Post by: Numsgil on November 04, 2010, 02:19:13 PM
Well they generate energy.  Unless you're thinking about night when there's no sun?
Title: Re: Chloroplasts
Post by: Panda on November 04, 2010, 02:33:20 PM
I have left day and night in... They didn't need much changing too.
Title: Re: Chloroplasts
Post by: Numsgil on November 04, 2010, 06:44:47 PM
I'd just point out that any upkeep costs in terms of energy are going to be redundant.  Chloroplasts give energy to a bot = positive nrg gain - upkeep cost.  So during daylight, any upkeep cost just lowers the energy a bot receives from its chloroplasts.  At night, it creates an upkeep cost, which could be interesting, in that plant bots have to learn to conserve energy at night so they don't run out.  But they have to do that pretty much anyway, and just passively existing works for that, so I'm not sure how much it adds in terms of interesting behavior.

Unless there's another specific utility I'm not seeing.
Title: Re: Chloroplasts
Post by: ikke on November 05, 2010, 05:50:10 AM
Unless there's another specific utility I'm not seeing.
I agree with everything you said but want to point out one thing for db3: object consistency and simplicity. Every substance in the bot has upkeep, chloroplast just has negative upkeep...
Title: Re: Chloroplasts
Post by: Numsgil on November 05, 2010, 12:53:02 PM
Yes, that's a good way of thinking of it.
Title: Re: Chloroplasts
Post by: Panda on November 05, 2010, 08:02:27 PM
I do like the idea of a percentage of the energy given to them taken away all of the time, at night, and it wouldn't be too difficult to include too.
Title: Re: Chloroplasts
Post by: Panda on November 05, 2010, 08:14:02 PM
It's funny watching veggies move around when they have chloroplasts. With only 235 chloroplasts, they are moving at a very low speed, loosing massive amounts of energy, and spiralling out of control, trying to go forwards. Does it take, on DB a larger amount of energy to move a heavier object.
Title: Re: Chloroplasts
Post by: Numsgil on November 07, 2010, 10:11:14 PM
It's funny watching veggies move around when they have chloroplasts. With only 235 chloroplasts, they are moving at a very low speed, loosing massive amounts of energy, and spiralling out of control, trying to go forwards.

Which veggy are you using?

Quote
Does it take, on DB a larger amount of energy to move a heavier object.

If this is a question, yes, the amount of nrg it takes to move forward increases with your mass.  If the sim has drag enabled, your volume will also slow you down.
Title: Re: Chloroplasts
Post by: Panda on November 08, 2010, 06:03:44 PM
Erm, my own written one, which was just to check out the physics, and it was a question, and thanks, that was why massive amounts of energy of theirs was disappearing to.

This comes together, to limit what veggies can do now. :)
Title: Re: Chloroplasts
Post by: Numsgil on November 08, 2010, 06:35:48 PM
Yeah, veggies should end up fairly lethargic out of necessity.
Title: Re: Chloroplasts
Post by: Botsareus on November 27, 2010, 01:25:01 PM
Panda, I have seen your changes. I have a few suggestions:


Quote
Yeah. What about leagues, I think we might have to change that around a little.

A: Please make your changes 'optional', I need my Leagues ( Formula1 mode, etc. ) to work as they did b4... (Yes, I know you will have to start all over, bc you screwed a lot of code such as the .veg, don't worry, I am starting all over for the third time already ;))

        Examples:
                Example1 : Instead of 
Quote
If rob(t).exist And Not rob(t).Veg Then
we do
Quote
If rob(t).exist And (Not rob(t).Veg or blnChloroplastMode) Then

                Example2: If blnChloroplastMode = False then the program treats commands such as "strchlr" simply as just another memory location. The idea is that since all the commands update only after the DNA  is done executing (or per chromosome in DB3) you can specify the right values for stuff like "strchlr" at the end of each chromosome if the DNA  mutated and is putting stupid values into the command.

B:  You did not clean up all the code correctly so the program will not compile.

C: One more thing: The options form is going to run out of memory after 6 more controls, I need them for my changes. We have to deside to eather move the veg controls or my controls in to a new form. thx. happy coding...

D: This is kinda off-topic but, for my work I need to run all the Formula1 league settings w/o running the actual league (that is the score keeping form, with the InstaWin buttons), we need yet another option (err... possibly a btnSetF1Settings?!) to do that.
Title: Re: Chloroplasts
Post by: Panda on November 27, 2010, 04:18:44 PM
I complied fine for me. And I am not going to work on it at the moment, because Shasta is still doing some work, can't you just use previous versions of DB for the leagues?
Title: Re: Chloroplasts
Post by: Botsareus on November 27, 2010, 06:30:52 PM
Yes, I can, but I want to update the program, and I want to publish it. What I don't want is having two separate versions of the program, one with my updates and the other with the new Chloroplasts. So what shall we do? And believe me we need the leagues running the same way they used to. However, I invasion a new league:

TheChloroplastLeague:

Uses F1 conditions w/ no vegs.
Robots may use chloroplasts and multi-bots.

 :P

But even here we run into a problem, all robots will end up using chloroplasts bc if none do everyone will die...


P.S.

Compile is not the same thing as pressing the blue run arrow... (I believe that’s called “Run”)
Title: Re: Chloroplasts
Post by: Panda on November 27, 2010, 06:38:54 PM
I know, I compiled it, to test it.
Title: Re: Chloroplasts
Post by: Botsareus on November 28, 2010, 09:22:40 AM
Hey Panda I have another idea:

We can make the Chloroplast checkbox along side the Vegetable checkbox. The idea is a user can check one of these checkboxes but not both. We add the chloroplast code and keep everything else the same way it is in 2.45. Then for the chloroplast league to give all robots a fair chance: we will keep 1/2 the vegs from the Formula1 league and feed them half the usual energy.

This is from an older version of DB just for illustrative purposes:
(http://img230.imageshack.us/img230/3144/desktopkjg.png) (http://img230.imageshack.us/i/desktopkjg.png/)

Uploaded with ImageShack.us (http://imageshack.us)

This now only leaves the re-spawn issue: do we even need it?

Numsgil/Panda/Shasta what do you think?
Title: Re: Chloroplasts
Post by: Panda on November 28, 2010, 09:41:20 AM
Yeah, it is possible, however, after I stripped it, it will have created some extra work, either you could do it, or I could do it(which might take me a little longer.
Title: Re: Chloroplasts
Post by: Botsareus on November 28, 2010, 09:45:43 AM
Sounds like a plan, I will do it.

Make sure you submitted everything into the trunk.

If possible give me the locations where all the code that effects robot behavior is, I can find it all myself but it will be easier if you tell me...
Title: Re: Chloroplasts
Post by: Panda on November 28, 2010, 04:20:11 PM
You'll still have to wait for Shasta. :p
Title: Re: Chloroplasts
Post by: Numsgil on November 29, 2010, 12:42:00 AM
I'm not super keen on adding more checkboxes...  The program is pretty obtuse to use as is.

Bots, can you think of a specific reason why you wouldn't want chloroplasts?  They would seem to be transparent to bots that don't look for it, except in cases where bots have special logic for the body size of veggies or things along those lines.
Title: Re: Chloroplasts
Post by: Shasta on November 29, 2010, 03:58:08 PM
I'm also not a big fan of having both the new chloroplasts and the old veges at the same time. Darwinbots is a complex program, and having a toggle between two different energy sources for the simulation will make it much more so. Even your picture there: "Use Chloroplasts" and "Vegetable (autotroph)" is very confusing to someone who hasn't used the program before.

I'm also not too sure on what you are talking about with the leagues. F1 has always been the "Everything goes" league. Chloroplasts make the bot huge and slow; if someone programs around that I see to reason to bar it. If I work on anything in DB2 after this set of changes is done, it will probably be to fix the tournaments and get some kind of auto-running league going on my desktop.
Title: Re: Chloroplasts
Post by: Botsareus on November 29, 2010, 04:19:42 PM
The reason I want the "veg" option still there is bc It will not work right for F1 mode. There simply won't be any way to set the alga as vegs;
Also, lets say I reprogram the alga, how then do I make findbest not search it w/o more special options?!

I already started implementation:

I decided to avoid putting a respawn per spisies. The eco-system should balance itself out without any artificial respawning.

Here we go, If I missed anything let me know.

Faze1: Intergrate the blnUseChloroplasts variable

Added blnUseChloroplasts to "Type datispecie"

  Veg As Boolean
  blnUseChloroplasts As Boolean 'Flag added by Botsareus for Pandas Chloroplast mode.
  Fixed As Boolean

Added chk to options menu

Private Sub SpecVeg_Click() 'updated by Botsareus to use new UseChloroplasts flag
  If CurrSpec > -1 Then
    TmpOpts.Specie(CurrSpec).Veg = False
    If SpecVeg.value = 1 Then
        TmpOpts.Specie(CurrSpec).Veg = True
        TmpOpts.Specie(CurrSpec).blnUseChloroplasts = False
        chkUseChloroplasts.value = 0
    End If
  End If
End Sub

Private Sub chkUseChloroplasts_Click() 'added by Botsareus to use new UseChloroplasts flag
  If CurrSpec > -1 Then
    TmpOpts.Specie(CurrSpec).blnUseChloroplasts = False
    If chkUseChloroplasts.value = 1 Then
        TmpOpts.Specie(CurrSpec).blnUseChloroplasts = True
        TmpOpts.Specie(CurrSpec).Veg = False
        SpecVeg.value = 0
    End If
  End If
End Sub

added code to SpecList_Click()

  If TmpOpts.Specie(k).blnUseChloroplasts Then 'added by Botsareus to use new UseChloroplasts flag
    chkUseChloroplasts.value = 1
  Else
    chkUseChloroplasts.value = 0
  End If

Added code to save settings

    Write #1, TmpOpts.Specie(t).Veg
    Write #1, TmpOpts.Specie(t).blnUseChloroplasts 'updated by Botsareus to use new UseChloroplasts flag
    Write #1, TmpOpts.Specie(t).Fixed

Added code to  ReadSettFromFile

    Input #1, TmpOpts.Specie(t).Veg
    Input #1, TmpOpts.Specie(t).blnUseChloroplasts
    Input #1, TmpOpts.Specie(t).Fixed

Added code to load simulation

      If Not EOF(1) Then Get #1, , SimOpts.Specie(k).Veg
      If Not EOF(1) Then Get #1, , SimOpts.Specie(k).blnUseChloroplasts
    Next k

Added code to save simulation

      Put #1, , SimOpts.Specie(k).Veg
      Put #1, , SimOpts.Specie(k).blnUseChloroplasts
    Next k

Title: Re: Chloroplasts
Post by: Shasta on November 29, 2010, 04:38:34 PM
Per-species respawn is already done and commited to SVN by Panda. (I have changed it a touch, but its pretty much the same)

The whole point of this update is that we don't have to explicitly state what is or is not a veggie. If they produce chloroplasts, they get energy. If they don't have chloroplasts, they don't get energy.

If you don't want find best to include autotrophs, just check to see if the bot has a chloroplast. It's not perfect, but it is close enough barring some kind of photoheterotroph.
Title: Re: Chloroplasts
Post by: Botsareus on November 29, 2010, 04:43:35 PM
If you don't want find best to include autotrophs, just check to see if the bot has a chloroplast. It's not perfect, but it is close enough barring some kind of photoheterotroph.

Not good enough.

Ok planB then

I'll add  "find best do not search robots if there name begins with "alga*" as one of my "optional" changes...

I spent a good 20 minutes on this thing, sucks to be me...

BTW , whats the deal with respawning, and who is going to post the reprogrammed Alga_Minimalis??? I need my alga...(not literally I am not a cow)
Title: Re: Chloroplasts
Post by: Shasta on November 29, 2010, 04:53:00 PM
Not good enough.
Why is this method not good enough? It will work for the vast majority of cases, and for when its not, throw in a check box to include bots with chloroplasts. Scanning based the robot name is very unreliable.

Quote
whats the deal with respawning
There is now a box on the speices tab that is the repopulation threshold. If that species gets below the number, more are spawned. (So 0 will disable it)

Quote
who is going to post the reprogrammed Alga_Minimalis?
I can post an example in a couple of hours, I have to run to class.
Title: Re: Chloroplasts
Post by: Botsareus on November 29, 2010, 05:02:00 PM
Quote
throw in a check box to include bots with chloroplasts.

ok nice, but lets say the robots happen to mutate and use chloroplasts so when I "find best" the general population uses them, then what? Chances are only outcasts will not use a generally excepted mutation, outcasts are not good representation of the best robot. I know, I have been running this thing close to a year now , I might even add I am as good at shvartz at this now. btw where is shvartz, have not seen him in a while. Anyway,

Quote
Scanning based the robot name is very unreliable.

Well as long as no one adds weird named robots to my sim or renames them it should work splendid. Btw I just realized I will need to scan based on robot name anyway for one of my special optional changes, so now I really want to know why it is unreliable.  :huh:

Example as part of Public Sub UpdateBots() (I'll clean it up and make it as optional as possible):

'Need to do this first as NetForces can update bots later in the loop
  For t = 1 To MaxRobs
    If rob(t).exist Then
    If rob(t).FName = "bfb.txt" Then bfbcount = bfbcount + 1 'botschange countA
    If rob(t).FName = "mfb.txt" Then mfbcount = mfbcount + 1 'botschange countB
      If (rob(t).DisableDNA = False) Then EraseSenses t
      If numTeleporters > 0 Then CheckTeleporters t
    End If
  Next t
  'botschange unstable environment
  Dim unste As Double
  If bfbcount <= 4 Then
    unste = 0
  ElseIf mfbcount <= 4 Then
    unste = 1
  Else
    unste = (bfbcount - 3) / (mfbcount - 3)
  End If
   If unste > 1 Then unste = 1
    SimOpts.PhysBrown = unste * 50
  'botschange killfat safetyflux antyflux
    For t = 1 To MaxRobs
    If rob(t).exist Then
        If rob(t).FName = "mfb.txt" Then
            If rob(t).body > 2500 Then KillRobot t
            If (mfbcount - bfbcount) > 0 Then rob(t).nrg = rob(t).nrg - AntiHandycap / (50 ^ 3 / (mfbcount - bfbcount) ^ 3) 'antyflux
        End If
        If rob(t).FName = "bfb.txt" Then 'saftyflux is here
               If (bfbcount - mfbcount) > 0 Then rob(t).nrg = rob(t).nrg - Handycap / (50 ^ 3 / (bfbcount - mfbcount) ^ 3)
        End If
       
    End If
  Next t
 If bfbcount = 0 And Not bfbT Then
  bfbT = True
  MsgBox "WON"
      DisplayActivations = False
      Form1.Active = False
      Form1.SecTimer.Enabled = False
 End If
 If mfbcount = 0 And Not mfbT Then
  mfbT = True
  MsgBox "LOST"
 End If
  'botschange killfat end

Quote
If that species gets below the number, more are spawned


But what about all the funky settings like repopulation cool down period, or vegs per repopulation event? I need them all work the same they do in say 2.44.1 when you setup F1 mode ...

Here is one: Max vegs. How do I limit the maximum number of vegs now?

P.S.

I know you guys are really not that evil, but please do not change the source code specifically to make my changes impossible to implement.  :P
Thats how I fell right now  :blink:
Title: Re: Chloroplasts
Post by: Billy on November 29, 2010, 06:00:20 PM
How about this?

Instead of having a "Find Best" button, you could have a "Find Best Bot" button and a "Find Best Veg" button. That way, if a bot evolves to make chloroplasts, it becomes a veg, and everything which applies to another veg will also apply to it. You can use the "Find Best Veg" button to find your evolved plants. This isn't necessarily a bad thing. I think one of the most interesting things about adding chloroplasts would be the possible evolution from animal to plant. There could be a checkbox called "Disable chloroplast production" alongside "Make immune to viruses," "Disable voluntary movement", etc. for if you think it is a bad thing.
Title: Re: Chloroplasts
Post by: Botsareus on November 30, 2010, 03:14:14 PM
Chances are it is always going to be '"Find Best Veg". It is not a qustion of filtering out a veg. or not a veg.
Details:

I am actually running three species right now.
Alga set to veg that does not mutate.
"bfb" not set to veg that does not mutate.
"mfb" not set to veg that mutates-crazy.

When all of "bfb"  is dead I use findbest to find the best "mfb", but if vegs are treated just like non-vegs chances are the unmutated alga will be selected as "best."
I am beginning to worm up to the idea that my mfbs will end up using some Chloroplasts...

So, I think my approach is fine...

1.) The new issue here is the respawning:
 I need to know how to limit the max number of vegs.

Found something:
1) Set dynamic cost with the desired population
2) reduce the numbers of prey

 :tantrum: Never mind, this will not work either because dynamic cost is not set per species.
Any ideas?




1.)b.) how to tell the program how much vegs to repopulate with? Or better qustion: How will this be set?

 I was not a big fan of "cooldown period" so no need to worry about that one.

2.) moo! alga please moo!  :D
Title: Re: Chloroplasts
Post by: Billy on November 30, 2010, 05:56:19 PM
Differentiating between what has been veg from the start and what evolved into a veg will just make things complicated. Nothing should be "set as veg." Whether it is veg or not should depend on whether it has chloroplasts or not. Veg should not be treated just like non veg. Perhaps there should also be a "Find Best of This Species" button for situations like yours.
Title: Re: Chloroplasts
Post by: Numsgil on November 30, 2010, 11:03:19 PM
Quote
who is going to post the reprogrammed Alga_Minimalis?
I can post an example in a couple of hours, I have to run to class.

I don't think we need a new veg actually...

As I understand it, we still have the "veg feeding method", which defaults to like 20% of energy goes to body (or in the new version, chloroplasts).  That, combined with some way to set the initial 1000 body a bot gets to be the equivalent energy in chloroplasts should be all you need.
Title: Re: Chloroplasts
Post by: Shasta on November 30, 2010, 11:21:16 PM
Right now the old version, (giving energy w/o chloroplasts) is completely gone.
Title: Re: Chloroplasts
Post by: Numsgil on December 01, 2010, 01:43:58 AM
Right now the old version, (giving energy w/o chloroplasts) is completely gone.

That's fine, but the new system just mimics the old "feed veg per kilobody point" feeding method, right?

There's another slider below that in the options panel that controls how the veg gets fed.  It's a slider between body and nrg.  So for a purely realistic sim you might put that all the way to nrg, but if you want your old vegs to work you'd put the slider more towards body, so the vegs get fed 80% in nrg and 20% in body, for instance.

Just replace the body with chloroplast and you should have basically the same thing.
Title: Re: Chloroplasts
Post by: Botsareus on December 01, 2010, 05:07:51 PM

1.) How do I limit the whole simulation not to have infinite energy? I guess "Set dynamic cost with the desired population" will work?

Quote
That, combined with some way to set the initial 1000 body a bot gets to be the equivalent energy in chloroplasts should be all you need. Just replace the body with chloroplast and you should have basically the same thing.

2.) We are doing:

Quote
I just mean rig up the options in the options panel to make sense with the new system.  So setting something as a veggie will give it chloroplasts instead of body when the simulation starts, but after that they can build body or chloroplasts as they want.

Am I right? If so, problem: if the above is NOT per species then I get my mobile robots behaving just like Alga...

I need the
Quote
put the slider more towards body

to be per species...

can we work that in, or am I missing something else here?

Quote
"Find Best of This Species" button
I like it. I guess we put a setting in settings for what species to search?
3.) How does a robot know what species it came from instead of searching by robot name?

Title: Re: Chloroplasts
Post by: Botsareus on December 02, 2010, 03:24:06 PM
Quote
Quote
"Find Best of This Species" button
I like it. I guess we put a setting in settings for what species to search?
3.) How does a robot know what species it came from instead of searching by robot name?

My best solution so far is to generate a new species list from the robots already in the sim. (BY ROBOT NAME  ;))
This way if people add new robots, or it is an e-sim, we still got good data.

That leaves problem 1 and 2. Any ideas? (also, I still have no idea "how much robots to respown with" is set to by default)


Title: Re: Chloroplasts
Post by: Billy on December 02, 2010, 04:08:01 PM
I was kinda thinking, right click on a bot, and "Find Best Of This Species" is in the list of options. And I thought it would be fine if it just looked at all bots with the same name.
Title: Re: Chloroplasts
Post by: Botsareus on December 02, 2010, 04:12:47 PM
3.) Very cool, that is what I will do.

That leaves problem 1 and 2. Any ideas? (also, I still have no idea "how much robots to respown with" is set to by default)

Title: Re: Chloroplasts
Post by: Numsgil on December 02, 2010, 04:14:33 PM
Quote
That, combined with some way to set the initial 1000 body a bot gets to be the equivalent energy in chloroplasts should be all you need. Just replace the body with chloroplast and you should have basically the same thing.

2.) We are doing:

Quote
I just mean rig up the options in the options panel to make sense with the new system.  So setting something as a veggie will give it chloroplasts instead of body when the simulation starts, but after that they can build body or chloroplasts as they want.

Am I right? If so, problem: if the above is NOT per species then I get my mobile robots behaving just like Alga...

I need the
Quote
put the slider more towards body

to be per species...

can we work that in, or am I missing something else here?

I think you're confusing two ideas here:

There's whether a bot starts with 1000 body or 1000 chloroplasts when the sim starts (which was previously marked with the "vegetable" tag in teh per-species options).

That's separate from whether the bot is "paid" in body/chloroplasts or nrg when vegs get fed.  That's what the slider is used for.

I'm not sure if that's still the plan for how things would work, but it certainly makes sense to me to keep that option (it has uses in zerobot sims, too, where you slowly wean veggies towards making their own chloroplasts/body).
Title: Re: Chloroplasts
Post by: Botsareus on December 02, 2010, 04:22:28 PM
Look man , I think it will be best to have a slider for each specie to let it know that when this particular specie is spawned how much "chloroplasts" it has. We also have to make sure all the children of that resulting robot keep the same amount of "chloroplasts" so they work identically.

Then we also have to worry about what will our respawn amount be, and how to keep the simulation from having infinite energy.

This is the best I can go for instead of just adding what I proposed earlyer. If you can think of anything better feel free because in the end you are the boss.

(I am starting to sound Italian now, oh god I want to change my personal picture back so badly...)
Title: Re: Chloroplasts
Post by: Botsareus on December 02, 2010, 04:42:03 PM
oh ok, I think I got it. It is going to be strictly 1000 body, or 1000 chloroplasts.

Overall , once again, too complicated. Make my life simple, I just want to run formula1 mode here...

Ok, lets say hypothetically I want to run F1 in this new system:

A. I have to set vegs to use 1000 chloroplasts.
B. I have to move the slider all the way to body/chloroplasts
C. I have to set a reasonable respawn rate for the vegs
D. I have to create a dynamic cost with the desired population.
E. I have to set my non-veg robots to use 1000 body.

That is all?
Right?
Title: Re: Chloroplasts
Post by: Botsareus on December 02, 2010, 06:56:28 PM
Anyone? Does the right hand know what the left hand is doing?  :P