Darwinbots Forum

Code center => Darwinbots3 => Topic started by: NotLegalTender on April 19, 2013, 03:31:53 PM

Title: Organelles, better multicellular organisms, and more
Post by: NotLegalTender on April 19, 2013, 03:31:53 PM
So I've heard that veggies are gonna have chloroplasts. We should allow for all organisms to have organelles. Each organelle could serve a different purpose. Multibots/multicellular organisms should be made better, and add the possibility of them evolving naturally on their own. Meanwhile, these suggestions, from these threads, should be put in darwinbots 3 as well:

http://forum.darwinbots.com/index.php/topic,232.0.html

http://forum.darwinbots.com/index.php/topic,111.0.html

Spores and pollen should be forms of reproduction added, and sexrepro should be made easier to code.

Also, vegetables should be capable of producing fruit and seeds, to distribute them further across the map.

Meanwhile, there should be some way to make mixotrophic organisms possible, and make it so bots can evolve to become photosynthetic, mixotrophic, and so on.

Also, chemosynthesis and thermosynthesis should be added. However, this might require stuff like hydrothermal vents, and volcanism.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Botsareus on April 19, 2013, 03:46:05 PM
***

2.45.03

Tieang1 trough Tieang4 fixed.
Tielen1 trough Tielen4 fixed.

Multibots ARE easier to code.

2.45.03

***

Sex repro works!

Use need a -8 shoot and the .sexrepro command.

***

You can code a mini-bot to act as fruit and seeds by using api-genetic memory and asexual reproduction.
Title: Re: Organelles, better multicellular organisms, and more
Post by: NotLegalTender on April 19, 2013, 03:58:29 PM
***

2.45.03

Tieang1 trough Tieang4 fixed.
Tielen1 trough Tielen4 fixed.

Multibots ARE easier to code.

2.45.03

***

Sex repro works!

Use need a -8 shoot and the .sexrepro command.

***

You can code a mini-bot to act as fruit and seeds by using api-genetic memory and asexual reproduction.

I meant like, actual ones in darwinbots 3. Also, I'm gonna try and make a fruiting bot with your suggestion, and maybe one that forms only when fertilized.
Title: Re: Organelles, better multicellular organisms, and more
Post by: NotLegalTender on April 19, 2013, 04:02:47 PM
eh, can you clarify on that one?
This things are actual in db2...

As in, the ability to make the code using new code, to make it easier to do so.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Peter on April 19, 2013, 04:05:37 PM
Could you give a few examples on what a organel in db should do?

What should be improved with multibots?
Title: Re: Organelles, better multicellular organisms, and more
Post by: NotLegalTender on April 19, 2013, 04:07:12 PM
Could you give a few examples on what a organel in db should do?

What could be improved with multibots?

Multibots - Make them behave more like multicellular organisms, or atleast, make it possible to do so.

Organelles - Metabolize food, photosynthesize, respire, chemosynthesize, store water, thermosynthesize, produce shell, produce poison, and so on.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Peter on April 19, 2013, 04:11:13 PM
What should be changed/added so it would behave more like multicellular organisms?
Title: Re: Organelles, better multicellular organisms, and more
Post by: NotLegalTender on April 19, 2013, 04:13:31 PM
What should be changed/added so it would behave more like multicellular organisms?

Some multibots are incapable of reproducing on their own without pulling off parts of them. Not only that, they are the bots that break the easiest.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Peter on April 19, 2013, 04:53:47 PM
There have been some changes with tie mechanics in the past with DB2. Breaking/making unstable quite some multibots.

I think there were ideas for metabolism(organel kind of involved) and specialization(makes multibot more appealable ). But I've been a bit out of the loop. So, I think it's smarter letting Numsgil explain it all. :P
Title: Re: Organelles, better multicellular organisms, and more
Post by: Numsgil on April 20, 2013, 02:34:15 AM
So I've heard that veggies are gonna have chloroplasts. We should allow for all organisms to have organelles. Each organelle could serve a different purpose. Multibots/multicellular organisms should be made better, and add the possibility of them evolving naturally on their own.

I'd like to add organelles, but I don't want to add them just for the sake of having them.

Chloroplasts make for interesting decisions, because as you build more and more to start generating your own energy, the increased volume, mass and intertia make it very difficult to steal energy from others.  And the bigger you are, the less likely you are to be able to fend off attacks from others.  This creates an interesting dynamic that's equally accessible to evolution and bot writers, and there's no single right answer.  Different strategies can use different levels of chloroplasts.

By comparison, an old idea I had was to have substances in the world, each with their own given free energy level, and with random substances tagged as shell, slime, etc.  This would force bots to navigate a dense web to figure out how to metabolize one substance to turn it in to another.  The problem with this is that it's not necessarily an interesting problem.  There's an optimal metabolic chain to build from the given substances, and while it would be interesting to see an evo sim try to evolve that optimal pathway, it's not at all an interesting thing for bot writers to play with.  They'd always copy+paste the optimal solution, and the optimal solution could be found with something like Dijkstra's algorithm.  So it's complicated and boring.  Bleh.

I'm sort of thinking of having something like cilia for movement, where having more would let you move faster, but building more costs resources.  And every time you divide you have to also divide up the cilia among the daughter cells.  Likewise for various other things a bot can do.  But I need to think through all the implications, and make sure it's not just extra pieces to manage for the sake of having more stuff to do.  It needs to fundamentally add interesting strategic decisions to the sim.  I think it will, but I want to be very deliberate about this sort of thing.

Quote
Astronomy (http://forum.darwinbots.com/index.php/topic,232.0.html)
Not high on my list, but there should be some interesting things you can do with the fluid sim I'm looking to have in DB3.  Periodically swirl things around a bit, like a tide, or alter the day/night pattern in different areas of the sim.

Quote
Possession (http://forum.darwinbots.com/index.php/topic,111.0.html)
Also not high on my list, but very doable.  It would just consist of tying a game pad or keyboard in to calling certain DNA codules.  I'd probably add network play just for the heck of it, although that's a whole can of worms (determinism - getting the sim to run EXACTLY the same on two different machines given the same input - is really hard.  Determinism is how most multiplayer games, like Starcraft, work.  But others cheat and send over an updated state every second or two)

Quote
Spores and pollen should be forms of reproduction added, and sexrepro should be made easier to code.  Also, vegetables should be capable of producing fruit and seeds, to distribute them further across the map.
There's no explicit spore or pollen feature, but it wouldn't be hard for a very small bot to either hibernate until an opportune moment or fertilize a large bot.  In terms of smaller bots hitching a ride on a larger one, that will be possible.  Bots will be able to just hard attach themselves to each other, like barnacles.

Quote
Also, chemosynthesis and thermosynthesis should be added. However, this might require stuff like hydrothermal vents, and volcanism.

This would have to tie in with the fluid sim to be really useful, but I'm not 100% sure I know how to do diffusion in a way that's efficient.  But something I'm keeping in the back of my mind.
Title: Re: Organelles, better multicellular organisms, and more
Post by: NotLegalTender on April 21, 2013, 05:57:55 PM
What about being able to set the temperature, ph, salinity, and more as well? And then this should allow for extremophiles (maybe someone could make a water bear lol)
Title: Re: Organelles, better multicellular organisms, and more
Post by: Numsgil on April 21, 2013, 09:01:11 PM
What about being able to set the temperature, ph, salinity, and more as well? And then this should allow for extremophiles (maybe someone could make a water bear lol)

What effect do you want salinity to have?  Same with the rest.  I can add arbitrary things to the sim but they're meaningless abstractions unless they do something.  And as I explained above adding things for the sake of it is something I'm specifically trying to avoid.

Let's take temperature.  I'd probably add temperature if I joined it with the fluid sim to produce something that would create circulation.  But it doesn't seem like it'd have any meaningful gameplay interaction with bots, besides the obvious " too hot/cold for me".  And even then it's not clear how that would reflect in actual effects.  Would the bot have increased nrg costs if it was outside its ideal temperature range?  What decides a bot's ideal temperature range?  It wouldn't fundamentally change how bots interact with their world or other bots, besides encouraging them to stay in specific areas that are the right temperature, which isn't all that interesting strategically.
Title: Re: Organelles, better multicellular organisms, and more
Post by: NotLegalTender on April 21, 2013, 11:10:13 PM
What about being able to set the temperature, ph, salinity, and more as well? And then this should allow for extremophiles (maybe someone could make a water bear lol)

What effect do you want salinity to have?  Same with the rest.  I can add arbitrary things to the sim but they're meaningless abstractions unless they do something.  And as I explained above adding things for the sake of it is something I'm specifically trying to avoid.

Let's take temperature.  I'd probably add temperature if I joined it with the fluid sim to produce something that would create circulation.  But it doesn't seem like it'd have any meaningful gameplay interaction with bots, besides the obvious " too hot/cold for me".  And even then it's not clear how that would reflect in actual effects.  Would the bot have increased nrg costs if it was outside its ideal temperature range?  What decides a bot's ideal temperature range?  It wouldn't fundamentally change how bots interact with their world or other bots, besides encouraging them to stay in specific areas that are the right temperature, which isn't all that interesting strategically.

Well, a few gameplay interactions could be:

PH: Low ph dissolves shell, can damage and even kill organisms incapable of tolerating it, high ph increases toxicity of other substances, and can also damage and kill organisms incapable of tolerating it. Also, ph could also affect breeding

Salinity: Affects osmosis. Freshwater organisms hold salt, saltwater organisms excrete excess salt.

Temperature: High temperature denatures proteins and such. Can't think of much more for this, other than maybe ice formation, and some organisms incapable of regulating body heat like warmer conditions.

Also, another small idea that should be added is being able to manually give bots energy, like you can manually reproduce bots by clicking on them.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Peter on April 22, 2013, 01:26:39 PM
I rather like the idea of some fluid dynamics, it opens quite some possibilities. At the same time I'm afraid it'll take up too much computing time.

What would be the cost of circulation/diffusion? (it seems expensive)

Another question is to what level should the fluid properties be simulated? Should water freeze when it's below freezing point? Should salts have an effect on the freezing point? Should pH have an effect on the salt? How much substances should there be, to what level can they react with each other.

What are the current plans in DB3 to increase diversity within one sim? So that multiple species have a habitat in different places in one sim.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Numsgil on April 22, 2013, 01:55:40 PM
Well, a few gameplay interactions could be:

PH: Low ph dissolves shell, can damage and even kill organisms incapable of tolerating it, high ph increases toxicity of other substances, and can also damage and kill organisms incapable of tolerating it. Also, ph could also affect breeding

But now is this really pH anymore?  I mean, we could call[ it pH, but in reality it's just an arbitrary collection of effects under the pH label.  Real pH effects organisms because cells are essentially chemical.  They take in chemicals, manipulate chemicals, excrete chemicals, etc.  The most fundamental chemical to a cell is water, since it's usually much smaller than any other chemicals it manipulates and so permeates everything inside and outside of a cell.  pH is basically the ionization of water, so pH represents a fundamental physical property of a cell's universe.  Cell's even have "proton pumps" which try to change the ionization of the interior of a cell or organelle from the exterior, to create gradients to do useful work with.

Bots, on the other hand, don't exist in water.  They're not chemical in nature.  They don't recombine basic building blocks in to larger, more complex molecules.  And their medium is essentially vacuum.  pH has no meaning in the universe a bot inhabits.

In a broader sense, we could try to add substances with different concentrations, which is what I was talking about with diffusion.  But again, I'm not sure it's doable in an efficient manner.

Quote
Also, another small idea that should be added is being able to manually give bots energy, like you can manually reproduce bots by clicking on them.

That's easy, yeah.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Numsgil on April 22, 2013, 02:27:17 PM
I rather like the idea of some fluid dynamics, it opens quite some possibilities. At the same time I'm afraid it'll take up too much computing time.

What would be the cost of circulation/diffusion? (it seems expensive)

Normally fluid works by using a giant grid and doing operations between neighboring grid cells to propagate velocity, diffusion, etc.  This is called "discretizing the domain" using a "Eulerian" perspective, and is actually entirely impractical for Darwinbots, just because of how big a bot's universe is.

Another method for doing fluid is to use particles to represent properties of the fluid, and have those particles move around and circulate. This is a "Lagrangian" perspective.  "Finite element" methods simulate the fluid as basically a huge number of circles/spheres, which works well for things like water pooring in to a bucket.  But it's still wildly impractical for Darwinbots.

Finally, there's a Lagrangian method that only simulates the "vorticity" of the fluid.  That is, its spin/whirlpoolness.  An unmoving block of fluid has zero vorticity, so it costs 0 memory and CPU cycles if the fluid domain is empty, and then scales from there.  So it's very well suited to something like Darwinbots.  But that's only half the battle.  The other half is preventing the fluid from penetrating a boudnary like a wall or a bot.  Without getting too technical, you can simulate this as a collection of fluid particles that are stuck on to the surface of a boundary and update every cycle to prevent fluid velocity from penetrating the boundary.  If those particles also push on the boundary, you've got the coupling between rigid body physics and fluids basically working.

This is the approach I'm exploring with Darwinbots, except I'm only calculating the boundary particles and ignoring the normal free-floating particles.  It should be approximately as expensive as the calculations for bot vision (which bot can see which other bot).  So expensive, but definitely doable.  Right now I have a simulation with a square spinning and translating through a fluid with 1000 tracer particles in it that runs in 0.5 ms (2000 cycles/sec).  Based on that my guess is that each 50 bots will cost 1ms for fluid simulation.  And that doesn't count speedups that are possible using SSE/AVX or multithreading, so in final Darwinbots if you throw your whole computer at it you might be able to do more like 400 bots' fluid calculations in 1ms (1000 cycles/sec).  And that number might increase 5-10x again if we can get GPGPU working, but that's in the distant future.

Quote
Another question is to what level should the fluid properties be simulated? Should water freeze when it's below freezing point? Should salts have an effect on the freezing point? Should pH have an effect on the salt? How much substances should there be, to what level can they react with each other.

Each additional aspect of fluid increases the computational cost, possibly substantially.  Right now I'm assuming that the fluid is isothermal (doesn't change temperature), inviscid (imagine thick molasses.  Now imagine the exact opposite of that) and incompressible.  It will have density (and so impart momentum on things in it), but that's about it.  Which means things like flocking geese would work, as would squid-like propulsion and undulating fish swimming.  At least in theory :)  I'll know more in a few weeks/months.

Diffusion would have to be simulated using essentially tracer particles (massless particles which float in the fluid), but we'd need a lot of them for it to simulate effectively, and I think it would be too expensive.  But there might be more intelligent tricks you can do to make it more feasible.

Quote
What are the current plans in DB3 to increase diversity within one sim? So that multiple species have a habitat in different places in one sim.

Right now the main driving factor would be size.  I should be able to simulate something like a whale eating plankton.  The tactics a bot would have to use to feed on things larger, similar, and smaller than it are all quite different, so that should open up some interesting niches.

If fluid works out, and you disable the voluntary .up etc. commands, you'd need another bot to move at all, which would encourage multibot cooperation.

I also plan on having shapes in the world that bots can physically dig inside of.  So you can have something like an ant colony, sediment on the bottom of a sim that builds up from stuff going on higher up, etc.  Which should provide different ecological rolls.

And of course chloroplasts encourage one species to become sessile, passive, gigantic and defensive (the plant) and another to become mobile, lean and aggressive.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Peter on April 22, 2013, 03:25:16 PM
Thanks for the elaborate explanation. :)

Is the speed based you get on your new monster or my snail. :P

What happens with the normal free-floating particles. If they were just set into speed by a moving bot, would they stop moving if the bot isn't in the boundary anymore?
Title: Re: Organelles, better multicellular organisms, and more
Post by: Numsgil on April 22, 2013, 04:20:48 PM
Thanks for the elaborate explanation. :)

Is the speed based you get on your new monster or my snail. :P

My beast :)  It's running a Sandy Bridge Intel chip at 4.2 Ghz.  On your 2.4 Ghz chip, expect the time to be double to triple that.

Quote
What happens with the normal free-floating particles. If they were just set into speed by a moving bot, would they stop moving if the bot isn't in the boundary anymore?

If a bot stops moving relative to the fluid, it won't effect it anymore really.  If it's the only thing in the world, basically all the particles stop moving.  For tracer particles anyway.  If I add in the vorticity particles they'll actually induce spin in the fluid on their own, and get moved by the fluid, and produce interesting wake patterns, but they're more expensive to simulate.
Title: Re: Organelles, better multicellular organisms, and more
Post by: Peter on April 22, 2013, 06:22:35 PM
Back to organels, I think I would like a organel that converts a (eatable) shape into nrg. :)
Title: Re: Organelles, better multicellular organisms, and more
Post by: Numsgil on April 22, 2013, 06:52:56 PM
Back to organels, I think I would like a organel that converts a (eatable) shape into nrg. :)

I was thinking more that shapes could be used for things like shell, but directly digesting them could work, too.  That would free up the need for doing anything with diffusion certainly.  Instead of dissolving things in the fluid just have solid chunks of stuff that can float around or fall to the bottom or whatever.  Probably not all shapes are digestible, which would imply a need for different substances for shapes.  Which is an idea I'd like to play with anyway, but I need to be careful to keep the number of different resources to a manageable minimum.
Title: Re: Organelles, better multicellular organisms, and more
Post by: penlu on June 09, 2013, 03:36:42 AM
I had an idea about organelles that is probably too different from how it is in Darwinbots now.  So this is abstract, but:

Mitochondria or some such:
body -> waste + nrg

Rough ER or something?  What handles this in real cells?
waste + nrg -> body

Chloroplasts, with light:
waste -> body

With corpses floating around, this means conservation of mass.