Author Topic: Darwinbots enzyme system  (Read 41101 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Darwinbots enzyme system
« Reply #60 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. :/
« Last Edit: July 01, 2005, 02:09:47 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Darwinbots enzyme system
« Reply #61 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!
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Darwinbots enzyme system
« Reply #62 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.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Darwinbots enzyme system
« Reply #63 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).
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Darwinbots enzyme system
« Reply #64 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.

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Darwinbots enzyme system
« Reply #65 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).
« Last Edit: July 01, 2005, 04:14:05 PM by Carlo »

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Darwinbots enzyme system
« Reply #66 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".
"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
Darwinbots enzyme system
« Reply #67 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.
« Last Edit: July 01, 2005, 06:12:08 PM by Botsareus »

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Darwinbots enzyme system
« Reply #68 on: July 01, 2005, 06:53:13 PM »
Yes, we'll fight to the death! and ... then give it up :)
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Darwinbots enzyme system
« Reply #69 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.
« Last Edit: July 01, 2005, 07:18:39 PM by Numsgil »

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Darwinbots enzyme system
« Reply #70 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.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Darwinbots enzyme system
« Reply #71 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.
« Last Edit: July 02, 2005, 03:28:33 AM by Numsgil »

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Darwinbots enzyme system
« Reply #72 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.

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Darwinbots enzyme system
« Reply #73 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?
« Last Edit: July 02, 2005, 12:12:34 PM by Carlo »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Darwinbots enzyme system
« Reply #74 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.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D