Darwinbots Forum

Code center => Suggestions => Topic started by: Numsgil on March 02, 2006, 04:38:36 PM

Title: Compartmentalization of the Bots
Post by: Numsgil on March 02, 2006, 04:38:36 PM
Elite mentioned this in passing I think, and it made me remember an idea I've thought of before but I don't think I've ever laid onto paper.

Presently bots are considered to be homogenous.  All their body, nrg, poison, etc. is all stored in a large and uniform gooey substance.

I propose a way (the mechanics of which I have no idea) to create different 'sacs' to contain various substances in the bot.

Here's what I consider to be the base level upon which bots may build:
"Cell Wall" - Simply the membrane seperating the outside and the inside.  I would imagine it would be into this "sac" that you'd want to put your slime and shell.

"Cytoplasm" - "Inside" the cell.

"Outside" - a way to expel things and absorb things from the environment.

Everything else would need to be specified by a bot.

Sacs could be nested arbitrarily.  You could have a "Mitochondrial" sac inside the Cytoplasm, or even on the cell wall (though I have no idea what the effect of that would or should be.)  A sac assigned to the "outside" would probably create a new bot (probably without any DNA, and so probably following the same rules as corpses for decay, etc.) containing perhaps nrg for storage or waste.

These sacs would seperate various chemicals from each other.  Poison probably shouldn't be mixing with your food supply.  You could create an empty sac on the cell wall and use it to eat another bot, then move that sac into the cytoplasm for digestion.  DNA could be kept in its own sac to have stronger control over mutation rates and prevent it from otherwise being damaged.

Moving substances across a sac barrier would probably cost nrg (or may generate nrg if you're moving from an area of high concentration to an area of low concentration).
Title: Compartmentalization of the Bots
Post by: shvarz on March 03, 2006, 12:40:02 AM
It's not clear to me what you mean by sacs?  How can you "have a sac on cell wall"?

Pictures might help.

And I'm not sure what specific goal they would serve.  I understand about different compartments for metabolites, but the proposed system for metabolism has these compartments built in already.  DNA is just an abstract piece of code right now and has no "physical representation" in DB universe, how can we move it into a sac?  And why?
Title: Compartmentalization of the Bots
Post by: Elite on March 03, 2006, 12:03:00 PM
I think Nums means phagocytosis by the sac on the cell wall  :)

Don't real microorganisms have some form of compartmentalisation Shvars?
 - Nucleus
 - Vaccuole (for plants)
 - Various structures such mitochondria
 etc.

Maybe mutations could be accumulated (or accelerated) by exposure to free radicals (or DB equivelant) - maybe some chemicals could be mutagenic?
Title: Compartmentalization of the Bots
Post by: Numsgil on March 03, 2006, 12:15:06 PM
The most obvious consequence I can think of would be order of defense.  Your cell wall will be attacked first, your cytoplasm second, and any internal membranes third.

I imagine you'd have to do a certain amount of damage to the cell wall before you could breach the internal cytoplasm, and a certain amount of the cytoplasm would need to be compromised to reach any of the more critical compartments.
Title: Compartmentalization of the Bots
Post by: shvarz on March 03, 2006, 02:07:19 PM
Hm, OK, we are going out of biology field with this :)  In real cells a break in a cell membrane would mean certain death for the cell, so this sounds silly.

But even if we stray away from biology (which is fine) I am still not sure what the advantage of having these compartments would be.  We don't seem to need them now, so if we add them, then we would also have to add something that would make them necessary.
Title: Compartmentalization of the Bots
Post by: Numsgil on March 03, 2006, 02:21:30 PM
Right, so let's brainstorm what we could do that would make them necessary :)

The first thing that comes to mind is that it would explain the way in which shell, slime, and poison work.

The second thing is that it allows for phagocytosis or endosymbiosis as a natural consequence instead of a specifically programmed event.

Those are really the only two things I have at the moment.

In my mind, the bots are analogous to real cells, but have some "magic" properties.  In this case, their insides are rather gooey, so a membrane puncture wouldn't be like a balloon popping, but would be more like a cut in a higher organism.  It would be self-healing but would result in a certain amount of volume and mass loss (probably more dramatic than higher organisms.)
Title: Compartmentalization of the Bots
Post by: Elite on March 03, 2006, 02:49:51 PM
Reason for partitioning bots:

Some enzymes may turn out to be poisonous to some bots (ie. breaking down their food into something that they can't digest and can't get rid of, or an enzyme that stops a bot shooting): if they can affect you, then how do you stop them doing so.

Or maybe you want to have a metabolic process going on seperate from another metabolic process (ie. photosynthesis and resparation in plants) - the two processes could be done in different partitions to stop them interfering with each other.

Putting stored fat in a tough membrane maight stop enemies eating your remains so quickly - they have to digest the sac first.

Sacs could be one of many cell structures. We could probably think up a bunch of them:
 - Cell wall
 - Nucleus, metabolic structure
 - Poison/venom sac
 - Senses? (such as the .eye commands)
 - Flagella?  (have to make before you can use movement commands?)
   etc.
Title: Compartmentalization of the Bots
Post by: Numsgil on March 03, 2006, 03:18:50 PM
I've thought about it a little more and I'd like to modify what I said originally.

I think the boundaries between any two sacs should be an entity in and of itself.   Similar but slightly different.  In my original post I said that the cell wall is a sac, but I think it should have slightly different properties.

these "walls" seperating sacs should be able to have transporters (which carry substances that aren't permeable across the bundary), which obviously don't make much sense inside a sac.

Likewise shell and slime wouldn't make much sense inside a sac (except maybe as storage) but make alot of sense on a sac boundary.

How this would translate into program rules I'm not so sure.

So to ammend my original statement, the only two "gimmes" for sacs are the "outside" and "inside", with the cell wall being the wall between the two.
Title: Compartmentalization of the Bots
Post by: shvarz on March 03, 2006, 06:59:06 PM
Let's define the topic a little better.  We may talk about sacs as "logical compartments" in the cell or we can talk about introducing "physical sacs" and their properties into DB universe.

The sacs as logical compartments are already there.  For example, memory locations are "sacs" - they are separate from each other and store certain things.  The Dna is in a compartment of its own - nothing can touch it at the moment.  In the proposed metabolism system we'll have tons of logical compartments.  The thing about these compartments is that they can be introduced at will, without any general rules.  So there is no need for a concept of a "sac" as there was no need until now.

The sacs as physical consequences of the membrane properties is a whole different matter.  Here we should create a more or less general system to describe the properties of bot's borders and/or of bot's internal environments.  These sacs would be physically present (visible?) in DBs.  I'm not a programmer, but to me it seems out of our reach.  After all, current "borders" of bots are simple circles and don't have any physical properties (well, there's been some steps forward in newer versions to introduce those).  But what we would be facing are fluid membranes, able to shift around, give bots different shapes (for real), invaginate, fuse and so on...  I doubt Nums would be able to code such crazy thing into DB and even if he can, I'm sure it will slow down the program to a crawl...
Title: Compartmentalization of the Bots
Post by: Numsgil on March 03, 2006, 11:26:51 PM
It's theoretically feasible for a more amorphous blobby membrane instead of a perfect circle, but it's out of reach of the current physics engine.  Several things would need to be introduced before we could seriously consider it.

As to simulation slowdown...  It would be present, but I don't think it would be terrible.  Again, a large number of things have to happen first so it's sort of out of reach at the moment.
Title: Compartmentalization of the Bots
Post by: Elite on March 04, 2006, 08:20:17 AM
I think that Griz was playing (http://forum.darwinbots.com/index.php?showtopic=937) about with amphorus blob bots

 :boing:

And 3D, which would be cool. You could form more complex multicellular organisms in 3D ...  ^_^
Title: Compartmentalization of the Bots
Post by: Numsgil on March 04, 2006, 02:24:27 PM
I'm making the C++ port with respect to how to easily upgrade it to 3D.  The engine will handle bots moving in 3D.  The graphics would need to be updated to use spheres instead of circles (or maybe use billboarded circles), and a bunch of sysvars would need to be added...

But the engine could handle it.  Just thought I'd throw that in :D

What griz is showing there is raytracing I believe.  A conceptual idea not actually having anything to do with the engine at present.  But still looks pretty sweet :D
Title: Compartmentalization of the Bots
Post by: Endy on March 05, 2006, 11:42:15 PM
I have a bit of time to spare again :)

Not to get too far off topic here but why can't the engine support different shapes?

The old "transfer gate" repulsion field, acted as a sort of hill for the bots. Would it be too difficult to mark off an area to act as an object/barrier/bot?

I was kind of thinking a user could define the general objects for a sim. While the bots could evolve their own shapes (not skins, actual functional shapes here).

Different "physical" objects and bot shapes would probably add tons of depth to a sim if we can get them working right.
Title: Compartmentalization of the Bots
Post by: Numsgil on March 06, 2006, 12:28:20 AM
The basic problem of non circular bot shapes (and other shapes for that matter that aren't either square, circle, or something simple like that) is collision detection.  Circles make it really easy, and squares aren't too bad either, but when you delve into curces and thigns it becomes difficult.
Title: Compartmentalization of the Bots
Post by: Elite on March 06, 2006, 11:50:09 AM
How about handling phagocytosis by defining the bot as a circle as usual, and defining the phagosome as a smaller circle. See the attached jpeg

That way you can define the whole shape as two circle centres and radii
Collision detection need not be affected.

Do you understand what I'm saying?


BTW, the smallest circle is another, smaller, bot. How about you can only swallow another bot if it is smaller than you
Title: Compartmentalization of the Bots
Post by: Numsgil on March 06, 2006, 12:28:27 PM
Yes, that's what I was thinking for phagocytosis.  Most things fall into that relatively simple solutions like that when the bots are circular.
Title: Compartmentalization of the Bots
Post by: Endy on March 10, 2006, 03:09:54 AM
Could that perhaps be expanded to allow organnelles to exist?

Perhaps an eating attempt gone wrong(or right depending on the viewpoint). I'd imagine it'd be tricky to get working correctly. Like our own cells they should be able to reproduce simultaneously, doubling correctly.

I'm not sure how real cells manage this, by now there's sure to be some advanced interconnected mechanism to allow proper division, but at The Beginning it was probably touch and go.

Maybe just have all included organelles/bots reproduce at the same time as the host bot, that would probably do it.
Title: Compartmentalization of the Bots
Post by: Numsgil on March 10, 2006, 01:46:57 PM
As far as I know, real organisms reproduce independantly of their organelles.

The organelles themselves reproduce a couple of times during the life of the parent organism.  Then when the parent organism divides the cytoplasm is cut in two and the organelles get distributed depending on what side of the divide they were on.

So yes, organelles would probably be possible, though I'm not sure how you'd write the DNA to indicate that.
Title: Compartmentalization of the Bots
Post by: EricL Newbie on March 10, 2006, 02:44:31 PM
It seems to me that the topic here may really about how we (can I say 'we' as a newbie?) go about architecting for complex 'multi-cellular' organisms which exhibit specialized regions I.e. skin cells, poision generating cells, cells dedicated to getting rid of waste, cells dedicated to motivation, etc.

As a newbie, the current state of DB seems to me to be in tranisition.  On the one hand, bots can be thought of cells, that is, as the atomic unit of DNA execution, the unit of specialization.  As I understand it, things like ties are the beginings of multi-bot, multi-cell organisims I.e. the beginnings of mechnanisms for different cells/bots to communicate, specialize and cooperate and evenutally act collectivly as a single entity.

On the other hand, bots are currently complete organisms in themselves in that a single bot can perform a whole slew of different things from movement to vision to eating to posion, etc.  Namely, it is not only possible but difficult to prevent all genes in the DNA of a bot being active all the time.

If we want to enable phenotype complexity where a skin can be penetrated, where venom producing cells have to be kept isolated from other cells, where eating the wrong parts of a organism could posion you unless you have evolved the right posion neutralizing cells, where some cells specialize in vision and others in locomotion, we need to decide what a cell is, I.e. what the unit of specialization is and what an organism is.

Personally (and this is admittedly a newbie view point) I think I would like to see the current notion of bot become the cell and thus would prefer to see investment in additional bot to bot communication and connection mechanisms over adding additional internal complexity to single bots I.e. within the single unit of DNA execution.  I would suggest keeping bots amorphous entities with no internal structure and instead create organizational and physical structure and complexity at the bot-bot level.

I imagine organism embryogenesis where organisms grow, adding new cells/bots to themselves with mechanisms to control specialization, activating or surpressing certain genes for example when a cell/bot is created.  The engine could encourage this by simulating real-world physics such as making it more costly for a cell to do multiple things, say to both generate posion and have eyes.

Its a long term goal but over time I think a muture organism consists of hundreds or more connected, communicating cells, created through embryogenesis (I think I am using that term correctly) each sharing the same DNA, each with their own parallel thread of execution that gets executed for each cycle in parallel, yet each executing only the genes within the genome that have been activated for them, each doing a specialized job which adds up to complex organism level behanvior.

Thus, I would suggest creating organism complexity at the connected multi-bot/multi-cell level is preferred to adding internal compartimental complexity to individual bots.

-E
Title: Compartmentalization of the Bots
Post by: Numsgil on March 10, 2006, 02:57:06 PM
I'm actually (really slowly) working on adding specialization to the bots so that multibots can have specialized cells, etc.  You can read various ideas we've been toying with in this (http://forum.darwinbots.com/index.php?showforum=35) subforum.

The main issue is that single bots should be able to be complete organisms in and of themselves, and they should still be able to specialize (say from omnivore to herbivore).  It becomes quite tricky to design a system that encourages multibots without giving them special priveleges.

I think having Multibots from endosymbiosis and exosymbiosis would be pretty cool.
Title: Compartmentalization of the Bots
Post by: Elite on October 24, 2006, 05:21:22 AM
I think this idea warrants another look

Lysosomes, or something similar, would be cool for phagocytosis.

Sacs could be used for:
 - Storing substances
 - Carrying out reactions
 - Forming the cell membrane

This would work well in combination with metabolism and the envirogrid

Some substances could have the special property of being able to form membranes. A bot can kill another bot by releasing enzymes that break down that particular substance, disintegrating their cell membrane and making the bot explode. All their 'food' and substances then come out to be gulped down by the attacking bot.