Author Topic: General approach to metabolism  (Read 6985 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
General approach to metabolism
« Reply #30 on: March 18, 2005, 07:45:02 PM »
Yay, PY is on my side!

Now who wants to fight me and PY?!

 :cheers: :clap:  :shoot:

On the serios note:  think back to this morning, PY.  As soon as you saw that pizza, your stomach started releasing enzymes for carbs/fats digestion.

But this is details....
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
General approach to metabolism
« Reply #31 on: March 18, 2005, 08:00:43 PM »
Quote
Yay, PY is on my side!

Now who wants to fight me and PY?!

Shvartz , If you and PY are ok with it ( I don't get it so I dont care ) then I am ok with it. So I think its time to summarize it and post it here: http://s9.invisionfree.com/DarwinBots_Foru...p?showtopic=202

Just make sure that the summery feets nicely with my 50/50 system
« Last Edit: March 19, 2005, 01:38:37 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
General approach to metabolism
« Reply #32 on: March 22, 2005, 03:15:41 AM »
Can I make a suggestion?

First of all this is strictly about digestion.  As I said before vacation, what we really have here are two interrelated but seperate systems.  One for foreign matter and the other for internal metabolism.

schvarz seems to be thinking in terms of internal, which I haven't even begun to think about.

Okay:

Here's the only DNA control you should have over digestion.

100 .fat induce

(induce is probably the worng word, but I'm tired)

This induces the stomach into producing enzymes as if there were 100 more fat than there is.  For digestion, more control is unnecessary and probably destructive.  This is very close to real life.  Our stomachs have a mind of their own for the most part, digesting things as it sees fit.  But the brain can give the stomach a heads-up if food is around and digestion is iminant.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
General approach to metabolism
« Reply #33 on: March 22, 2005, 09:38:22 AM »
I still don't really think it is necessary to get that much into the operating controls for enzymes but if we do then couldn't we just use a variation of the "make" operator for this?

Assuming that as many enzymes as necessary are always present would be my choice but if we want to be able to make more than a bare minimum by DNA control then here is my outline of how to do it. Still need to give the robot some enzymes for backward compatability.


You just need a bunch of what are effectively code numbers for make to grab and use.

Something like

157 make

where 157 represents a generic command to find and create the best enzyme for fat.

158 make would find and create the best available enzyme for carbs etc.

Of course we can add a series of labels to represent these numbers but they will need to be a separate set then the sysvars or things will get confusing.

Coding it won't be a problem now that I have gotten my head around the make/break commands as operators.


 :D  PY  :D
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
General approach to metabolism
« Reply #34 on: March 22, 2005, 01:21:20 PM »
Okay, these are my thoughts on the original idea after I've had a chance to stew them over.  Tell me if I repeat something already said and resolved.

1.  Each substance should have a number assigned to it that's unique to that substance.  For instance, the word carbs could be 51.  carbs will always be 51, no matter the order it's in.  So when you refer to carbs in the DNA, it is always translated as 51.

How's that different?  sysvars, for instance, have a number assigned to them from a text file.  What I'm proposing is that a number is assigned to a substance not from a text file, but from a function that gives a nubmer based onthe substance's name.

That should allow custom substances to be easily made and shared.  No worrying about if your custom substance overlaps with anyone else's.

2.  Enzyme array is not quite a good idea.  In your system we search through all the enzymes and enlist the best ones, ignoring others that aren't as good.  Here's what I would like:

Imagine you have a bowl of enzymes.  All possible enzymes that a bot can produce are in this bowl.  Now you add a substance.  All enzymes that can work on that substance do so, not just the best ones!  This encourages multiple copies of good enzymes and deleting less good ones.  If you have 5 copies of a good one and 1 copy of a bad one, the reaction is more likely to use a good one simply by chance.  Real DNA does contain this kind of example of multiple copies of the same gene.

This stops the program from artificially biasing enzyme use by artificial criterion, such as 'best one for the job'.  All the enzymes work at the same time.

I don't know a good answer to how to promote enzyme production though.  Maybe all enzyme production is stimulated at once, so you begin producing the less efficient ones and the efficient ones.  What this means is that less efficient ones have a opportunity cost but no penalty, meaning that a bot is encouraged to remove bad enzymes without penalyzing the bot for not doing so.

3.  I agree full heartedly.

4.  The purging was my idea in respect to the mouth purging it's contents to the stomach.  Not hte same thing you propose here.  Enzymes are like connection speed to the internet.  Have more and you increase your bandwidth.  But the larger your bandwidth the more you have to pay per month (or cycle in DB).

5.  You should not be able to directly say "I want this substance to be turned into that substance, and here's how I want to do it."  That's very bad.  Rather, I'd like enzymes to each know what they do.

These enzymes are always on, always working.  If you want a stable reaction, you simple have as many A->B as B->A.  Homeostasis.  If you want a net movement of A->B you simple produce more A->B than B->A.

You do that py specifying, in the DNA, a certain origin and final product, and the strength of the resulting net movement you want.

For instance, say I want to store energy as fat.  I would do something like NRG FAT 100 strengthen (the command words are still open).  This would go through all possible enzyme pathways, and for all that are part of some nrg->fat reaction (perhaps as an intermediary) it would produce more of those enzymes.  The opposite is true too, you can weaken a reaction by doing something like NRG FAT -100 strengthen.

Okay now, say we did that, and their is now an unequilibrium.

nrg s turned into intermediary A.

Now, since A is an intermediary, all enzymes that do A-> something activate.  If their are multiple paths possible, A follows all those paths.  Like a large water pipe.  If you have a split in the pipe, the amount of liquid going through each one is a function of the size of the split off pipes.  The more enzymes a certain path has, though, the more A will go through those.  Note that it is possible some A will turn back into nrg.

The point of this system is that the enzymes have no idea how A was created.  They don't know what direction it's coming from, or where the DNA wants it to go to.  It just does what it does.  The DNA doesn't know what individual enzymes do, but it can encourage particular directions of net movement.

This is an object-oriented approach.  Specifically, abstraction.  I've mentioned that I'm trying to get bots in DB to be object oriented in design, but I realize not everyone know what I'm talking about.  Here's a wiki on it.  If you still don't understand what I mean, ask a specific question(s) and I'll show you what I mean with an example.

That's what I would like.  That keeps the DNA's command over the metabolism absolute, without muddying it up with the exact details.

The only problem: If I have A-> nrg and A->B->3 nrg, I need a way to decide which of these two to promote.  Something as simple as a set of other keywords in the above command would be the ticket.

Like:

NRG FAT 100 strengthen
HighResult 10 favor

again, the exact keywords and DNA syntax is debatable.  But the idea is that the DNA doesn't know how the enzymes are doing what they do, and the enzymes don't know anyhting about the DNA.

Also, it recognizes that different paths aren't necessarily 'better' than others.  For instance, say I have a path for protein + nrg -> shell.  Say one route is: nrg + 3 protein -> 2 shell and another is 3 nrg + protein -> 2 shell.  Which is better?  Well, it depends on the scarcity of the resources.  If protein is scarce, you might be willing to spend more energy.

by using the favor keyowrd, you can define different paths to favor and by how much.  HighResult could favor those reactions that give the most for the bang.  MinimizeNRG might favor those reactions that take less energy than others.  Etc. etc.

Again, the exact workings or paths of the enzymes are hidden from the DNA, and vice versa.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
General approach to metabolism
« Reply #35 on: March 22, 2005, 03:16:00 PM »
Nums, your system is actually more complicated than mine.  If that's good or bad I don't know.  From what I hear from PY he wants it more starightforward.  Carefull adjusting of amounts of enzymes, having multiple routes and so on - I dropped all that.  It will be very easy to do stuff.  

You want to make fat, just say

fat
make

You want to convert glucose to fat, say

glucose
break
fat
make

The intermediates can be addressed directly from DNA to optimize things, but they don't have to.

Crap, I'm late.  Talk to you all later...
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
General approach to metabolism
« Reply #36 on: March 22, 2005, 04:41:05 PM »
Yep I like the simpler approach but with the option to get more complicated if you reeeeeeeaaaaaaallllly want to.

 :D  PY  :D
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
General approach to metabolism
« Reply #37 on: March 22, 2005, 04:42:22 PM »
Num , we already desided on the "make...breack" system as the final virsion , sorry it happend without you.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
General approach to metabolism
« Reply #38 on: March 22, 2005, 05:11:25 PM »
Okay, but when you say break carb, how does the program know which route to take?  That is, imagine you have:

carbs -> A + nrg -> B + nrg -> 20nrg
and
carbs -> 10 nrg

How does the program know which one to use?  Which is default?  That's what I was getting at.

Basically I guess I'm saying:

MinNRG favor
glucose make

That is, I'm talking about a subset of what schvarz has.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
General approach to metabolism
« Reply #39 on: March 22, 2005, 06:14:48 PM »
Quote
carbs -> A + nrg -> B + nrg -> 20nrg
and
carbs -> 10 nrg


So far I was able to avoid scenarios like this.  If need arises, then we can come up with algorithms, including (but not limited to) arbitrarily assigning which path is chosen.  

I am off work in 30-40 minutes.  I'll be home in an hour or so.  So expect a post with first version of metabolism in a couple of hours.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
General approach to metabolism
« Reply #40 on: March 22, 2005, 06:15:30 PM »
We all eagerly await.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
General approach to metabolism
« Reply #41 on: March 22, 2005, 06:24:20 PM »
Quote
So far I was able to avoid scenarios like this.  If need arises, then we can come up with algorithms, including (but not limited to) arbitrarily assigning which path is chosen.
Remember that we need to keep the system as general as possible.  As Paul said before, the beauty of the program is in the vast range of sims you can run.