Bots and Simulations > DNA Tools
Sanger
Peter:
--- Quote from: Gobo ---"Decompiling" is just another task. You cannot just take any DNA code and transform it into Sanger, since DNA code produced with Sanger is just a subset of all possible DNA code. I'm planning to write a tool, which would deobfuscate DNA code a little bit. But at the moment, I cannot advance because I don't understand how cond-start-else work exactly. I need to experiment with those.
--- End quote ---
Yes, decompiling is the word. I thought that you made with your program normal animal minimalis dna, but you make SGinised animal minimalis dna.
And, yes there are different kinds of programming. Could be nice to see animal minimalis being changed ito his SGinised version this way.
But further you say this is pre-alpha, is it already possible to make all kinds of bots or was this just an example. I could maybe try and see, but I have a little difficulty to understand it all.
I don't know much different programing-langues so that could also be me. If there is a manuel maybe I am taking a look. Undocumated it will probably too hard.
Gobo:
Classic animal minimalis with conditional genes will look like the following:
--- Code: ---friendly() -> *.refeye == *.myeye;
/* Food Finder */
when ( *.eye5 > 0 && !friendly() ) {
.dx = *.refveldx;
.up = *.refvelup + 30;
}
/* Eat Food */
when ( *.eye5 > 50 && !friendly() ) {
.shoot = -1;
.up = *.refvelup;
}
/* Avoiding Family */
when ( *.eye5 == 0 || friendly() ) {
.aimdx = rnd(314);
}
/* Reproduce */
when ( *.nrg > 20000 ) {
.repro = 10;
}
--- End code ---
Here I changed familiar if-else syntax to when-otherwise in order to explicitly differentiate between if-else that will encounter inside genes due to limitations in if-else constructs described above (when-otherwise construct won't have these limitations naturally). But if community decides it is not essential, I may use the same syntax for both (what do you say?).
It is called pre-alpha because syntax is subject to change (e. g. I'm now inclined to change ... ?? ... = ... syntax in favor of ... = ... if ...), documentation is not yet here, and there may be some several bugs, since it was not thoroughly tested. Also I'd like to introduce if-else construct in alpha. Though it is quite functional. You can write in anything you want, not just Animal Minimalis, for sure
Numsgil:
A DNA deobfuscater (sp? ) would be very helpful, too. Though considering how insane DNA can get it's not an easy task. The simplest would be to backtrack from all the store, inc, or dec operators and remove and "junk" dna that doesn't effect the final result. Some sort of DNA stripper.
I don't mind the when...otherwise thing. Makes the language have character
The ternary operator in C (which is what I'm used to) operates like this:
a ? b : c, which is the same as:
if a then b else c. So if your ternary operator is significantly different from that form, there's some unlearning that needs to be done by people like me. And Perl's && and || syntax seem a little alien to me, though you explained it very well. I might need to do some quick research.
With the new changes to conditions, it actually simplifies a lot of the DNA. You can totally get rid of cond blocks and just have a long start statement. I might write up a new version of animal minimalis in another thread as a demonstration. I think it should make some of what you're doing easier, too.
EricL:
I second the call that an evolved DNA deobfuscator would be very useful. Building a complete one is harder than it sounds though. I been thinking of doing it in the simulator since by doing so, I could leverage the actual DNA execution logic which of course knows which things to ignore and which not to but the problem is that it doesn't know that at the moment the instruction pointer is on the base pair. It only knows down the road, when the boolean stack is cleared by a cond for example etc. as to whether boolena values pushed on the boolean stack got used. It can't make a real time decision as to whether removing a BP will impact the logic.
A few things are easy. Removing all non-coding DNA for example. But doing a complete job is a non-trivial task.
Oh, and Sanger looks cool. When I get two minutes to rub together I'll dive in.
Gobo:
Sanger 2.0 (alpha) is released!
http://www.ersatz.org/sanger-2.0.zip - source
http://www.ersatz.org/sanger.html - online
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version