Author Topic: Darwinbots enzyme system  (Read 41044 times)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Darwinbots enzyme system
« Reply #90 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.
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
Darwinbots enzyme system
« Reply #91 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.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Darwinbots enzyme system
« Reply #92 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?

Offline PurpleYouko

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

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Darwinbots enzyme system
« Reply #95 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:
« Last Edit: July 07, 2005, 11:22:03 AM by Carlo »

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Darwinbots enzyme system
« Reply #96 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)
« Last Edit: July 23, 2005, 06:26:17 PM by Endy »

Offline Numsgil

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

Offline PurpleYouko

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