Author Topic: What should vegs not be allowed to do?  (Read 7126 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
What should vegs not be allowed to do?
« on: October 21, 2006, 07:40:21 PM »
I can make some significant performance improvements to the system if we restrict what veggies are allowed to do.  For example, if we say veggies can't see, that would be huge.   I can save the cycles used for vision (which are quite expensive and highly influenced by clumping) and populatuing the refvars for all veggies.  I know most veggies don't have genes to see, but it doens't matter, the program doesn't know this.  The way it's architected, things like eye values and refvars get calculated whether the bot uses them or not.  If I could assume - rather, if I could enforce that veggies can't see, I could avoid this almsot always unessessary work and speed up the whole program.  Sims with lots of veggies would see a marked perfromance improvement since whole sections of the code would not need to execute for a significant percentage of the bots.

There are other possibilites.  We might decide that veggies can't move on their own, or can't initiate tie formation, or can't shoot anything but waste and poison or are immune to virus and venom.  The more we restrict, the more I can speed things up.

Now, before we get crazy, we should think about how much we want to allow/enable complex evolved or designed veggies.  I can imagine large vine forests of tie connected veggies.  I can imagine venus fly traps.  I can image veggies wanting to move into position to form complex structures like leaves and branches (though perhaps we coudl decide to restrict them to doing so only via tie length and torque operations and not via .up, .dn. etc.).  

We should also not forget about viruses, etc.  Do we want veggies to be able to catch animal viruses? If so, and we restrict some things like vision or movement, then certain viruses won't work even if veggies can catch them....

Anyway, I'm interested in input.   At one end of the spectrum, if we really restrict veggies, then sims with many many thousands of veggies might start to become very feasable and fast since veggiess would be so cheap w.r.t. cycles.  I can imagine lady bug bots eating their way and burrowing through a sim jammed packed with tens of thousands of tiny veggies... But it might also make veggies pretty simplisitc and unable to evolve or be designed to do much of interest.  We are at the other end of the spectrum currently - veggies can do everything other bots can do and more (more because they can get nrg direct from the sun and get magically repopulated by the system).

So, what do people want?  Let me know.
« Last Edit: October 21, 2006, 07:47:03 PM by EricL »
Many beers....

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
What should vegs not be allowed to do?
« Reply #1 on: October 21, 2006, 09:04:50 PM »
I personally want to blur the lines between veggies and nonveggies.

How I want it to work is... well basically veggies'll be able to create a new substance that'll gather nrg for them.

I'd like this new substance to add to mass, and it'd basically be used instead of the bot's Body as far as gathering nrg would be concerned.

We could call it photo!

Er, but anyway... this new substance would basically be an alternative Body for plants. Preferably, death checks that occur when Body reaches 0 will be changed so that only when the bot has 0 Body and Photo will it die.

And of course the current system can be changed so that plants get a small amount of nrg put into Photo automatically, and plants would start with 1000 photo instead of 1000 body.

The benefit of Photo or Body would decrease if the bot doesn't have a pure amount of either, though by what amount I'm unsure... possibly the amount could be multiplied by the percent... for example if you have 1000 Photo and 1000 Body, it'd be closer to like having 500 of each, and thus would be 1/4th as cost efficient then specializing. I think we should be pretty cruel to bots who like to be jack of all trades like that, else they could too easily become superbots and basically pwn everything.

Of course, this also means pure plants would SUCK at combat that relies on body for effectiveness, which would balance out certain things, especially bots that transcend their flat limitations by reproducing through viruses.

But that's all just my off-topic oppinion, perhaps I should make a new topic for it all!

Anyway back to on-topic... isn't there a currently used system which checks to see if the bot is using any of it's eyes at all, and if not then it simply doesn't calculate that information? If not I say implement that. It'll be a very small bit more memory taxing, but if done in a nice, complicated boolean bitwise level type way it wouldn't cost that much... just ten boolean variables: one for each eye, and one to see if anything's being used. Of course, ref variables will be counted into eye5.

And if anyone complains about blind bots incapable of having their sight being read by other bots, we could just say that the presence or lack of .eye# sysvars are a flat way of determining whether the bot actually HAS eyes or not.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
What should vegs not be allowed to do?
« Reply #2 on: October 21, 2006, 11:26:26 PM »
At one point there was a check to see if a bot ever tried to read from any of the eyes.  If it didn't, the eyes weren't turned on.

I removed it at one point when I redesigned the vision code, but it should be back in now.  If it's not, that's a problem.  The C++ code has it, that would be a good source to see how it works.  Basically you just need to update it in the DNA parsing if any of the eyes are ever read from.

Realistically I agree with AGP, the line between veggy and bot needs to be vaguer, not more enforced.  Restricting veggies outright is a step in the wrong direction.
« Last Edit: October 21, 2006, 11:27:22 PM by Numsgil »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
What should vegs not be allowed to do?
« Reply #3 on: October 22, 2006, 03:35:05 AM »
It took me a while to find it, but the current code does have a check to see if a genome has any eye sysvars.  If it doesn't, then some of the expensive stuff is bypassed.  But if a veggie mutates to have an single eye statement, then all the same work is done even if no code uses it.

There are probably some similar perf impovements I can make where I assess the genome and don't do some stuff if the genome doesn't have the code to do it.  Such changes are neutral w.r.t. veggy/non veggie philosophy.  Won't be as good as if we could restrict veggy capabilities, but will be some perf improvements, maybe.

I need to do some further thinking about veggy philosophy.  On the one hand I agree with both of you.  On the other, there is a lot of work being done today in the code that isn't necessary in most sims.....  Hmmmm.  I'll muse on it.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
What should vegs not be allowed to do?
« Reply #4 on: October 22, 2006, 06:57:00 AM »
We could add an idleness check.  If a bot doesn't reference an eye in X many cycles, the eyes turn off again.

I'm mostly interested in the idea I've had of a veggy "mask".  A bot would tie to a veggy and have the veggy perform all its actions, including seeing, feeding, moving, etc. while it looks in the opposite direction and protects the backside.  Most bots it would hunt wouldn't be prepared for a predatory veggy.

So long as veggies can have various skills "switched on" I'm okay if they "atrophy" over time.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
What should vegs not be allowed to do?
« Reply #5 on: October 22, 2006, 08:11:52 AM »
It whould be bad for evosims if veggies were limited and can't evolve into heterotrophs. What about just decreasing the sight radius for them all. I think they have too good vision anyway. It should be more like they sense when they are very close to something, like real organisms.
« Last Edit: October 22, 2006, 08:15:17 AM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
What should vegs not be allowed to do?
« Reply #6 on: October 22, 2006, 02:54:34 PM »
Quote from: Numsgil
We could add an idleness check.  If a bot doesn't reference an eye in X many cycles, the eyes turn off again.

I'm mostly interested in the idea I've had of a veggy "mask".  A bot would tie to a veggy and have the veggy perform all its actions, including seeing, feeding, moving, etc. while it looks in the opposite direction and protects the backside.  Most bots it would hunt wouldn't be prepared for a predatory veggy.

So long as veggies can have various skills "switched on" I'm okay if they "atrophy" over time.

Ah, how I think of it is that if a bot doesn't reference to any eyes, it doesn't have eyes to look through, and thus the only way to bypass that would be to build eyes.
Aka inject the bot with some virus.
How long can a virus that's just cond start *.eye5 stop cost anyway?

Quote from: Testlund
It whould be bad for evosims if veggies were limited and can't evolve into heterotrophs. What about just decreasing the sight radius for them all. I think they have too good vision anyway. It should be more like they sense when they are very close to something, like real organisms.

Mm, unless the VB code is already using a grid system for eyes, that won't help much.
I'm not 100% sure but I think that how eyes work now is that they cycle through every other bot and see if the bot should be in sight. Which is why a lot of bots can get really laggy sometimes!

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
What should vegs not be allowed to do?
« Reply #7 on: October 22, 2006, 04:06:03 PM »
The question we are really pondering here is what is the morphological cost to being autotropic?.

In the real world, being an autotroph is morphologically expensive.  You have to have billions of chlorplasts to covert light to food.  You have to have the real estate to catch to the light.  This generally means lots of solar panels, e.g. leaves, lots of leaves.  You have to compete for light with other autotrophs which often means growing taller.  Supportting such infrastructures in wind and rain requires a lot of mechanical bracing - trunks and roots and branches and twigs.  You sacrifice mobility for supportting such superstructure as you need a foundation sunk into the ground and since the energy input you get is still farily low comparitivly speaking, you lead a less energetic lifestlye than non-autotrofs.  But the advantages are huge.  You make your own food from nothing but light (and air and water).  Since you don't have to run and chomp and manevuer to get energy, etc. you don't need legs and heads and teeth and brains.  You can be much simpler which means you can surivie massive damage such as grazing or losing all your leaves in the winter and recover.

So, the question we should be asking is if you are autotropic in DB, what do you have to give up?  What taxes do we want to impose on autotrophs for the right to gather free mana from heaven as a simulation of the morphological costs of all the equipment biological organisms must have to be autotrpoic?  So, while I now agree we don't want to artificially limit the possibiltiy of a carnivouros autotrof or more precisely, one that can see, move, shoot, etc. I do think we want to set up morphological costs such that if you choose to be autotrophic and reap the advantages there of, there is a cost of some sort for doing so.

I think I like the direction AGP is going.  If bots had to have some amount of substance (e.g. .photo) in order to be autotrophic and the amount of that something dictated the nrg they received per cycle but there was a cost to having that something in terms of other abilities then that might do the trick.  So, what should this cost be?
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
What should vegs not be allowed to do?
« Reply #8 on: October 22, 2006, 05:23:06 PM »
I had the idea a while ago of seperating body into three concepts:

1.  Muscle increases efficacy of actions (shots are stronger, etc.)  Costs nrg each cycle to upkeep.  Can be destructed but for only limited nrg retreival.  Muscle has alot of mass per little volume, so it tends to make bots sink.

2.  Fat simply stores nrg, and has a nearly perfect or perfect conversion rate between the two.  Fat has a medium mass per medium volume.

3.  Cellulose (or we call it something else) gives plants nrg from light.  Cellulose has a huge volume to it.

The idea being that plants swell up to several times the size of bots to be efficient at photosynthesis.  Plants have a hard tim maneuvering because of their physical size, so moving costs alot (from drag), shooting is hard (because you can't chase your prey efficiently), and turning is difficult (because of your rotational inertia).
----------------------------------------------------------------
Remember that bots can address eye5 without having an eye5 in there.  For instance "60 5 mult *" would be the same as *.eye5.  There are even sneakier examples.  So you need to check during the bot's life instead of at its creation.
« Last Edit: October 22, 2006, 05:25:43 PM by Numsgil »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
What should vegs not be allowed to do?
« Reply #9 on: October 22, 2006, 09:32:45 PM »
I love the cellulose idea.  I had in mind something nearly identical.  Perhaps I will protoype something along these lines.

The current code (before my time) counts eye sysvars in the DNA .  Period.  It re-checks after point mutations and reproduction and anywhere else the DNA could change, but it only looks for explicit sysvar usage.  If an organism does not use any eye sysvars directly, as in your example, the current code will not populate the eye values for that organism even if it has sneaky genes to use them.
Many beers....

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
What should vegs not be allowed to do?
« Reply #10 on: October 22, 2006, 10:28:33 PM »
I like the cellulose idea too (but want a *.photo sysvar for SOMETHING darn it!) It's... almost exactly the same as my idea, really, with the main difference being that mine was just to emulate body in matters of mass and volume and stuff like that.

And, if not for the fact that it wouldn't allow for bots to hide their eyes, I'd be all for keeping it so that in order to see, you have to have a definate *.eye5 (or some other number) in your bot's DNA.

Also, if it's possible to do so without actually be MORE taxing on performance, I'd like it if it checked each eye usage individually, with ref sysvars also accounting for .eye5.
That is, if .refeye is used, then it'll calculate .eye5 even if no .eye5 is actually used. (Don't diss the possibilities of a robot that could do this! It'd be seen as blind but wouldn't be if done well!  Now I just have to figure out how to mathematically calculate where a bot will be in one cycle of movement using only ref vars, and calculate the angle distance that'll occur... if someone knows that freaky trigonometry stuff (I probably even spelled the word wrong! that's how little I know of it!) please teach me!)

Anyway, sorry for rambling  My point is, there'd be a lot less system tax because plenty of bots out there don't use at least one or two of their eyes, and some neglect as much as half of them.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
What should vegs not be allowed to do?
« Reply #11 on: October 23, 2006, 12:31:19 AM »
I remember now, the C++ code checks for syvar usage during lifetime, but the VB fork doesn't because we wanted to be sure that refeye > 0 if the ref'ed bot can see.

Offline Zinc Avenger

  • Bot Builder
  • **
  • Posts: 56
    • View Profile
What should vegs not be allowed to do?
« Reply #12 on: October 23, 2006, 10:11:58 AM »
Why not create a setting (tickbox, whatever) that says that a bot is a restricted veggy?

I don't think the idea of restricting vegetables with regard to eyes etc. is a good thing, the more freedom there is the more interesting the simulation becomes after all!

But if the user can specify a bot to be a "restricted" vegetable then it would allow us to run much larger sims with lower overheads, and not interfere with the more interesting vegetables possible.

In fact, nearly all veggies I use in my less exotic sims are Alga Minimalis. Is there some way of making this more efficient? All (unmutated) AM veggies act the same way, so how about creating a "default" veggy bot that acts like AM but is not handled by the DNA script system? Could that shave a few microseconds off a cycle? Just throwing wild ideas into the teeth of the wind here.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
What should vegs not be allowed to do?
« Reply #13 on: October 23, 2006, 11:21:51 AM »
I'm torn about your excellent suggestion ZA.  One the one hand, yes I think I could make some significant perf enhancements for sims with restricted veggies.  On the other hand, I don't like even the current species-wide UI options for fixed and autotroph and veggie repopulation and I worry about too many knobs in the UI.

I think I'm coming to the position that autotrophy should be available to all bots as discussed above, that we should (someday) replace the different veggy feeding styles with a new mechanism as discussed above, that direct re-population and population control for these guys should go away and that soley a bot's genes dicate whether they take advantage of autotrophy or not.  Thus all bots would essentially have the autotrophy option checked.

The reason I dislike the veggy repopulation and population control stuff is that it's artificial and amoung other things repopulation causes discontinious sim energy inflows.

How's this.  There's a restricted "built-in" veggy.  It can't see, it' can't move on it's own, it doesn't evolve, it doesn't even have DNA and the veggy repopulation and population control only works for this built-in species.  Maybe it's even always fixed or at a minimum the fixed option checkbox only applies to them.  (Any other bot that wants to be fixed has to have a gene to fix themselves.)  Being fixed helps performance since fixed bots don't move, don't collide with other fixed bots, don't friction or fluid resistance, etc.   The restricted veggy is a bot - it can be seen, eaten, tied to, etc. - but it's there mostly as an artifact of the landscape to bootstrap the ecosystem, provide food for other bots and as a doorway for energy to enter the sim.   People who don't care above evolving veggies can use these for the veggies in their sim and reap the performance enefits.  People who want the full flexability to evolve autotrophic bots or autotrpoh/non-autotrpoh hybrids can use full blown autotrophs that have the potential to evolve, see, move, etc.
Many beers....

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
What should vegs not be allowed to do?
« Reply #14 on: October 23, 2006, 04:10:58 PM »
Quote from: EricL
How's this.  There's a restricted "built-in" veggy.  It can't see, it' can't move on it's own, it doesn't evolve, it doesn't even have DNA and the veggy repopulation and population control only works for this built-in species.  Maybe it's even always fixed or at a minimum the fixed option checkbox only applies to them.  (Any other bot that wants to be fixed has to have a gene to fix themselves.)  Being fixed helps performance since fixed bots don't move, don't collide with other fixed bots, don't friction or fluid resistance, etc.   The restricted veggy is a bot - it can be seen, eaten, tied to, etc. - but it's there mostly as an artifact of the landscape to bootstrap the ecosystem, provide food for other bots and as a doorway for energy to enter the sim.   People who don't care above evolving veggies can use these for the veggies in their sim and reap the performance enefits.  People who want the full flexability to evolve autotrophic bots or autotrpoh/non-autotrpoh hybrids can use full blown autotrophs that have the potential to evolve, see, move, etc.

I like that idea to some level... but it has a few major problems.
What happens when other bots change it's sysvals from outside? Or virus it up?
Also, if this is added I'd suggest that it's not ALWAYS fixed but rather that whether it's fixed or not remains unique to each bot, with an added exception that it gives birth to bots that're fixed based on species preference as opposed to the bot's own preference.

Also, to Numsgil, may I request that you take your idea of muscle, fat, and cellulose to a new topic so we can discuss it without getting too far off topic in this topic?  I know it probably has a few topics devoted to it but they're probably at least a year old... by now.