Darwinbots Forum

Code center => Suggestions => Specialization, Metabolism, Digestions and Env Grid => Topic started by: Anonomous Guest Person on March 18, 2005, 06:29:22 PM

Title: Genetic Metabolism
Post by: Anonomous Guest Person on March 18, 2005, 06:29:22 PM
I dunno how the actual metabolism will work; this is an idea of implementing the metabolism to a bot.

First, you have to set up to ten enzymes. These can change via mutations, and are set after the genetic code.
Each enzyme'll probably be one line.

Once the enzymes're set up, you can use them via a bunch of sysvars.
EnzA, EnzB, EnzC, etc.
The more you store in the system variable, the more it'll digest.
There could be a method to alter enzymes, but I doubt PY would accept such a system. <_< :P
Title: Genetic Metabolism
Post by: shvarz on March 18, 2005, 06:39:04 PM
You are talking only about digestion.  Well, what about making stuff?  Another ten enzymes?  Another 10 sysvars?  What about enzymes for taking up stuff from the grid?  Another ten? What if you decide you want some more reactions?  We run out of memlocs very quickly.  

Remember, we wanted to introduce metabolism to increase complexity of the system.  It has to involve a lot of molecules with a lot of different properties and with a lot of different enzymes acting upon these different molecules.
Title: Genetic Metabolism
Post by: Botsareus on March 18, 2005, 06:48:25 PM
NO , WE HAVE 7 COMPLEX ENZYME MOLECULES (made up , no real chemistry here), THEY ARE RESPONSIBLE FOR taking stuff from the e-grid , digestion , putting stuff back into the e-grid , all in one step.

Shvartz when you say " What if you decide you want some more reactions? " give an example , please.
Title: Genetic Metabolism
Post by: shvarz on March 18, 2005, 06:57:10 PM
Did you see the posts with lists of reactions?  Well, these are only a tiny amount of real possible complexity.

For example, right now you have reaction
carb>nrg

Well, in my system if you want, you can simulate the whole complexity of this reaction by going
carb>A>B>C>D>E>F>G>H>I>J>K>L>nrg

Old bots would still be able to do their

carb>nrg

but new bots can go through the whole chain and get a lot more energy - this will drive evolution of very complex bots.

Also remember that if you have 10 molecules that you can digest, then someone somewhere has to make these molecules.  Which means that we need enzymes for both - digesting stuff and making stuff.
Title: Genetic Metabolism
Post by: Anonomous Guest Person on March 18, 2005, 07:01:07 PM
Quote
You are talking only about digestion.  Well, what about making stuff?  Another ten enzymes?  Another 10 sysvars?  What about enzymes for taking up stuff from the grid?  Another ten? What if you decide you want some more reactions?  We run out of memlocs very quickly.  

Remember, we wanted to introduce metabolism to increase complexity of the system.  It has to involve a lot of molecules with a lot of different properties and with a lot of different enzymes acting upon these different molecules.
I didn't think gathering stuff from the environment used enzymes. In fact, I almost mildly thought that you'd simply gather a small percentage from the environment, allowing toxic environments of a sort.
For making stuff, I guess you would need more enzymes, if you wanted to do it that way.
And, if you make the system too complicated, then mutation'll be out, and newbies won't know what to do.

Personally, I don't really like the idea of adding a metabolism at all yet.
Title: Genetic Metabolism
Post by: shvarz on March 18, 2005, 07:10:43 PM
Well, you don't really need enzymes to gather stuff from environment, but you need some specialized proteins for sure.  Since most people here are not biologists, I just play along and call these proteins enzymes :)

The idea about metabolism is to make it very complicated, but hidden.  You would not know that it is so complicated untill you really dig in and learn.  But evolution will use it and suddenly you'll see appearance of specialized bots.
Title: Genetic Metabolism
Post by: Anonomous Guest Person on March 18, 2005, 07:17:58 PM
Sudden appearence? You think too highly of evolution.
As far as I know, T Preservans is a mutation.
And it's a piece of crap, really. :)
I could outprogram that even in the version it was designed for!

And I'm definately not a biologist. I think we should first understand how real cells do it. That, or just dive in, and say, "Forget how nature does it, this is just an Artificial Life Sim, not an actual perfect simulator!"
Unfortunately, we seem to be doing both, and yet neither. As far as I've seen, everyone except me wants it to be a really good simulation of life, but unfortunately, not many people seem to know much at all about how actual cells use enzymes, proteins, and all the other stuff they use.
This might be due to the fact that half of us are programmers, and the other half are biologists, or something on that level.
(I know only the basics of biology, but I'm a pretty darned good programmer. Go ahead and look at Duo Minimalis for proof; it's not as good as Deathgrip, or even DIN, but I take pride in how little energy it uses.)

I'd much prefer a simple system (well, simple in the way Assembly Language is simple) over a realistic one. :P
Title: Genetic Metabolism
Post by: shvarz on March 18, 2005, 07:26:17 PM
LOL

Quote
I could outprogram that even in the version it was designed for!


Can you outprogram a simple cockroach?  I think very highly of evolution because I see extremely complex things it produced all around me.

So far evolution did not produce that many good bots because
1. It was a very simple and limited environment
2. Not too many people run it
3. Coding is very easy

Basically the fact that we don't see that many good mutants indicates that something is wrong with the sim.  and we need to fix it.
Title: Genetic Metabolism
Post by: Anonomous Guest Person on March 18, 2005, 07:48:05 PM
Not really. Cockroaches are really amazing programmers. :D

And another reason we don't get too many good mutants is 'cause they die off before they can evolve. DarwinBots isn't simple enough, it's so complicated that small advantages don't mean much.
Title: Genetic Metabolism
Post by: shvarz on March 18, 2005, 07:50:36 PM
Quote
small advantages don't mean much


it is not a problem with complexity, it is a problem with small population size
Title: Genetic Metabolism
Post by: Anonomous Guest Person on March 18, 2005, 08:07:53 PM
That is another factor, yes. But complexity's a problem too.
Look at the Civilization series (and it's clones.)
Two nations that're exactly the same in every possible way except that one has a wonder that doubles one of their city's research. Now, if that city just happens to be the nation's biggest research city, then that could really speed their research up.

Now, in Darwin Bots, a similar advantage would be a method of keeping Body actively fed when energy's needed, or made when there's an abundance of energy.

(All of my bots do that, ironically. Much like I prefer having a double-research wonder in Civilization games. :D )

[Edit] I forgot to make my point. :rolleyes:
Anyway, the point is that mutation has a very low chance of creating an active body-energy exchange system thing. It's possible, yes, but very improbable.
Title: Genetic Metabolism
Post by: Botsareus on March 18, 2005, 08:21:48 PM
Well A.G.P. just make better robots if you want to keep them activaly fead.

Here is a try on it:

cond
300
*.nrg
>
start
100 'give all the energy to the child
.repro
store
stop

This bot will find a way to matabolize because as far as I know changes in the enzymes happen when the robot reproduces. Am I right? Shvartz?
Title: Genetic Metabolism
Post by: shvarz on March 18, 2005, 08:31:26 PM
The changes in enzyme will happen during reproduction, like all mutations.

AGP: Good mutation is always rare.  But right now you can grasp the whole system and design a bot that is very good.  It is because DBs is too simple.  If we make it so complex that you can only create a bot that is so-so (humanly impossible to track all effects of code), then you'll see bots evolving that are better than designed bots.
Title: Genetic Metabolism
Post by: Anonomous Guest Person on March 18, 2005, 08:57:44 PM
No offense, but I think the stacking system was thought of as the bonus that mutated bots have over programmed bots.
Title: Genetic Metabolism
Post by: Zelos on March 19, 2005, 03:36:30 AM
I agree whit shvarz (what am I doing?) the more complex a system is, the better is the chance that the mutations will turn out good. after a few hundred generatios. it gives more options, a gene can mutate and be complitly different from the original one but still do the same, and then a little mutation can change it and make it better and so on.

when its about proteins take a look here (http://s9.invisionfree.com/DarwinBots_Forum/index.php?showtopic=209)
Title: Genetic Metabolism
Post by: PurpleYouko on March 19, 2005, 12:08:31 PM
I have always thought that DB was too simple to allow decent mutations.

Here are some of my reasons why I think decent mutations are so rare
:D  PY  :D
Title: Genetic Metabolism
Post by: Zelos on March 19, 2005, 03:28:50 PM
well, ure right, there is no need for specializatoin, we need to make the bots unable to move across the entire board in matter of seconds, it shall cost alot. and it should take alot of time, like 5 min ti cross the board is more than 2 generations for them. and we need SEX (I mean in db), the sex shall only be capable whit bots who have most 5% different dna
Title: Genetic Metabolism
Post by: Botsareus on March 19, 2005, 03:54:28 PM
zelos just make larger maps in order for that to happen. Your problem is not really about the size of the board, but: Its about how mutch energy you want in your simulation. Another approch for you is to have very little energy on the map , try using F1 conditions.
Title: Genetic Metabolism
Post by: Anonomous Guest Person on March 19, 2005, 04:45:42 PM
I like how sexrepro can work between different species.
Though I wish it were more random.

If the whole survival of the fittest thing starts working better, then bots that have sex with anything that move will hopefully mutate to only have sex when it'd produce an actual working offspring.
Title: Genetic Metabolism
Post by: PurpleYouko on March 19, 2005, 06:44:44 PM
I think .sexrepro should be restricted to work on similar DNA a little like Zelos suggested.

I would also like to suggest that sexrepro should be completely overhauled in such a way that it actually requires both parents to be actively involved in combining their DNA in an offspring. A lone robot should not be able to use .sexrepro  the way it can now.

 B)  PY  B)
Title: Genetic Metabolism
Post by: Zelos on March 20, 2005, 12:40:16 AM
in reallity its only a few species who can get a child toghater, and that child is often sterile, but it happen its not. why that happen is coz the DNA in both the new chromosones dont match, its almost a miracle that the child was ever born. so it need to be specefied to bots that is simular whit a mariginal for evolution.
Title: Genetic Metabolism
Post by: shvarz on March 20, 2005, 02:35:28 AM
Actually, if you go by 5% difference in DNA criteria, then humans and chimps should be able to make kids together (we only have ~ 1 percent difference in genome).  I think most of cross-species restriction come from behavioural differences.  Our mating rituals are simply to different :)
Title: Genetic Metabolism
Post by: Zelos on March 20, 2005, 03:56:59 AM
the dna differense is important, but the most important is the amount of chromosones. a dog and a human cant get a child coz the genes which control vitial things are placed on different chromosones, if our lungs and heart are on our 3 chr (chromosone) it might be on the 5th and 9th chr on the dog. whit chromosones we could simply say, the same amount of chromosones -+ 0,5% or somethiung like that
Title: Genetic Metabolism
Post by: Numsgil on March 22, 2005, 03:50:32 AM
I think when I work out chromosomes sex reproduction will fall in place almost as a natural consequence.

It's good to see everyone and their dog has an idea on how to make digestion work.  Here's the rules I've decided to stick to:

1.  No limit on enzyme length
2.  No limit on number of enzymes.

We can make any rules we want around these two, but the more I think about it, the more I realize this is how it needs to be.
Title: Genetic Metabolism
Post by: Zelos on March 22, 2005, 08:02:34 AM
good whit many enzymes :D but it will cost more to have many right? maybe like in a formula E³ and some more things where E=amount of enzymes. will it?
Title: Genetic Metabolism
Post by: PurpleYouko on March 22, 2005, 10:23:30 AM
Just remember that you don't actually have to make all the enzymes in your arsenal.
What we are getting at here is that there are no limits to the possible enzymes that are able to evolve in a given robot.

Lets use an example.

A robot evolves a particular enzyme bit pattern (for the sake of arguement 512 bits long). Inside this bit chain we may be able to locate 25 different enzymes. Some overlapping, some not.
Of these 25, 10 may be specifically suited to digest fat but they all work at different efficiency rates. We have no way to tell which is best but the program will search for the best one when it needs to digest fat from the stomach. (or to put in a -6 shot maybe)
The robot will then create the best enzyme in its arsenal and will be charged energy proportional to the length and efficiency of that enzyme. The other 9 are simply ignored. Maybe later mutations of the enzyme bit pattern could make them better but for now we don't want them. They are simply patterns for possible future use.

Another robot may have 70 or 80 overlapping enzymes in his bit pattern but they could all be crappy and inefficient. That robot probably won't survive to pass on his genes.

The point is that at birth the bit pattern will be searched and the best enzyme for each type of reaction will be identified by the program and stored in the robots (hidden) enzyme array. This will save on processor time later since it is quite intensive to search the bit pattern on every cycle.

Some robots may not have any enzymes for a certain substance so that slot will remain empty.

Total enzyme slots available will be dynamic but will in effect be determined by the amount of enzyme reactions that we intend to model. This will most likely change as we add more processes with successive version releases.

Questions anybody?

 :D  PY  :D
Title: Genetic Metabolism
Post by: shvarz on March 22, 2005, 10:55:46 AM
I'm going throw back your own argument at you PY:  What's stopping the bots from being omnivores?  They'll just bloat up their enzyme sequences to have all possible digestion routes.
Title: Genetic Metabolism
Post by: Numsgil on March 22, 2005, 11:08:16 AM
I agree with schvarz on this one.  I don't see a mechanism, either programmed in or implied, stopping bots from digesting everything and anything.

Also, I don't think the stomach should know which of the enzymes to use.  If you have 10 fat digesting enzymes, each one can cleave n fat per cycle.  The bot doesn't know which one does it better than others.  Which one is used is random for each fat bit.

Also, I think having multiple activation sites of the same substance on the same enzyme should have a slightly deleterious effect.  It can only cleave what fat comes to it through osmosis.  So each enzyme gets n fat per cycle and then an activation site is randomly chosen.

The idea is that each enzymes is a self regulated machine.  Each activation site on the enzyme is encapsulated, and has no knowledge of the other sites.

My personal goal is to make the bots as object oriented in philosophy as possible.  By that I mean that the right hand doesn't know what the left hand is doing unless they specifically interact.
Title: Genetic Metabolism
Post by: shvarz on March 22, 2005, 11:22:09 AM
Here is the system I think would work fine:
We have several slots for enzyme complexes.  "Complex" is a string of bits.  The length of the string is not limited.  The longer the string the more we charge.
If enzymes that work in sequencial reactions are located in the same complex, then they do their work more efficiently.

We will adjust the number of slots allowed and the charge per enzyme with time:  when metabolism will start getting more complicated we'll allow more slots/cheaper enzymes.  This way the potential number of enzymes will not be limited, but at any given times bots will have to make a choice between all available enzymes.

I am almost done with metabolism and it looks like we are going to have ~40-50 enzymes right now (don't get scared, the system is very simple).  So we should force the bots to choose ~20-30 enzymes from this variety.  I'd say to let them have 8 complexes and charge at the rate that makes it almost impossible to have more than 5 enzymes per complex (there are no sequencial reactions longer than 5 steps anyway).
Title: Genetic Metabolism
Post by: PurpleYouko on March 22, 2005, 01:24:00 PM
Quote
I'm going throw back your own argument at you PY:  What's stopping the bots from being omnivores?  They'll just bloat up their enzyme sequences to have all possible digestion routes.
Yes they could but the cost of doing so would be prohibitive as they would have to pay to make all those different types of enzymes. This would make them a whole lot less efficient than a specialist feeder.

Why spend all that energy making useless fat digesting enzymes when the only available food is cellulose.

Bots with all the possible enzymes in full production would soon die out.
Evolution will see to that.

Quote
I am almost done with metabolism and it looks like we are going to have ~40-50 enzymes right now (don't get scared, the system is very simple). So we should force the bots to choose ~20-30 enzymes from this variety. I'd say to let them have 8 complexes and charge at the rate that makes it almost impossible to have more than 5 enzymes per complex (there are no sequencial reactions longer than 5 steps anyway).

Looks like you are pretty much in agreement with me in this later post. Only difference is that I say we let 'em have as many as they want and if they can't afford them, tough! Evolutionary dead end!

 :D  PY  :D
Title: Genetic Metabolism
Post by: PurpleYouko on March 22, 2005, 01:29:27 PM
Quote
we are going to have ~40-50 enzymes right now

I have a question here.
Are you :D  PY  :D
Title: Genetic Metabolism
Post by: PurpleYouko on March 22, 2005, 01:35:27 PM
Quote
Also, I don't think the stomach should know which of the enzymes to use. If you have 10 fat digesting enzymes, each one can cleave n fat per cycle. The bot doesn't know which one does it better than others. Which one is used is random for each fat bit.

OK this is an interesting concept that I hadn't really thought of.

So are you saying that if the total bit pattern contains 50 sub patterns that are recognizable as enzymes by the program, that the bot will make all available enzymes in equal quantities?

If so then there will be a strong evolutionary drive to lose the ones that don't work too well in addition to getting better ones. It is obviously going to be more efficient to only make one good enzyme for a particular purpose (digesting fat) than to make one good one and a dozen cheesey ones that bairly work for the same purpose.

We should see robots with the bare minimum enzyme patterns with this method.

 :D  PY  :D
Title: Genetic Metabolism
Post by: Numsgil on March 22, 2005, 01:36:48 PM
Quote
I say we let 'em have as many as they want and if they can't afford them, tough! Evolutionary dead end!
That would be my thought.  Exactly how we charge for enzymes I'm still not sure on, but if you want to be an omnivore, and digest absolutely everything possible, it should be an option.  Remember that omnivores do actually exist in real life.  There are situations that call for it.
Title: Genetic Metabolism
Post by: Numsgil on March 22, 2005, 01:40:48 PM
Quote
...

We should see robots with the bare minimum enzyme patterns with this method.
That's the general idea I was after.  Reward minimalist bots.  The amount of reward is open to debate, but I would like to see a mechanism to prune inefficient patterns from the genome.  A spring cleaning incentive.

This of course only applies to activation sites on the same enzyme.  I may very well want to produce more of enzyme A than enyzme B.  But activation sites on an enzyme that cleve the same materials should be equally likely to work as each other.
Title: Genetic Metabolism
Post by: shvarz on March 22, 2005, 03:00:14 PM
OK, I know this is open for discussion, so this is just my side of story:

   1. Specifying particular enzymes that do one job?

Right now I do one enzyme - one job.  The difference in efficiency will come from "3-bits on each end" idea of Num's, from enzyme complexes and from total amount of enzyme.

   2. Modeling multipe enzymes for each job, all with different efficiency rates?

No.  See above.

   3. Modelling a bit pattern for each enzyme and allowing the program to randomly try to match it through mutation?

No.  Enzyme function is hard-coded.  Again, see above.

   4. Modelling mechanisms that Num and me (well Num mostly) have to figure out the best way to make a bit pattern system work with?

Not sure what you mean.  As far as available enzymes, I just assume we'll have some kind of modification of Num's bit system.

P.S:  Jeez, I must do some work today.  But all these discussions make me wanna drop everything and present the metabolism I have to all of you.  But I don't want to rush it, cause if I explain it poorly, you all will hate it and all my work will go to waste :)
Title: Genetic Metabolism
Post by: Numsgil on March 22, 2005, 03:13:58 PM
I'm not sure what your argument is.  Are you saying that one enzyme (meaning that string of bits.  What you call a complex) can't have multiple actiavtion sites for the same susbstance?
Title: Genetic Metabolism
Post by: PurpleYouko on March 22, 2005, 04:35:24 PM
It's not an argument. I am simply trying to get to the point where we all understand exactly what the others are saying.

I have a strong suspicion that we are all thinking of more or less exactly the same thing but are describing it in different ways.

My questions today are mostly about descriptions rather than methods.

Shvarz answered the last few pretty well.
Quote
4. Modelling mechanisms that Num and me (well Num mostly) have to figure out the best way to make a bit pattern system work with?

Not sure what you mean. As far as available enzymes, I just assume we'll have some kind of modification of Num's bit system.

Not being sure actually answers the question effectively. It means that the concept has no clear idea of the bit pattern mechanism but just contains the metabolic mechanisms. That is just fine and I have no problem with that. It just means that it is now up to the programmers to fit the mechanisms into the game. It was Nums idea to use the bit pattern and I think I am coming to understand it pretty well now but it could still use a little explanation so here are a couple more questions/comments. (not arguments but clarifications) ;)  PY  ;)
Title: Genetic Metabolism
Post by: Numsgil on March 22, 2005, 05:08:25 PM
Okay, I'm going to try to answer what I can but we really need to use the same terms soon.  I'm willing to follow the concensus but as it is I think alot of cunfusion is arizing from terminology.

1.  I was imagining that activation sites are 8 to 11 bits long.  If we have 50 reactions, 8 bits means that roughly 1 of every 5 random bit patterns does soemthing, which is still really high in my opinion.  11 bits means 1 out of 40 actually does something, which is closer to the right direction.

Remeber that that's 1 out of 40 for any single 11 bit pattern.  Most enzymes (that long string of bits with ultiple activation sites) are probably like 50+ bits long.  In 50 bits you're bound to find some 11 bit long activation pattern.  I don't have time for a statistical test to find better numbers, but we can play around with it.

2.  Almost right.  Multiple sites don't mean that they are more efficient, just that there are more possible routes for any single substance to go through.

Say you have a 20%, 30% and 90%.  The efficiency of htat enzyme (or complex if you prefer) is the average, or 47%.  If something messes up the 20%, it will actually increaes the efficiency.  If something copies the 90% to another part of the enzyme, then it will increase the efficiency.  You get the idea.

4.  A pattern has no start or stop.  It's just a pattern.  101101 is an activation site, say.  Then whenever you can find 101101 in a bit pattern, that's an activation site.  If you have 101101101 as your pattern, you actually have two overlapping activation sites.