Code center > Suggestions
Non-Determinstic Bot DNA flow
Carlo:
--- Quote ---Every one of these genes has to be 100% able to operate on every cycle or the robot does absolutely nothing.
Never mind slow reflexes. It just doesn't react to anything... EVER. it just sits there and does absolutely nothing.
--- End quote ---
PY, that's what happens when you use undocumented and deprecated techniques like using the stack to make genes communicate. There's nothing your combat bot can do that a nd bot can't - maybe just a bit slower. But it needs a different kind of programming. You shouldn't be so afraid of changes.
--- Quote ---By the definition of the non-deterministic system, only one of these genes can activate in any given cycle, therefore it can never turn at all under any circumstances.
--- End quote ---
By the definition of a non deterministic system, you can't leave values in the stack for other genes, because it is erased at each cycle!
--- Quote ---Simple little things like Diplomaticus Diplo may still work reasonably well but that is because they are incredibly simplistic to start with.
--- End quote ---
They are perfect for DB. DarwinBots, as the name suggests, is about evolution, not super perfect combat bots. You can use it as a programming game as much as you want, but you can't modify it to be a better programming game or favour combat to evolution. DB is _artificial life_ and that means that every other use you make of it other than evolving robots, is you personal misuse.
Carlo:
--- Quote ---Before it saved 15 in .up on every cycle and now only every 3rd/4th cycle, so of course its speed was lower. I also had to adjust the energy flow, because Alga were now spending 3-4 times less energy/cycle than before.
--- End quote ---
Ok, that's normal. Obviously you have to tweak sim parameters to match the changed conditions.
--- Quote ---The more active genes bot has, the slower is the time flow. This is a problem in itself, as you are driving evolution to either reduce the number of potentially active genes or to make each gene more complex. A duplicated copy of a gene is a huge liability, because without contributing much it slows down bot's reaction time. It should not be this way.
--- End quote ---
I don't think so. Say that a robot has three different active genes in a certain condition. Each of the three active genes has 1/3 chances of being executed. Now, if one of the three genes gets duplicated, the active genes become four, each with 1/4 chances of being executed; but, since the two copies of the duplicated gene are identical, now that gene has 1/2 chance of being executed, while the other two have 1/4 chances. So, a gene, duplicating, increases its expression in the phenotype, decreasing that of the other genes. So that an equilibrium will be found between the importance of the various reaction to events. Correctly balanced mixes of different reactions should be easily selected with this system.
Every one of the duplicated genes still contributes to the overall behaviour, because they are under selective pressure. They don't become junk immediately as it is now usual. And a gene that remains functional, is also a gene which has more chances to mutate in an effective way. And mutations contribute to the behaviour. Etc.
--- Quote ---In addition, it is impractical from our point of view, because the speed of simulations is essentially slowed down by a factor equal to the average number of active genes.
--- End quote ---
This is true. However, I'd prefer a more elegant and more effective system working slower than a high speed system which is cludgy and works bad. The problem here is simple to solve: I'd slow down physics. Robots really move too fast in standard conditions for ND execution. I'm running a high friction sim right now, with robot moving MUCH slower... and it's interesting, robots after only 240K cycles adapted perfectly to the new environment, put against the original ones they completely wiped them out.
I've set high values for genes duplication and deletion (1 in 200 for duplication, 1 in 200 for deletion, E_Diplo had 10 genes at start); now the genes are 16, this means that an increase in genes number is positively selected, as I said before.
--- Quote ---As I said, in theory the non-deterministic processes should be moved further down into the guts of simulation, so that the execution of different genes appears to be parallel and happening at the same time.
--- End quote ---
I surely agree. We could, for example, make genes execute each time in a different order. This would _discourage_ relying on the execution of a certain gene before in the same cycle; but on the other hand the execution would actually happen, sometimes. So, what happens if a gene sends a message through a tie, and signals to another gene that the tie now can be destroyed? Sometimes the other gene will read that signal _after_ the message has passed through the tie, but other times they will read it _before_, and destroy the tie before the message passes through it.
Numsgil:
IF you really want ND to work right, the problem is thus:
1. All commands are executed at the end of every cycle. So complex commands cannot use more than one gene to work properly.
If commands are instead executed every n cycles, where n is roughly the number of genes the bot has, the genes can work together without necessarily communicating. Just an idea.
Obviously another problem is the nature of DNA execution, which leaves modern bots in the grind, so to speak, but that's inherant in the system.
We're reaching a stalemate position, so we should probably just vote and decide if this is the direction we want DB to move in.
I vote nay, for the simple reason that a chromosomal system such as I outlined solves all the same problems with non of the problems (I'm not even sure it has problems.)
Carlo:
--- Quote ---1. All commands are executed at the end of every cycle. So complex commands cannot use more than one gene to work properly.
If commands are instead executed every n cycles, where n is roughly the number of genes the bot has, the genes can work together without necessarily communicating. Just an idea
--- End quote ---
No-o. If commands are executed every n-th cycle, things become exactly as they are now. One of the main reasons to move to ND execution, is that this way commands are executed right after the gene execution stopped: this means that the other genes are sure that the operations have been performed and that a physical effect has been produced. DNA now is only partially working like that: if you have two genes, the first is correctly aware of operations made by the second with up to date physics, but the second is not. When I programmed vermis_patavinus, which has a complex structure, I had to program its embryonic development backwards (with genes activating first placed in the last positions of the dna), to be sure that their activation sequence was coherent with the changes in the outside world.
By the way, can you make an example of a complex command that needs more than one gene to work _properly_?
--- Quote ---I vote nay, for the simple reason that a chromosomal system such as I outlined solves all the same problems with non of the problems (I'm not even sure it has problems.)
--- End quote ---
Your chromosome idea moves nondeterminism from the level of the gene to the level of groups of genes. Instead of having one of the active genes executed, you have one of the cromosomes (in fact each a dna on its own) randomly picked and executed. But if an executed gene in my system is, at least, an active gene, why should be a chromosome preferred to another one? Chromosomes aren't active or inactive. You may have two chromosomes, one with just one gene always active (or even without any active genes!) and one plenty of genes. And you'd have each chromosome (and therefore, each gene) executed on average 1/2 of the times. You won't be sure of the execution of a gene, nor of the fact that an executed gene has produced any physical effect. So it seems to me that your system manages in combining together the worst defects of both systems, deterministic and nondeterministic.
Numsgil:
--- Quote ---By the way, can you make an example of a complex command that needs more than one gene to work _properly_?
--- End quote ---
Well, since The One is a single gene and does just fine, no, I can't.
But there are processes that are made easier by different genes. Forming a multibot being a good example.
--- Quote ---Your chromosome idea moves nondeterminism from the level of the gene to the level of groups of genes. Instead of having one of the active genes executed, you have one of the cromosomes (in fact each a dna on its own) randomly picked and executed.
...
So it seems to me that your system manages in combining together the worst defects of both systems, deterministic and nondeterministic.
--- End quote ---
No, you misunderstand. ALL the chromosomes are executed at the same time. They just can't affect the cell until ALL other genes have executed. So, as far as they're concerned, they're all happening at the same time, which was your original goal, right? The only linearity at all is inside the chromosomes, where the stack allows values to be passed from gene to gene within the cycle.
At first I saw this as a liability. Real chromosomes aren't executed linearly, I thought. Since the proteins they inscribe are floating around in the cell, all can work at the same time, with one not operating before another. But later I learned, researching mutations and crossing-over, that expression of a gene, that is, it's transcription into a protein in the first place, can be changed if it moves location in the chromosome.
This implies that the transcription of genes is at least partly controlled by the genes around it. Probably transcription inhibitors at least partly work for genes around their primary target, or work for large locations of on the chromosome, or something along that line.
So while one gene passing stack values to another isn't 100% realistic, neither is it all that unrealistic, and bots aren't necessarily real creatueres anyway.
Where conflict arises in my system, perhaps two store commands to .up, we have to define a system for which command to follow. Randomly picking one could work, and follows alot of the consequences for ND DNA, but there are other possibilites too. We could give preference to one value over another. We could select the most numerous command every time. We could pick the command closest to zero, or furthest from zero. We could pick the command with a value closest to the bot's nrg levels. We could pick 101 over all other numbers because we like the way it looks. Each has different implications to DNA evolution and bot execution, so we'll have to pick a method carefully.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version