Darwinbots Forum

Code center => Suggestions => Specialization, Metabolism, Digestions and Env Grid => Topic started by: Numsgil on March 16, 2005, 12:07:58 PM

Title: Darwinbots enzyme system
Post by: Numsgil on March 16, 2005, 12:07:58 PM
Here it is, written into a document.  Lucky you.

Note that this is different from the system to specialize in actions like shooting and moving, etc.  Related, but seperate.
Title: Darwinbots enzyme system
Post by: Botsareus on March 16, 2005, 12:44:04 PM
Thats a nice document and all. But I still have no Idea how to design my own Enzimes , Shvartz did you get it? help me out.

If I can't understand it, I cant see what robots mutated and Injoy.

I think we need a Detailed document, describing each specific enzyme and muta-enzyme , ( what effects does this enzyme have on the motabolism of the robot? How do this enzymes look like incoded into the robot save file?)
Title: Darwinbots enzyme system
Post by: Numsgil on March 16, 2005, 12:52:10 PM
I specifically made it so you can't design your own enzymes per se, but you can run some simulations to find good ones.  And then make a document somewhere where you store your uber impressive enzymes.

Near the end of the document, you see this:
Quote
My bot has mutated.  What are all these new enzymes doing?

Within the program an enzyme analyzer will be added.  Simply copy and paste an enzyme into the analyzer and it will tell you all the substances the enzyme acts one, what it turns those substances in to, and how efficiently it does all that.

So to figure out what an enzyme does you copy and paste it into a field and the program will tell you what it's doing.
Title: Darwinbots enzyme system
Post by: Botsareus on March 16, 2005, 12:56:05 PM
O , kool
Title: Darwinbots enzyme system
Post by: PurpleYouko on March 16, 2005, 01:30:16 PM
The good thing about this is that an almost infinite number of possible enzymes is available but we can never know the best ones except by trial and error.

Nice system  B)

The only thing I don't like is that the DNA file would be able to actively encourage an enzyme to be produced. Should leave it all down to behind the scenes nature to do that in the method described.

If it's in the stomach then digest it with available enzymes and eject the rest as waste which then just enriches the environment stored in the e-grid

How about a limit to the number of possible enzymes that a robot can produce. without a limit the robot could become the ultimate carnivore while still retaining photosynthesis.

Maybe certain enzymes have to be mutually exclusive but then even that will have problems. For instance I would like it to be possible for a photosynthesizing robot to gradually mutate carnivorous tendencies. The way I see it with this system (as it is outlined) the robot could become able to eat flesh without losing the photosynthesizing enzyme.

Again there would be no incentive for any robot to lose one specialization in favor of a different one. I also don't see how it could be a gradual change (taking from one to give to the other) Robots would tend to keep both and that would be just plain unfair  :(

 :D  PY  :D
Title: Darwinbots enzyme system
Post by: Numsgil on March 16, 2005, 01:42:35 PM
That's why I searched for 'why aren't all animals omnivores' I was telling you about before.  As schvarz has been contending for a while, there's nothing stopping real creatures from producing all enzymes possible.  So why don't they?

I'm not against any of the suggestions you've made.  In fact, at first glance they'd be my idea too.  But I'd like to see if schvarz is right or not.  What do you think schvarz?
Title: Darwinbots enzyme system
Post by: shvarz on March 16, 2005, 01:42:40 PM
I think I understand how the system is supposed to work.
What I like about it is complexity - there is a lot of it, allowing A LOT of possible combinations.
What I don't like about it is complexity - it is hard to grasp the causes and effects in this system.  If some bot finds a bug in the program that would allow it to become super-bot, it would be very hard to trace it.  It is also hard to judge if a super-enzyme is possble in this system.

Also, what I don't like is all this conspiracy with shuffling - it begs to get hacked :)  

I am OK with enzymes produced from DNA code.  But how do you do that?

cond
start
EA45A
mkenzyme
stop

???

How do you mutate this gene?  What if the "name" that is mutated is not in the list of enzymes at the end?

Finally a big question - could you give more details on how the enzymes would affect metabolism.  You mention briefly in the file, but I want more info.  Where are all those 20-30 reactions coming from?  Sounds like a lot to me...
Title: Darwinbots enzyme system
Post by: Numsgil on March 16, 2005, 01:56:16 PM
I'm still collecting all the reactions, but there are alot.

Basically you have all the stuff bots can have in their bodies that's digestible.

Then you have photosyntehsis.

Then you have the sulfur cycle.

Then you have the nitrogen cycle.

Then you have a few isoalted reactions, like oxidizing iron with sulfur.



The complexity of the system definately is daunting.  In the DNA, this is how I'd imagine stimulating enzyme production:

100 .fat .stimulate

This would trick the stomach into thinking that there's 100 more fat in the stomach than there really is.  That would prompt the stomach into trying to produce extra fat digesting enzymes.



Yeah, there's definately a huge possibility for it to be hacked.  I can't stop that.  Best I can do is make a .dll so the source code for enzymes aren't visible to the end user.

I just really want users to experiment in mutation sims for new enzymes.  I don't want us to write 5 or 6 and forget any others.



It is possible to come up with 'uber proteins' that digest everything, but since they're so expensive (the longer the enzyme, the more it costs to make) they'd only be useful under the right circumstances.

Also, since it's possible for one activation site to overlap with another activation site or the efficiency code, you might see a mutation wreck an enzyme's ability to digest A while making it better able to produce enzyme B.
Title: Darwinbots enzyme system
Post by: shvarz on March 16, 2005, 04:54:46 PM
[hint]I'd love to see all this metabolism.... [/hint]

But you are probably scared that I'll criticise it to hell..... :pokey:
Title: Darwinbots enzyme system
Post by: PurpleYouko on March 16, 2005, 05:14:01 PM
Ok then here is one interesting point which may actually work to the benefit of your system.

Nitrogen cycles (Nitrobacter, nitrosomonas) need ammonium and zero Oxygen. They are anaerobic bacteria by default.
Normal enzymes need the presence of Oxygen.

It would be a little on the impossible side for both of these to be active in the same robot.

On the other hand, it is feasible that one robot could perform both these operations under different e-grid conditions.
In some circumstances Nitrobacter can be persuaded to work in the opposite way to cleave the nitrate molecule into gaseous Nitrogen and Oxygen, using a small amount of the Oxygen as fuel.

I think I would just like to see how all this works out.  :D

The e-grid and niches will play a large part I think.

 :D  PY  :D
Title: Darwinbots enzyme system
Post by: Numsgil on March 16, 2005, 05:20:36 PM
Okay, this is what I have so far.  Not all of them are balanced, it's still a work in progress.

Light + CO2 + H20 -> carbs + O2
Light + CO2 + H2S -> carbs + H20 + S (poisoned by O2)
S + H20 + O2 -> 2SO4 + nrg
H2S + CO2 -> S + H20 + carbs (or nrg)
FeS + H2S -> FeS2 + nrg
NH3 + 3O2 -> NO2 + H20 + nrg
NO2 + O2 -> NO3
digesting fats -> fats
digesting nrg -> nrg
digesting carbs -> carbs
metablozing poison (ie: this is how poison is cleaned from the system after you eat it.  Without this, you have to wait until you pass it out through your waste)
metablozing venom
digesting muscles -> proteins
digesting proteins -> proteins
digesting limestone(calcium) to use in shell
digesting silicate to use in shells
digesting slime -> carbs

(not sure about these)
digesting protiens -> NH3 + CO2 + nrg + aminoacids
NO3 + carbs + aminoacids-> proteins + O2
amino acids -> nrg?

That's all I've been able to find so far.  The last three are just my guesses, but the rest have been preened from one source or another.  The problem is I'm coming up with stuff as I go along, so I'm sure I've missed all kinds.

If you know a link to a list of all the reactions cells do to create energy, I'd love to have it!
Title: Darwinbots enzyme system
Post by: shvarz on March 16, 2005, 06:09:40 PM
How far are you on coding these?
I assume that all these compounds can make it to the stomach (including light and CO2).  Is that the idea?

My personal feeling is that iron and sulphur reactions are a waste of time.  These are such marginal scenarios, almost no one uses them anymore, why bother coding them in?  They are low efficiency/low energy type of metabolism and they are killed by the presence of oxygen (even in small amounts).  I would drop them for now.  Also, I would drop water, CO2 and O2 out of equations.  We must assume that these are available, unless we simulate a) some weird ecological niche or B) large-scale changes in Earth's biosphere.  Besides, it makes metabolism so much simpler and easier to follow.

Here are those that I do like:

Photosynthesis:
Light -> carbs

Digestion:
digesting fats -> fats
digesting nrg -> nrg
digesting carbs -> carbs
digesting proteins -> proteins

Conversion:
fats<->nrg
protein<->nrg + NH3
carbs<->nrg

Degrading stuff:
posion -> nothing
venom -> nothing
shell -> nothing
slime -> nothing

-------->digesting muscles -> proteins (what are muscles? muscles=proteins)

Extracting resources (I would not even put them in env.grid, just assume they are there):
nothing -> calcium
nothing -> NO2

Making shells and slime and venom and poison:
calcium -> shell
protein -> shell
carbs -> shell
carbs + protein -> slime
protein -> venom
protein -> poison

Extra reactions:
NO2+nrg ->NH3



In this form, we have pretty much complete metabolism.  Maybe I missed something, but I don't see what it is.
Title: Darwinbots enzyme system
Post by: Numsgil on March 16, 2005, 06:28:50 PM
The idea is that in the final system adding compounds or changing or adding reactions is trivial.  Plus, I love complexity.  Anything that can lead to emergence (http://en.wikipedia.org/wiki/Emergence).

O2 and CO2 were first proposed way back in the old board (http://darwinbots.proboards20.com/index.cgi?board=general&action=display&num=1108037551).

There are some sulfur reactions that happen in black smokers that aren't poisoned by O2.  Also, there might be some places where there is low oxygen (say because of depth (oxygen sollubility changes with pressure)) where anaerobic processes can occur (in the soil for instance.  Or in a primitive sim you're running where you want to simulate the gradual poisoning of the atmosphere with O2).

I'm going to seperate proteins and muscles, so proteins + (nrg, carbs, or something else or nothing at all) -> muscles.

That's because muscles require upkeep, so you may want a large protein store without having them do anything.  There are a few other reasons too...

Things like silicate and limestone were going to be included in the grid so they could act like temporary walls that would have to be carved away.

Then ant bots could actually tunnel through the sand to form nests.  Very exciting possibilities.
Title: Darwinbots enzyme system
Post by: shvarz on March 16, 2005, 09:49:20 PM
Complexity is good.  If you imagine metabolism being a convoluted network, then all these sulphur-iron reactions are tiny half-dead branches in that network.  If you want complexity, I can give you real complexity of real metabolism :)

For example, if you want to play with anaerobic conditions, then you can split the reaction:

carb->nrg

into these:

carb->pyruvate+nrg
pyruvate->lactate+nrg
pyruvate+O2->CO2+lots of nrg

Same with nitrogen cycle, with aminoacids, etc...  Just ask for complexity and I'll provide :)

Back to our discussion:

What is the reason to have both - limestone and silicate?  Can't we just do with one?  Seems like a redundant system.  How are these going to be walls?  Env.grid locations that cannot be crossed?  Interesting idea....

Upkeep is necessary for all proteins - muscles and enzymes.  Are we going to recycle either of these?  They usually are recycled, but I don't know if that would make a big difference to us. One thing to add.  We can make bots to create stock of "proteins".  When an enzyme or a muscle is made, it has to take one of the proteins.  If none are available, then enzyme/muscle is not created.

I guess we can add C02 and 02.  But here is the problem I see: the presence of gases is not yes/no case.  It is a matter of efficiency.  In env. grid if a location has a single O2 molecule, that molecule will be extracted and used.  But in real life the air with tiny amount of O2 is simply not usable for us.  How can we simulate this?  My inclination is to leave it aside for now...
Title: Darwinbots enzyme system
Post by: PurpleYouko on March 16, 2005, 10:28:58 PM
I don't really see a problem with CO2 and O2 although I do see what you mean.

The way I see it, the value in the e-grid will be pretty large most of the time anyway. When a robot performs an operation requiring Oxygen, the efficiency of the operation will be governed by the amount of O2 in the grid at his location. A small amount will be removed and replaced with CO2.

As the robots use up more and more Oxygen they will get more sluggish until they are almost unable to move or do anything. The veggies will be constantly converting CO2 back into Oxygen so a kind of veggie-carnivore equilibrium should eventually form.
We would also need to simulate diffusion from the water to the air for both of these types but it shouldn't be too large an amount, another options setting probably.

 :D  PY  :D
Title: Darwinbots enzyme system
Post by: Numsgil on March 16, 2005, 11:00:12 PM
I want complexity!

Chemistry was never my thing.  I understand it in theory, but I always get muddled in the details.

I'd like the terrestrial variety and whatever they're using in the deep sea black smokers.

Oh, and I should say please.  Don't forget the magic word ;)
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 10:42:05 AM
Why? Is Shvartz trying to simplify things again? It's still all crazy to me so...
Title: Darwinbots enzyme system
Post by: shvarz on March 17, 2005, 11:14:07 AM
If I understand correctly, the system is going to be quite open, so we can start with basics now and add more reactions later.  Thing with metabolism is that everything depends on everything and complexity increases exponentially (maybe even steeper).  

I thought some more about this enzyme system.  I'm with PY thinking that this system actually much better represents my "mutation accumulation" theory than your "pleiotropic effect" theory.  Imagine a basic enzyme that has only 14 bits, with middle 8 bits representing the "enzyme" and three on each side to define its efficiency.  Given enough slective pressure such enzyme would mutate pretty quickly to gain maximum possible efficiency, as there are no disadvantages to that.  It is going to be very cheap and very good.  So the optimal set of enzymes would reduce to a set of short enzymes that are very good.  The best organism will be the one that has enzymes to eat pretty much any type of food available in the system.  And it would not even pay that much for them (enzymes are very short).

The balancing effects that you describe come from overlapping enzymes, but there is little incentive for bots to keep them overlapped.  We can make the incentive bigger if we make all enzymes to be in a single line of bits.  Then non-overlapping enzymes will make the line too long and bots will be forced to have overlapping sequences.  Say we have total of 20 enzymes available and we design costs of enzyme production to be unreasonably expensive for a string over 140 bits.  This will make impossible for bots to have more than 10 non-overlapping enzymes and hopefully will force them to start overlap enzyme sequences.
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 11:23:51 AM
Quote
Given enough slective pressure such enzyme would mutate pretty quickly to gain maximum possible efficiency, as there are no disadvantages to that. It is going to be very cheap and very good. So the optimal set of enzymes would reduce to a set of short enzymes that are very good. The best organism will be the one that has enzymes to eat pretty much any type of food available in the system. And it would not even pay that much for them (enzymes are very short).

I think thats a Perfict system Shvartz! Why dont you think so?

I love very cheap and very good , because the robots still have to win agenst each other right? They are not figting you shvartz right? I mean all you do is make up cheat codes , but you not even fighting them.
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 11:31:04 AM
Okay, so we're basically in agreement to limit the total number of enzymes a bot can have?  I'm not sure how enzyme length and cost should correlate.  Either linearly or exponentially, or maybe some other system.

20 may be too many enzyme slots.  I'm really not sure.  I really have no idea how natural selection would affect them.  Having a single enzyme that can be infinitely long is an interesting idea.  I would say something like 7-13 enzyme slots would be about right, depending on how in depth and detailed we make digestion.
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 11:32:44 AM
How may enzime slots do real organisms have?
Title: Darwinbots enzyme system
Post by: shvarz on March 17, 2005, 11:35:49 AM
Yeah, limiting the number of slots is another way to approach this.  I agree.

P.S:  In some thread someone asked if any scientists are interested in DBs.  I am a scientist, so there you go :)  As I said, as soon as new version comes out I'll advertise it to my buddies.  Would be nice to update the web-site too (I could do that if no one else wants, but I'll need to get access).  Is Carlo still around?
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 11:39:25 AM
Quote: "It's still all crazy to me so... "

I did try to asking some qustions to figure it out, but it looks like they are ignoring me through the whole forum tuday not only in this thread.
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 11:51:13 AM
It's because you keep asking questions we've already discussed at length...

1.  Schvarz is not trying to simplify things necessarily, he's just hashing out how the system would work.  There are still a few fine points that need to be reviewed.

2.  Real organisms have, it seems, infinite enzyme slots.  Schvarz posted two very good links on two different theories on eating digestion and specialization not more than a day or two ago.  I'm too lazy to find the exact posting...

3.  'It's still so crazy to me'.  I hate it when people ask general questions.  'I don't get it.'  'Huh?' 'That doesn't make any sense'.  "Can you explain it again."

I'll answer all those general questions for you here with my own general answers:

1. It's not crazy.
2. Tough
3. No, I can't explain it again.

If you want a better answer, ask a specific question.

like:

"Gee Numsgil, I don't understand how the program interprets the enzymes.  Is it possible for activaton sites to overlap?"

-or-

"I don't understand what you mean by a string of bits.  Sounds like some kind of candy necklace to me.  Mmm... candy."

Then I can answer you and address your concerns.
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 11:54:41 AM
Hmm \\ I was only asking how many enzimes real organisms have

'well then I gess each slot must be really simple in real organisms and in our system we make it more complex if we want to have only 7 slots
Title: Darwinbots enzyme system
Post by: shvarz on March 17, 2005, 11:55:17 AM
Bots, if we wanted, it would be extremely easy for us to make perfect bots.  Take alga minimalis, throw it in the sim alone and give it plenty of food - it will conquer the world.  The point is not to create bots that are very good in environment that we give them, but bots that represent real life with all its imperfections, balances and tradeoffs.  The system that we have right now allows creationf of "cheap and good" bots, but no one is absolutely happy with it.  It's the other way around - everyone (including me) wants to make life more difficult and complicated for bots, because harsh and complex conditions lead to appearance of specilized and complex bots.  Does it make sense?
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 11:57:29 AM
ok , teaches me not to talk were people are talking about stuff I dont understand. Don't reply , I still have a problem in "Advanced Randomness Generation Thread" we need to sort out.
Title: Darwinbots enzyme system
Post by: Zelos on March 17, 2005, 03:22:13 PM
I like the system numsgil have came whit, cant see any problems whit it. If it cost to have many enzymes active and have big enzymes the bots wont allways create as many possible. but still there shall be a limit, I think less than 10, feels best. thats a amount which I think would force them to specialize. buts numsgil, why do you have 2 reactions whit H2S + CO2? sounds kinda stupid unless the 1 whit light gives 2 carbs. how about this list:
Light + CO2 + H20 -> 3 carbs + O2
Light + CO2 + H2S -> 2 carbs + H20 + S (poisoned by O2)
S + H20 + O2 -> 2 SO4 + nrg
H2S + CO2 -> S + H20 + carbs (or nrg)
FeS + H2S -> FeS2 + nrg
NH3 + 3O2 -> NO2 + H20 + nrg
NO2 + O2 -> NO3
carbs + O2 -> 5 nrg
carbs -> nrg (lifge can break down glycose by it self to get energy, not much but some)
digesting fats -> fats
digesting nrg -> nrg
digesting carbs -> carbs
metablozing poison
digesting muscles -> proteins
digesting proteins -> proteins
digesting limestone(calcium) to use in shell
digesting silicate to use in shells
digesting slime -> carbs
digesting protiens -> NH3 + CO2 + nrg + aminoacids
NO3 + carbs + aminoacids-> proteins
protein + nrg -> muscle
amino acids -> nrg

how about it?
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 04:05:21 PM
We can figure out the reactions as we go along.  Ideally the enzyme sytem will exist independantly of the reactions.  (If that just blew your mind, get off crack :P)
Title: Darwinbots enzyme system
Post by: shvarz on March 17, 2005, 04:15:40 PM
I am still not covinced about the benefits of having O2, CO2 and H20.  The change in atmosphere took millions of years, we are not even approaching this level of modeling.  

Are you thinking about having these in env.grid?  With what values (how much per location)?  CO2 does not exist in form of gas in the water, how are you going to approach that?  

I think we should just assume that there is enough of each in the sim, so that bots don't have to worry about that.  Maybe have "aerobic/anaerobic" checkmark in options.

And why are people so hot on oxidizing sulpher/iron?
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 04:17:38 PM
I really wanted to model deep sea trenches, with the tube worms and everything.  Call it a fetish.

I was originally against gases.  Now I have no feelings either way.
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 04:49:06 PM
The idea is that robots feed on the e-grid before they figure out how to photosynthesize or hunt for food. Don't forget that.

----
I also feel we should just get Num's system coded and then release it to the public if people don't like somthing about it then we will change it later.
Title: Darwinbots enzyme system
Post by: PurpleYouko on March 17, 2005, 04:56:32 PM
Quote
I think we should just assume that there is enough of each in the sim, so that bots don't have to worry about that. Maybe have "aerobic/anaerobic" checkmark in options.

What if you want aerobic and anaerobic in the same sim?

I always think of DB in terms of water so I would see the gasses as being dissolved in water at varying concentrations. They would be stored in various different levels of the e-grid.

I haven't really given that much thought to the mechanics of it yet.

 :D  PY  :D
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 04:58:33 PM
Problem is right now 'my system' is a handful of really silly reactions (zelos caught a duplicate even).

schvarz, I'm serious on this (or anyone else who wants to go through the work).

If you can come up with a list of reactions that represents the majority of single steps in:

1. terrestrial organisms
2. primitive organims (so we could have long running simulations of the evolution of biochemistry) (we could always just fake this by having a large amount of nrg actually available from the grid).
3. deep sea trenches.

And any other odd or unique reactions you can think of I'll adopt it in a minute.  I hate chemistry.  It does things to my mind... :bash: :pokey:

The only chemistry I can stand are the parts that overlap with physics (nuclear reactions and electron shell configurations) and biology (not the organic compound nomenclture though, I'm talking about things like the physical deformation of the molecular structure of enzymes).
Title: Darwinbots enzyme system
Post by: PurpleYouko on March 17, 2005, 04:59:20 PM
Just had a thought.

Are some of these bit pattern "enzymes" going to make the robot alergic to certain things as well as giving them advantages with others.

Maybe a particular bit pattern might allow a robot to eat veggies real well but at the same time make it take a small amount of damage from sunlight. We could get nocturnal critters that hibernate in the sediment during the day time.  B)

 :D  PY  :D
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 05:03:39 PM
How you would have anaerobic and aerobic in the same sim:

Imagine two worlds connected through a single small apeture.  This would be a non-toroidal sim with a wall running down the middle with only a single break in it.

Imagine this break is at the point where oxygen solubility is at the lowest in both worlds (this would be semideep water if you follow the oceanic model).

One world could exist as oxygen based, the other as anearobic.  At the threshold between the two organisms might learn to feed on the odd mixture of the two worlds.

Then the question becomes: will life forms at the threshold compensate for the power of diffusion?  Will the O2 world eventually poison the anearobic one?

Ooo, this is exciting!
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 05:07:55 PM
I suppose some kind of 'allergy' system could be implemented in the enzyme engine.  It's really not technically infeasible.

Many anearobic processes are kind of 'allergic' to oxygen.  I'm not sure really.

I guess we could have something like:

X+Y - Z -> A
where - Z is the allrgen.

The most basic consequence is that it makes the reaction not work.  If we want more advanced consequences we'd have to work it out.
Title: Darwinbots enzyme system
Post by: PurpleYouko on March 17, 2005, 05:11:12 PM
Quote
Ooo, this is exciting!

Oh yes!

It is rather isn't it old boy?

Another place where both exist is in everybodies fish tank (if it is a little sick anyway).

Way down there in the gravel where little Nitrobacter chugs away on that Ammonia, tirelessly making Nitrites. Sometimes he gets a little clogged up and can't find enough Oxygen for the redox reaction so he starts to go the other way and makes stinky sulfides instead.

Ever noticed on a beach if you dig down you often get a smelly layer of grey or even black sand? That is the work of our little Nitrobacter and his pal Nitrosomonas when they run out of Oxygen.

You already added a "sediment depth" function so all we have to do is to dramatically reduce the diffusion rate below the sediment floor.

I like your idea too  B)

 :D  PY  :D
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 05:22:11 PM
We need a realli advanced tool for editing the environment grid.

It would need to have ways of quickly editing the whole field, setting up gradients that follow a f(x) type function, setting up sinks and sources, etc.

Something between a simple paint program and something like a RTS map editor.  More complex scripting abilities would tie into this.

Daunting.  Look for it after 3.0  :P
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 05:25:01 PM
If we want organisms to be able to perform anearobic reactions underneath soil we need a way to get them under the soil.  I'm still not sure how things like sand and limestone (and walls, which I guess are like bedrock) would work.  Alot of ideas, just no idea how to implement them.

Like what is the carrying capacity of a single env grid square?  If you have lots of heavy stuff on top does gravity increase the carrying capacity as it squishes stuff together?  Speaking of gravity, how does it affect diffusion?
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 05:32:36 PM
Quote
We need a realli advanced tool for editing the environment grid.

It would need to have ways of quickly editing the whole field, setting up gradients that follow a f(x) type function, setting up sinks and sources, etc.

Something between a simple paint program and something like a RTS map editor. More complex scripting abilities would tie into this.

Daunting. Look for it after 3.0

Wow slow down there , I think the program should randomly engineer the environment (things must randomly be plased/configured) and the environment should change over time.

Look how it works now:
lets say you set the range of plants across the whole screen:

The program randomly creates patches of plants , and the patches move , appear or disappear over time.
Title: Darwinbots enzyme system
Post by: shvarz on March 17, 2005, 05:36:05 PM
Please don't use the term "allergy".  What you are talking about is plain toxicity.

Nums, about your

One thing I just realized is that
Quote
If you can come up with a list of reactions that represents the majority of single steps in: blah-blah


I can do it, but this is a lot of work.  

About primitive metabolisms - does it matter where the energy to organism is coming from?  For some it comes from light, for others - from chemical compounds, but in the end it is just a way to grab some energy from environment - the further steps are quite similar.  I am too lazy to figure all that stuff out.

How about this - I make up a set of rules for basic plants and higher animals.  If other people want, they can always add to that.

P.S: I'll include the CO2, O2, H2O, but...  you know...
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 05:37:21 PM
Random settings are fine if you don't have a particular scenario in mind, but let's say you're a researcher using DB for an experiment.  You'll want to be able to set some very specific parameters.  That's what I'm talking about.
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 05:37:45 PM
The order of posts is messed up;

Ok Num , thx for including that.
Title: Darwinbots enzyme system
Post by: Numsgil on March 17, 2005, 05:41:28 PM
Whatever you're willing to do schvarz.  Seriously, thinking up all the reactions gives me a headache.  Every source I consult has a different way of representing it.  I don't have the training to make a single, all-encompasing system.
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 06:08:49 PM
Thats why I sayed lets make one system already, and then Add or Remove from it later.
Title: Darwinbots enzyme system
Post by: shvarz on March 17, 2005, 06:28:31 PM
I just had a crazy idea.  I did not have time to think about it, so it is totally out of the blue.  But here it is anyway:

We actually code in the molecules as strings of bits.  Then enzymes will be self-defined as their strings of bits will define which molecules they convert to what.

Carbon has four oxidated states as part of carbs and we define them through three-bit system:

CH2 --> 111
CHOH -->110
CO --> 101
COOH -->100

Then glucose would look like this (I'll separate carbon atoms by periods, but in the program we would not do that):

101.110.110.110.110.110

In this system 000 would serve as a "space" that separates different "molecule-words"
And we can even have designations for
CO2 - 011
H2O- 010
O2 - 001

As I said, crazy idea.  But fun...
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 06:31:41 PM
SHVARTZ THE MORE WE "TALK ABOUT IT" THE LONGER THE "ACTUAL CODING" IS BEING DELAYED , I THINK ITS  TIME FOR US ALL TO BE QUITE LONG ENUGH FOR THEM TO ACTUALY CODE 3.0 AND RELEASE IT. THEN WE CAN TALK ABOUT IT FOR 3.1 OR SO.
Title: Darwinbots enzyme system
Post by: shvarz on March 17, 2005, 06:49:38 PM
Nah, I don't see this coming out it V.3, so that should not be a problem.  The enzymes and metabolism are pretty far in the future.  This is all just throwing ideas out there for people to ponder on...

At least I thought that's how it is.  Right Nums?  We are just going to have proteins/carbs/fats system in 3.0, right?

Adding metabolism would be just another huge feature that would warrant the next shift in version number (to 4.0).
Title: Darwinbots enzyme system
Post by: Botsareus on March 17, 2005, 07:05:53 PM
Quote
The idea is that robots feed on the e-grid before they figure out how to photosynthesize or hunt for food. Don't forget that.

I think only Metabolism is going to let us do that. right?

P.S.

I have to Appreciate shvartz lest post. It’s the Govt. man
Title: Darwinbots enzyme system
Post by: Zelos on March 18, 2005, 05:16:01 AM
shvarz, as ive understand it the mebo (MEtaBOlism) system will be in 3,0. and ur system, I think ive came up whit a simulare things and said it to numsgil, not exacly the same but simular. when its about gravity, it doesnt effect the spread of something aslongest its not to heavy, and are liquid or gas. I like the idea of toxic, like a bot who uses the sulfur photosythensis, CO2 + H2S + Light, should be toxiced by oxygen. if om not misstagen the oxygen steals some electron or something like that which sabotage the entire reaction. while some using water photo uses the oxygen and arent toxiced by it :D . what I think is that we make the system you have came up whit numsgil, enzymes is a hexacode, some things are toxic to some reactions, you can have alimited amount of enzymes
Title: Darwinbots enzyme system
Post by: Numsgil on March 18, 2005, 05:48:42 AM
The Mebo system is the last bit thing I want to include in 3.0.  After that is done, a few minor fixes, what PY's been working on in graphics, and we'll be done I think.

Don't worry about delaying the programming.  I'm taking a break from the DB source code for a few days to learn OpenGL.

Having the individual substances have their own bit patterns is a cool idea.

I was going to do something similar to it when reactions are read it.  If each reaction is an enzyme, you'll need a way of making and remaking the same unique activation site bit pattern every time the program is run.

That involves some kind of hash function.

The only drawback to what you've listed is that it increases the length of activation sites.  Which means it more closely models real life, along with the real length of enzymes (very long indeed).  Which means it may be harder to evolve new enzymes.
Title: Darwinbots enzyme system
Post by: Zelos on March 18, 2005, 06:32:41 AM
:( numsgil, I sugjested something simular and you didnt liked it :(

I cant wait for 3,0 :D will be so awesome
Title: Darwinbots enzyme system
Post by: Numsgil on March 18, 2005, 06:50:19 AM
Really?  I must have misunderstood.
Title: Darwinbots enzyme system
Post by: Zelos on March 18, 2005, 12:16:07 PM
yeah, but there I said for the atoms, like
S=001
H=101
then H2S would have 101,101,001 (,=to show its different atoms)
buts its basacly the same, instant of have to come up whit a bit code for each new reaction (I assume it will come more) you simply add them and then the program calculate what the bit code for it is, right now you would need 6 code, H,S,Fe,O,C,N is all the atomtypes ive seen, but for like carbs, fat and so it would need a customed code, but I think you get the idea. but if we use carbs to be like glucose it would have a long code. if we dont make it possible to tell the number after the type. glucose have the formula C6H12O6, if we say H=100, C=110 and O=101, the first 1 would represent its a element. and numbers would have the usual bit number, + a 0 in the front to tell its a number, like 1=01 2=010, you get the idea, so the bit number for glucose would be (once again ,=just to show its different things), 110,0110,100,01100,101,0110 its a long code but shorter than keep making c after c codes, this is just an idea, how you numsgil fix it whit programing I have no idea. think it could be hard making it seperate numbers from elements, unless it constanty check the list. that was my idea from the begining or something like that
Title: Darwinbots enzyme system
Post by: Mathonwy on June 30, 2005, 12:34:34 PM
Wow, interesting, and I'll have to admit I not sure I understand it all (in fact I'm pretty sure I don't). This suggestion seems to be progressing towards the idea of modeling the chemistry and reactions down to an atomic level, I might be wrong but doesn't that then introduce a whole set of rules to be added to cover what reactions are possible what atoms will form stable molecules, and if you start modeling that then would you need to introduce to the model the atomic structure of atoms, because the structure changes the properties ? For example Carbon; Diamond, Coal, Buckminster Fullerenes (carbon 60  - The surface is made from hexagons and pentagons and is an example of a semiregular solid called a truncated icosahedron) anything trying to use carbon will have to check it's current form and see if it has the energy to break that form, a headache waiting to happen I'm sure.

I'm sure the chemists amongst us could say far better than I if the rules governing such behaviour are simple enough to reproduce for modeling, however the question remains, is this level of detail required for what is being modeled ?

Thanks for reading,
Math.
Title: Darwinbots enzyme system
Post by: shvarz on June 30, 2005, 03:05:08 PM
There are (at least) two possible approaches to model biochemistry in DBs:
1. Take real biochemistry as an example, copy reactions and allow bots to do only those reactions that we introduce.  This is a fairly easy approach and I think we managed to come up with a system, which would be open-ended - we can start with a small subset of reactions and slowly introduce new steps/pathways in a way that is backwards compatible.
2. The second approach is not to rely on real chemistry at all, but instead invent our own set of molecules and rules through which these molecules can interact.  Then allow bots figure out the biochemistry on their own.

Right now we are almsot set on the first approach, although I do like the second one too ( I am sure Carlo would go with the second approach as well, if that matters to anyone).
Title: Darwinbots enzyme system
Post by: Carlo on July 01, 2005, 06:15:54 AM
Quote
There are (at least) two possible approaches to model biochemistry in DBs:
1. Take real biochemistry as an example, copy reactions and allow bots to do only those reactions that we introduce.  This is a fairly easy approach and I think we managed to come up with a system, which would be open-ended - we can start with a small subset of reactions and slowly introduce new steps/pathways in a way that is backwards compatible.
2. The second approach is not to rely on real chemistry at all, but instead invent our own set of molecules and rules through which these molecules can interact.  Then allow bots figure out the biochemistry on their own.

Right now we are almsot set on the first approach, although I do like the second one too ( I am sure Carlo would go with the second approach as well, if that matters to anyone).

That's not what "open ended" means. Open ended means that you expect robot to figure out their own way to use molecules and even build new molecules that you never thought of. The approach of defining each single molecule in the world, and then describing all the possible reactions between them, with all the energetic balances, and so on, is used in simulations of biological processes. There it makes sense. In darwinbots it makes no sense at all. Why should we define sugars, water, carbon dioxide, and so on, when our organisms have a DNA written in reverse polish notation, their genes don't produce proteins or enzymes but values in a memory array? What's the meaning of "sugar" with respect to a computer program like db's DNA? Simply, no meaning at all.
I think that DB should be a good metaphor of nature, not bad copy. I mean, we should not copy from the real world things like sugar, carbon dioxide, etc. If we want to have something that recalls a chemistry in DB, then

a) it must be because we understand that some of the complexity lacking in DB comes in the real world from the existence of a chemistry - and not because we want to mock up nature
b) we should create something that makes sense in the universe of db, and can give the complexity we're looking for. It has not necessarily to have to do with sugar and oxygen and ATP; it must only give the desiderd complexity, in the context of the db general rules and principles
c) if - I say if- there will be a parallelism between the system created for DB and real chemistry, it has to come from DB, and not from nature. I mean, you should not put sugar in DB because in nature you have sugar; but you may _discover_ an element of the DB system that seems a good metaphor of sugar, and nickname it "sugar".
Title: Darwinbots enzyme system
Post by: Greven on July 01, 2005, 06:42:36 AM
I must agree on Carlo here. DB needs to selforganize the things it self ;) No fun in already knowing what the outcome would be.
Title: Darwinbots enzyme system
Post by: Numsgil on July 01, 2005, 01:08:59 PM
As far as I know, the environment isn't supposed to be self adapting.  The bots are.

The bots don't get to know what does what before hand.  So if we just assign a bunch of random substances and relationships, or carefully model every real reaction in the universe, the bots won't be able to tell the difference.

So I'm not sure I see your point.  Perhaps you didn't read through the document in the first post?
Title: Darwinbots enzyme system
Post by: Botsareus on July 01, 2005, 02:08:06 PM
I think Carbon Dixoide stays , so we can model the really prehestoric cells that feed of volcano gas then evolve to be eather plant eaters or hunters.



I have a feeling this will turn out the way it turns out in DB right now , the plants will kill off all the hunters. :/
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 01, 2005, 02:28:24 PM
I agree Bots.

We need some metabolites such as Oxygen and CO2 in order to have anything like photosynthesis or Oxgen fixation by anaerobic bacteria.
We most likely need a few other things like Sulfer, temperature etc.

What we probably don't need is to model every chemical reaction between these with any kind of accuracy.

Photosynthesis (CO2 + light energy) = O2 into e-grid + increased body + energy - CO2 in the e-grid.

Very simple and without modeling the complexities of real world chemistry. Just multiply the effects by the relative efficiency level of the particular enzyme found in the bit pattern of the robot's DNA et Voila!
Title: Darwinbots enzyme system
Post by: shvarz on July 01, 2005, 03:02:46 PM
What Carlo is saying (and I see his point) is that we should devise a very abstract system at first.  If we devise the rules right, then there would be some molecule A, which can be combined with molecule B (using the energy that veggies receive) and form molecule C, which would be equivalent of body.  Then we can call (for our convinience) molecule A - CO2, molecule B - H20 and molecule C - sugar.  But we start with rules, not with molecules.  The rules should be such that they would allow creation of almost infinite number of different molecules.    Just like current DBs DNA language allows creation of almost infinite number of different DNA programs.
Title: Darwinbots enzyme system
Post by: shvarz on July 01, 2005, 03:15:28 PM
And here is why I thing Carlo is wrong:

Our goal is not to model biochemical reactions and chemistry.  It would be too ambitions and actually a step away from the original goal of looking at evolution.  Instead, we want to allow bots to make choices on how to utilize thier energy in best way to survive.

So we'll provide functionality directly, without giving bots access to all possible chemical reactions.  We can give them protein, fat, carbs and some intermediates and a way to convert these molecules into one another.  Each molecule would have different properties and affect bots in different ways: proteins require a lot of energy, but they allow cheaper/more efficient functionality, fats are a good long-term energy storage, carbs are good short-term energy storage and provide turgor.  

We cut out all the details of chemistry required to form these molecules, and allow bots to choose between them.  It is a shortcut similar to shortcut we make when we allow mutations to generate meaningful entrys (no commands like "fhshs" or "hds8d3" can appear).
Title: Darwinbots enzyme system
Post by: Numsgil on July 01, 2005, 04:07:12 PM
And just a technical note, every substance we add to the grid is a half meg of RAM.

100 usbstances are 50 megs of RAM.  1000 substances are 500 megs of RAM.
Title: Darwinbots enzyme system
Post by: Carlo on July 01, 2005, 04:13:25 PM
Quote
Our goal is not to model biochemical reactions and chemistry.  It would be too ambitions and actually a step away from the original goal of looking at evolution.  Instead, we want to allow bots to make choices on how to utilize thier energy in best way to survive.

That's ok. As I said before, our interest should not be in biochemistry in itself: if we feel the need to add some sort of biochemical system is because we noticed that DB fails in simulating some important aspect of evolution, and we correctly identified the problem in the complete absence of something like a biochemistry.
Here there are two things to say.

First, I don't think we want bots to make choices on how to utilize their energy. As you said, the good thing in DB is that DNA provides almost endless possibilities. There are other alife software in which the dna just specifies a few parameters, like probability of doing a certain thing or another. But that's optimization, not evolution. So, we want an open ended system, which instead of providing a few choices, could provied an entire world of different possibilities.
Second, that if we need something like a biochemistry, it must be something related to the DB universe, not a mock up of real world's biochemistry. So we should forget about CO2, O2, sulphur... all things which are totally meaningless inside the DB's universe.

Quote
So we'll provide functionality directly, without giving bots access to all possible chemical reactions.  We can give them protein, fat, carbs and some intermediates and a way to convert these molecules into one another.  Each molecule would have different properties and affect bots in different ways: proteins require a lot of energy, but they allow cheaper/more efficient functionality, fats are a good long-term energy storage, carbs are good short-term energy storage and provide turgor. 

But why then we don't simply give to each robot an array of parameters, each specifying the ability to digest something, and state that the total sum of the array must be fixed to, say, 100? It would be an easy and effective way to force robots to specialize. The only problem is that it would be clearly not open ended, and we don't like this. So we need to hide an equally not open ended system behind a complicated set of rules, to make it seem more clever than it is.

Finally, you can decide the ability to digest proteins, fat, or whatever else... and then? You also have to decide which robots are made of what, and in which percentage. You may have food chains with erbivores able to digest cellulose, and then predators able to digest proteins... but who decides that vegetables are made of cellulose and erbivores of proteins? Wouldn't it be easier to put a good control in the simulation options, stating who can eat what, once for all? (obviously, I'm joking).
Title: Darwinbots enzyme system
Post by: shvarz on July 01, 2005, 04:50:41 PM
Carlo,

 if we follow your logic, then limiting bots only to DNA commands that we give them is also not good.  From this point of view bots should be able to create their own DNA commands, because re-arranging DNA commands is "optimization, not evolution".
Title: Darwinbots enzyme system
Post by: Botsareus on July 01, 2005, 06:10:36 PM
Quote
Wouldn't it be easier to put a good control in the simulation options, stating who can eat what, once for all?

That’s a more complicated version of what we have right now, just check a checkbox and you make a robot reserve energy from the program..

Carlo, what it lacks is the ability of robots to learn themselves witch way of getting energy is better for them. This behavior will be very fun and scientific to observe.

It also lacks balance (as I already stated) In the current system if bots were to decide if they want to be a veg. or not: They all would choose veg.

P.S.

Carlo, I know it’s not right. I mean you are the founding father of everything we are doing on this forum today. But we spent a good 3 weeks on this system (or more) , we are not going to simply give it up.
Title: Darwinbots enzyme system
Post by: shvarz on July 01, 2005, 06:53:13 PM
Yes, we'll fight to the death! and ... then give it up :)
Title: Darwinbots enzyme system
Post by: Numsgil on July 01, 2005, 07:18:03 PM
The purpose of introducing the enzyme system was to encourage speciation.  We wanted omnivore bots to be at a disadvantage compared to bots that specialized in only meat or only vegetables.

So we looked into real life, to try and find what it has that DB doesn't that allows animals/bots to become omnivores, but clearly favors specialization.

What we came up with was either a use it or lose it kind of specialization, where omnivores in a meat free environment, over time, tend to lose tha ability to digest meat as the enzymes, which aren't important anymore, are lost.

-Or- a system where specializing in A causes a despecialization in B.  This is how most games deal with class speciation.  The more points you put into being a Warrior, the less are available for archery.  It's natural paralles are things like teeth design in animals, metabolic slowdown for herbivores and metabolic speedup for carnivores (ie: if you're a carnivore, like a lion, it'd take most of the day just eating to get enough energy from grass.  This can be seen in the prey the lions eat.) or other things along those lines.
Title: Darwinbots enzyme system
Post by: Carlo on July 02, 2005, 03:15:19 AM
Quote
What we came up with was either a use it or lose it kind of specialization, where omnivores in a meat free environment, over time, tend to lose tha ability to digest meat as the enzymes, which aren't important anymore, are lost.

-Or- a system where specializing in A causes a despecialization in B.  This is how most games deal with class speciation.
So, what's wrong in the system with an array? You have an array of values, with the first stating the ability to digest element x, the second to digest element y, etc. The total sum of the array (better: of the square of the values) has a fixed cap.
This way, you'd force specialization: every unused ability would be rapidly lost since mutations would favour robots with higher values for the used abilities.

But I still don't understand how do you expect different kinds of bots to have different composition (say, cellulose or proteins or fat), so that they can be methabolized in different way by predators.
Title: Darwinbots enzyme system
Post by: Numsgil on July 02, 2005, 03:27:56 AM
Quote
But I still don't understand how do you expect different kinds of bots to have different composition (say, cellulose or proteins or fat), so that they can be methabolized in different way by predators.
Currently bots are made up of body and nrg.  We'd subdivide body into muscle and fat (fat stores nrg, muscle makes the bot stronger).  There'd be animal fat and plant fat (ie: cellulose).  I don't remember how we decided, but plants are allowed to produce animal fat, and animals are allowed to produce cellulose, but there are incentives for bots to produce what is best for their given situation.

That gives 4 basic bot substanes.  Then you add substances that occur in the grid, and that bots can use for either production of stuff or producing energy.  For instance, elemental sulfur can be combined with water to produce hydrogen sulfide and nrg.  Wether its sulfur or we call it glimglam 96 doesn't matter.  For producing stuff, we would have something like silicone -> shell.

Then things like -1 shots feed on nrg, while -6 shots feed on a random sample of the opposing bot, say, returning mostly indigestable shell if the shot couldn't break through the shell, or returniong 40% fat and 55% muscle from a bot that's roughly the same percentages.
Title: Darwinbots enzyme system
Post by: Carlo on July 02, 2005, 03:50:38 AM
Quote
Carlo,

 if we follow your logic, then limiting bots only to DNA commands that we give them is also not good.  From this point of view bots should be able to create their own DNA commands, because re-arranging DNA commands is "optimization, not evolution".
The system you outlined in your post (with carbs doing this, fats doing that) and only the few reactions needed to obtain just one or the other, well, seemed to me really far from being open ended. DNAs are programs, you can make whatever you want with them: even use them to calculate greatest common divisors, or sorting an array.

A suggestion. Why don't you use, instead of fats, carbs, etc., the dna sequence itself? Say that enzymes act on the dna: for example, that they're able to split the dna sequence in some points. Say that an enzyme which fits  a certain dna portion, is able to delete it from the dna, leaving it splitted in two parts.
For example:

you have the dna:

cond
start
10 .up store
stop

cond
*.eye5 0 >
start
-1 .shoot store
stop
end

and the enzyme:  *.eye5 0 >

what you get is

cond start 10 .up store stop cond

and

start -1 .shoot store stop end

You can state that the smaller the blocks enzymes can mince, the more energy a robot can take from his prey's dna. Or that the energy is proportional to the length of the remaining ends, and then you can repeat on these the enzymes attack, until you can't split anymore. The rest would be waste? This way you'd have also that longer dnas provide more energy, and that there are many different ways of taking energy from a dna. Vegs would provide little energy, as they have simple dnas.

The advantage is that, this way, you'd tie together enzymes and dna structure, and then evolution of dna, at the same time putting on it the constraint of functionality.
I mean:

predator has an enzyme specialized in a portion of dna; this identifies the prey in a natural way in particular species; prey has an advantage in evolving to change that portion of dna; at the same time, that portion provides a functionality, so it can't change it freely. It may have to choose between becoming undigestable and conserving a particular feature.
Title: Darwinbots enzyme system
Post by: Carlo on July 02, 2005, 12:08:31 PM
Quote
Currently bots are made up of body and nrg.  We'd subdivide body into muscle and fat (fat stores nrg, muscle makes the bot stronger).  There'd be animal fat and plant fat (ie: cellulose).  I don't remember how we decided, but plants are allowed to produce animal fat, and animals are allowed to produce cellulose, but there are incentives for bots to produce what is best for their given situation.

That gives 4 basic bot substanes.  Then you add substances that occur in the grid, and that bots can use for either production of stuff or producing energy.  For instance, elemental sulfur can be combined with water to produce hydrogen sulfide and nrg.  Wether its sulfur or we call it glimglam 96 doesn't matter.  For producing stuff, we would have something like silicone -> shell.
So, in the beginning there were DNAs, memory, and energy. Vegs were simply robots which received food for free.
Then you divided energy in Energy and Body; now you want to divide Body in fat and muscle. But not just one type of fat and muscle, two types. The types for vegs, and the types for non vegs (I guess this means erbivores. What about carnivores?). Every robot can produce all four kinds of stuff, but there will be "incentives" to produce only the right stuff. This means that vegs will receive food for free, and also incentives to produce the right stuff. Also non vegs will have their own incentives. Chaotic.

Then you'll add sulfur, or let's call XYZ. XYZ, combined with ABC, will produce HJK and energy. I understand that this can be an interesting way to tie some of the many bots parameters, which are now balanced, if I'm not wrong, by totally arbitrary rules (I mean, there's something preventing bots from having max shell and max slime at the same time, isn't it?).
For example, if you have that

XYZ+ABC -> shell
and
QWE + ABC -> slime

then you'll have to choose whether to use ABC for shell or for slime. There will be also some competition for the resources.

However, I'd prefer something which leaves some more possibility. For example, say that slime is QWC. Then producing slime would be something like taking off E from QWE, C from ABC, and sticking them together to form QWC. This may cost energy, and would leave out E and AB, which may form ABE or EAB. These things may accumulate in the bot, become dangerous, or be ejected in the environment. All you'd have to do is to define a set of rules telling you how much energy you need to detach letters from a molecule, and to stick them together. Some robots may evolve a transformation sequence which uses the byproducts of another bot's transformation sequence to produce something else. Or a robot may develop alternative, less efficient, transformation sequences to face a lack of some basic molecule.

You'd not have to invent molecules and transformations: all would be in the intial rules. And it would be open ended, too. Wouldn't it be cool?
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 02, 2005, 12:36:38 PM
I think you may have misunderstood what we are attempting to do here Carlo.

Your concerns about open endedness are justified and what we actually want is to make the sim even more open ended by blurring the distinction between veggies and animals.

If we use a system of enzymes (actually a bit pattern stored as a hash number in the DNA file) then all robots can do all things to some degree. It will be possible to get a robot that learns to photosynthesize as well as eating other bots. There will be no automatic setting for autotroph any more so no free food. We already have day/nigh cycles with adjustable light intensity so we will just allow photosynthesis to generate energy and create oxygen and cellulose as a by product.

The main thing is that the bit pattern can only contain a finite number of different enzymes which stack to increase efficiency in certain areas.

A primarily veggie bot can have maybe 10 enzymes that photosynthesize and maybe one that can metabolize energy shots. The energy shots can either be stored in a kind of stomach until they are metabolized or simply lost if not used immediately.

A carnivore can have 10 enzymes that digest meat but none that can digest cellulose. Maybe one that can photosynthesize but that could be a drawback as woody cellulose (a byproduct of photosynthesis)  isn't as efficient at moving muscles as proteins are. It would gain weight but without any added benefits so evolution should tend to favor carnivors without this enzyme.

A system like this should be totally open ended and will even allow for veggies to evolve into animals and vice versa.
We are going to have to work on the balance though.
Title: Darwinbots enzyme system
Post by: Ulciscor on July 02, 2005, 10:55:06 PM
This may be an idiotic question but why would you want to blur the line between veggies and animals?
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 03, 2005, 11:32:07 AM
Because without the line being blurred there is no way for a plant to evolve into an animal or vice versa.

All the earliest life on this planet was neither. What we see today as plant or animal are the pinacle of evolutionary progress to find exploitable niches.

It should be possible to create a primitive life form that lives in an anaerobic simulation and gradually creates oxygen from the environment around it. Later, other lifeforms should be able to adapt to use that oxygen in metabolic processes. others should evolve to feed on each other while some develop the ability to take energy from light and become plants.

Just to have a button that magically gives a robot energy from the environment is simply not realistic. Up until now it has been a necessary evil but we now have a system worked out that will make it superfluous. The robots need realistic and believable mechanisms by which to derive energy.

Even today we have some hybrid animal/plant species. Take the venus fly trap (http://www.thegardenhelper.com/flytrap.html), Sundew (http://carnivorousplant.info/id15.htm) or Pitcher plant (http://www.mikebaker.com/plants/Sarracenia_purpurea.html)
All of these species require protein from insects in order to suplement their photosynthesis.
Presently we cannot model this kind of behaviour in DB. But I for one would like to.
Title: Darwinbots enzyme system
Post by: Ulciscor on July 03, 2005, 01:18:24 PM
Organisms which use different enzymes etc would be multi-cellular wouldn't they?
Title: Darwinbots enzyme system
Post by: Botsareus on July 03, 2005, 01:23:00 PM
I would like to add that you should try to evolve robots along side with plants in the current system. As a long run you will see that in the current system this kind of evolution will be inpossible because there is no balance between vegs. and animals. What will happen is the vegs will addapt to be simply as good as the animals and kill them off.

The other problem is the problem with the "FirstBot" Right now to create a firstbot I have to use two genes witch include a feeding reproduction and movment code.

Solution:
In the future system all I will need is a reproduction code and some enzymes. The robot will even choose what it wants to do first tie feed or shoot, move or turn etc.

(My goal with FirstBot is to have somthing as premative as possible to evolve into somthing as advanced as possible)

P.S.

Excuse horable spelling if any.


Multiselluer?
No , but who knows.
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 03, 2005, 05:34:34 PM
Quote
Organisms which use different enzymes etc would be multi-cellular wouldn't they?
Not any more so than now. Enzymes are present in single celled creatures as well. Possibly greater efficiency with MBs though.

Making decent MBs is also something we are trying to make easier in the new release. Balance is a big deal. We can't just arbitrarily make something only available as MB.

Quote
Solution:
In the future system all I will need is a reproduction code and some enzymes. The robot will even choose what it wants to do first tie feed or shoot, move or turn etc.

Please note that enzymes are NOT directly controlled by the genes. Or at least do not need to be.
The enzymes for a particular robot will be determined at that robot's birth and will be subject to mutation. No active control necessary! If we allow gene control then any robot can make all enzymes and that would really suck.

At least that is the point I was arguing for all along and where I thought we had ended up. Please correct me if I am wrong here. It was a while ago.
Title: Darwinbots enzyme system
Post by: Numsgil on July 03, 2005, 06:39:44 PM
Quote
Organisms which use different enzymes etc would be multi-cellular wouldn't they?
That's more the job of the specialization, which rewards bots for purposely limiting what they do.  It's somewhat related to the idea of enzymes.  You'd have to read through alot of the posts to see why or how.
Title: Darwinbots enzyme system
Post by: Ulciscor on July 04, 2005, 08:11:13 PM
Isn't it difficult enough already to get a bot to evolve to be better at something? Isn't it going to take a long time for a veggie to evolve? And does this mean you will remove the .fix vars? Sorry if this has been gone over already, I have looked back and if it's there I have missed it.

[Edit] And speaking of arbitrary decisions, what about making it cheaper for multi-bots to produce poison and venom, etc? That has no actual basis in the sim apart from introducing an artificial advantage for single bots to become multi-botular.
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 05, 2005, 09:02:19 AM
Quote
And speaking of arbitrary decisions, what about making it cheaper for multi-bots to produce poison and venom, etc? That has no actual basis in the sim apart from introducing an artificial advantage for single bots to become multi-botular.

Already done!

Been there for ages!  :)

It is cheaper for MBs to do everything! All costs are divided by the number of ties currently attached to any give multi-bot cell.

PS Your avatar is doing its best to lock up my PC. It is grabbing 100% of my CPU resources whenever I scroll the page to show it. As soon as I scroll it off page it goes back to normal.
How weird is that?  :blink:
It has never done it before.
Title: Darwinbots enzyme system
Post by: Ulciscor on July 05, 2005, 10:24:19 AM
Sorry I phrased it wrong. I meant, what is the basis for making multibots able to access poison and venom for less energy? If it is just there to give multibots and advantage over other bots, so that it is more likely that multibots will evolve or survive, that is artificially introduced and doesn't arise from a deeper level of the program.

Argh everything I seem to make locks up someone's pc. My avatar is quite a large gif file which might explain it. I'll change it now.
Title: Darwinbots enzyme system
Post by: shvarz on July 05, 2005, 03:07:44 PM
Carlo,

I would certainly love a system like that.  But there are problems too.  Your system would allow a large number of possible molecules and reactions, but we don't need a large number of molecules and reactions at this point.  They would only slow things down.  Like with DNA language: you allow mutations to generate only meaninful commands (add->sub), because allowing mutations that generate meaningless commands (add->bdd, or sub->wub) would simply slow things down without giving anyting new.  

Same here.  The goal was not to create the whole metabolism from scratch, but give bots more choices on how they obtain energy and how they spend it.  The first and foremost effect of that would be the blurred line between veggies and non-veggies.  Bots could evolve to become either.  The second effect is that bots can become a lot more diverse: they can be lean and muscular or they can be slow and fat or they can be large and tough  (and any variation in between).

We still could go with a system of rules at this point, but there is a problem of balance.  How much should it cost to make fat?  Protein? Carb?  How efficient each one is?  Where do you get these numbers.  Taking them from real biochemistry is an easy solution - all energy costs can be expressed as ATPs and converted into nrg.
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 05, 2005, 04:12:04 PM
Quote
Argh everything I seem to make locks up someone's pc. My avatar is quite a large gif file which might explain it. I'll change it now.

I like your new one better anyway.  ;)
Title: Darwinbots enzyme system
Post by: Carlo on July 06, 2005, 03:53:21 AM
Shvarz,

you can write any program with the dna language. Mutations don't allow _syntactically_ uncorrect sequences to appear, but allow any possible correct sequence. If the chemical system should work like that, then it should avoid the specification of reactions like:

abc + xyz -> aaa

(let's say that this reaction is syntactically wrong as there are 3 a on the right and only one on the left side, and the other atoms disappeared - therefore the reaction is simply impossible, the expression has no meaning).

What you are saying, instead, is that we should avoid reactions which are _semantically_ wrong, I.e., work but have no evident meaning. That's exactly the opposite of the DB philosophy.


Quote
The first and foremost effect of that would be the blurred line between veggies and non-veggies.  Bots could evolve to become either.  The second effect is that bots can become a lot more diverse: they can be lean and muscular or they can be slow and fat or they can be large and tough  (and any variation in between).

See, that's exactly what I mean. Just read your statement, and count the degrees of freedom that this new system will add to DarwinBots:

1)  veg <-> non-veg
2)  lean <-> fat
3)  weak <-> muscular ?

What else? Probably some more, but now, by contrast, try to count the degrees of freedom the DNA gives to robots: impossible!
See (I'm sorry to be sooo boring), that's the difference between selecting syntax or selecting semantics. If you select syntax, you don't know what to expect. If you select semantics, you already know you'll get what you selected.
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 06, 2005, 08:42:43 AM
Carlo

I'm not quite sure I am following your argument here.
It sounds like you are saying that it is a bad thing to.....

1) blur the line between veggies and animals and allow almost infinite gradiations between the two extremes.
2) Allow the bots to choose which to build in their bodies, carbs, fats, proteins, muscles etc.
3) Allow the make up of a body to have a profound effect on the way that the particular bot behaves. fat = slow and heavy. Muscular = faster and stronger. Lean = fast but light and so on

These changes won't take anything away from the DNA but will add a massive amount of diversity to DB. Possibly equal to or even greater than that given by the DNA alone in the present system.

As far as the chemical reactions go, I am with you on this. I don't think we even need to bother defining the exact chemical pathways to create energy and convert one thing to the other.
It should be as simple as this.

In the presence of one instance of enzyme A and the right kind of food then X amount of energy is given to the robot and Y amount of waste is produced.

If the enzyme is for extracting energy from sunlight then we can go one step further possibly.
In the presence of one instance of Enzyme P (for photosynthesis), sunlight and CO2 then energy is given to the robot in proportion to the intensity of the sunlight, X molecules of CO2 become X molecules of O2 and X molecules of Cellulose in the body of the robot

In other words, using photosynthesis will make the robot heavier and slower automatically but it gets free energy in proportion to the amount of sun and the number of full copies of enzyme P in the bit pattern.

I don't see the point of modelling all the reactions and even allowing useless ones. A kind of overview should be sufficient in my opinion.
Title: Darwinbots enzyme system
Post by: Numsgil on July 06, 2005, 03:23:45 PM
Quote
I don't see the point of modelling all the reactions and even allowing useless ones. A kind of overview should be sufficient in my opinion.
At first I felt the exact opposite on this issue, but as I started into the technical details, I found it's simply unrealistic to model more than maybe 100 substances or so.  The memory requirements alone aren't large enough.

So we'll probably need a more abstract model, where glucose converts to nrg and vice versa via a single enzyme.
Title: Darwinbots enzyme system
Post by: Botsareus on July 06, 2005, 04:06:46 PM
Quote
See, that's exactly what I mean. Just read your statement, and count the degrees of freedom that this new system will add to DarwinBots:

1) veg <-> non-veg
2) lean <-> fat
3) weak <-> muscular ?

What else? Probably some more, but now, by contrast, try to count the degrees of freedom the DNA gives to robots: impossible!

Carlo, no one is planning to get rid of the dna , it is still very important in this system.
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 06, 2005, 04:06:47 PM
Right. That sounds quite complex enough.
Just make the enzyme bit pattern quite long and see how many instances of a given 4 bit pattern (I figure a 4 bit binary code should work OK but we can make them longer if we like) can be found in it at the point of detokenizing the DNA then store the number of each one in an array. Maybe each instance could convert 10% of available "stuff" into the appropriate end products.

If a robot has 10 or more instances of a given pattern contained within the larger bit pattern then it will be 100% efficient in that area.
If the overall pattern can't hold more than about 15 smaller patterns then this will allow specialist or jack of all trades robots to form.
To complicate things a little more you can have several different patterns that essentially do the same thing but along slightly different pathways.
Maybe some slightly longer bit patterns could do more than one job or have a greater assigned efficiency.

Lots of possibilities without the need to micro-manage the actual chemical reactions. All I think we need are the start and end points of the reaction.
Title: Darwinbots enzyme system
Post by: Botsareus on July 06, 2005, 04:24:11 PM
Carlo, for each type of digestion (I beleave) you need your own special dna commends.

For killing plants and vegs I think its still -1 .shoot store

For photosinthises its a several step prosedure but still uses dna.
ex:
1 .makephoton store
1 .photosinthesize store

For feeding directly on e-grid gas it again also has to develop a special code in the dna to use it.

The movment tie feeding and the rest of stuff also stays.

The Problem is nothing is stoping the robots from doing all things at once, thats were the e-grid and the enzymes come in.
Title: Darwinbots enzyme system
Post by: Botsareus on July 06, 2005, 04:41:02 PM
Quote
So, what's wrong in the system with an array? You have an array of values, with the first stating the ability to digest element x, the second to digest element y, etc. The total sum of the array (better: of the square of the values) has a fixed cap.

I think thats what we are actualy planning to do, am I confused? or do I need to add anything to that?
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 06, 2005, 04:48:23 PM
Quote
for each type of digestion (I beleave) you need your own special dna commends.

No you don't

That is my whole point here.
From the point of view of the DNA, Nothing will change from the way it is now. You still shoot with -1 or -6 shots.
They still work just like they do now.
Veggies and part veggies (robots that have one or more photosynthesis enzymes) will still get their energy from the sun without having to do a damn thing to get it.

Everything regarding enzymes should be entirely hidden from the view of the bot programmer.
The last thing we want is a bunch more useless sysvars that have to be laid out in a specific pattern in order to work properly. That is the kind of thing that we are trying to eliminate from the game now.
That is the reason why we want to simplify the way tie commands work.
It is just too dificult for a useful piece of DNA to evolve when it requires so many different interlinked components to come together just so.

Damn! I am starting to sound like a creationist here.  :(

The point is though that we don't have 4 billion years to evolve our bots so they have to be able to change a bit faster than nature would do it.
Title: Darwinbots enzyme system
Post by: shvarz on July 06, 2005, 06:30:59 PM
Carlo,

I absolutely agree that we would get a lot more degrees of freedom in your system.  But do we need them?  I don't think so.  To get a system like that working - this is a whole different project!  People here are talking about different metabolsims and having CO2 and H20 and so on...  I don't really want to go there.  I want to solve two specific problems:
1. Veggies are determined artificially and they get energy for free.  It is impossible and meaningless to run evosims with just veggies or with veggies against normal bots.  
2. Energy is faceless now.  Choice and execution of energy flow is one of the main tasks in living organisms and it is (almost) completely absent in DBs.  Division of energy on nrg and body is good but insufficient.  Originally the idea was to create two different pools of energy, one easily accesible and one long-term storage.  I don't think it's been implemented properly.  I want to fix that and (while we are at it) expand on that too.  I want to have 4 different possible energy pools and those are based on real-life energy pools.

So the metabolism as I see it should be just a few basic reactions, which would allow bots control energy flow, but would not require (or allow) creation of intermediate steps.  We simply don't need them.  Why strain the system with a huge number of dead-end molecules and weird messed-up reactions?
Title: Darwinbots enzyme system
Post by: Carlo on July 07, 2005, 11:20:05 AM
Shvarz,

in fact it may be a whole new project. I've been thinking for a long time to an alife sim working along these lines - but never had the time to start coding. But some of the ideas could maybe work in DB too.
As for the two problems:

1) Yes, veggies are artificially determined, and that's no good. But, it's maybe better to have such a hard and artificial division than introducing complicated rules which can result in adding no more than the complexity of the rule itself.
There is a fact, on the other hand. It don't seems to me that there are in the macroscopic world many examples of a continuum between vegetables (autotrophs) and non vegetables. But maybe in the microscopic world things are much different, I don't know.
So, if we want robots to move gradually between auto and heterotrophy, we should accept the existence of robots which, at the same time, feed through photosynthesis AND hunt for food; otherwise, why should we introduce a model allowing such continuum, and at the same time put in it a number of deterrences to make practical to be only in the extreme positions of the continuum?

2) the energy problem. Here again you're right. There's no methabolism, and the energy parameter is extremely simplistic (by the way, never found irritating that a dying robot with, say, 300 energy,  has all the speed and reaction capability of a fully healthy bot?). Maybe a "multiple container" system would be interesting. You may have a few different parameters, with different characteristics, and let the robot transform one type into the other at slow rates (say, no more than a fixed token per cycle). Anyway, my advice is to try to keep that system the more simple and abstract as possible, purging it from the "organic" nomenclature (fats, carbs, etc) so to make clear what exactly the system is and what it does (otherwise, you'll always be tempted to add features which are "name driven": for example, that fats _should_ make you slow or, being "greasy", _must_ have something to do with slime, etc - hope you get what I mean). Parallelism with real systems may come after, just as a convenient metaphore of the system.

Ok. I'm going away for holidays tomorrow (to Irkutsk!) and I'll be away till the beginning of August. So, goodbye for now, have a nice time. Don't change too much in DB while I'm away !  :lol:
Title: Darwinbots enzyme system
Post by: Endy on July 23, 2005, 06:25:13 PM
Just out of curriosity how hard would it be to have a sort of max system nrg bank that supplies nrg to the plants but can only refill as nrg is wasted or spent? Various costs and wasted shots would fill the bank while veggies gaining nrg would lower it.

If either bots (or plants) desire additional nrg they'll have to figure out a method to extract it from others either via feeding, or perhaps clever evasion/defence causing opponent nrg loss.

The only problem I could see would be keeping track of all the expenditures, I'm sure it would pose something of a difficulty.

On the topic of leaving shooting veggies alone to evolve. The most common occurance I've seen is that they all stop fighting and settle down to peaceful immortality.

Hmm...we have these guys become immortal than complain about our boredom, I can't imagine how bad it'll be when we achieve it for ourselves. ;)

Endy B)
Title: Darwinbots enzyme system
Post by: Numsgil on July 23, 2005, 09:56:39 PM
It wouldn't be terribly difficult.  It would just take a bit of time to program.  There are alot of places that bots lose nrg.

I wouldn't be against it as an option.  It creates a kind of zero sum game, which has some different strategies than non zero sum game.  (Look up zero sum game on wikipedia to see what I mean).
Title: Darwinbots enzyme system
Post by: PurpleYouko on July 24, 2005, 12:25:13 PM
That is the way it used to work. IMO it was a serious pain in the ass and severely limited the program. It just isn't realistic to have a fixed maximum energy level in the system.

One of my first acts as primary programmer after Carlo published the code was to trash the system and make the game more open ended.

It is trivial to keep track of total energy in the system and stop veggie feeding. Unfortunately it leads to some extremely problematic issues like veggies being fed negative energy tokens when your robots get too efficient at conserving energy.

We can add this as an option possibly but I don't favor the idea of making it the default.  :(
Title: Darwinbots enzyme system
Post by: Numsgil on July 24, 2005, 01:26:34 PM
Quote
We can add this as an option possibly but I don't favor the idea of making it the default.  :(
I would second that.  I don't believe ecological systems are zero-sum generally.

What might be better (and I started working on it) is to allow new ways to feed vegs instead of just a constant amount.  Feed vegs based on body or surface area, etc.

What we need to get is an ecological balance where vegs don't have to be repoped all the time.  Get some realistic predator/prey cycles.