Author Topic: HTML DNA (Re: Programming task (DNA editor))  (Read 4165 times)

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
HTML DNA (Re: Programming task (DNA editor))
« on: April 01, 2015, 11:45:58 AM »
Do Be patient, I skipped a few of these comments, but if were making DNA more realistic with a basepair sort of thing. Can I provide some input.
HTML

It is >THE< Coding language of basepairs, you have the <blablabla> command then the matching </blablabla> Why not model the new language a bit like HTML. Its a beautifal language for beginners (I <3 HTML) and its just like how it seems we need. It'd provide perfect crossovers as well, the program internally numbers each basepair then cross's them over? It'd be much more structured to. Admittedly it throws the DB2 type system and probably most we've though about out the window, but hey thats why DB3 is really.
« Last Edit: April 03, 2015, 12:56:14 PM by Numsgil »
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #1 on: April 01, 2015, 12:11:03 PM »
HTML (or XML or Lua or any structured programming language) is not a good fit for Darwinbots.  At the most basic level, the DNA language needs to be able to both be programmable by people and by "closed" under mutations.  By which I mean the mutations need to keep the program syntactically valid.  Which you could still do with more structured languages but it means your mutation code has to understand the structure of your language, which injects some artificiality in to the system.  Which undermines to some degree the "natural" aspect of natural selection.

The DB2 language and Sunweaver (the DB3 language) are designed such that any permutation of a valid program is still a valid program.  Which means the mutation code can do the same sorts of mutations that natural DNA does, like transpositions and duplication and insertion, etc., without any special knowledge of how the DNA or program is supposed to be structured.

Now, all that said that's not to say human programmers need to program in that language natively.  There's PyBot for DB2, for instance.  But the language is the way it is not by chance but by design.  Compare against Forth and you'll see many similar ideas, for instance, as an example of a sort of convergent evolution.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
Re: Programming task (DNA editor)
« Reply #2 on: April 02, 2015, 01:22:52 PM »
HTML (or XML or Lua or any structured programming language) is not a good fit for Darwinbots.  At the most basic level, the DNA language needs to be able to both be programmable by people and by "closed" under mutations.  By which I mean the mutations need to keep the program syntactically valid.  Which you could still do with more structured languages but it means your mutation code has to understand the structure of your language, which injects some artificiality in to the system.  Which undermines to some degree the "natural" aspect of natural selection.

The DB2 language and Sunweaver (the DB3 language) are designed such that any permutation of a valid program is still a valid program.  Which means the mutation code can do the same sorts of mutations that natural DNA does, like transpositions and duplication and insertion, etc., without any special knowledge of how the DNA or program is supposed to be structured.

Now, all that said that's not to say human programmers need to program in that language natively.  There's PyBot for DB2, for instance.  But the language is the way it is not by chance but by design.  Compare against Forth and you'll see many similar ideas, for instance, as an example of a sort of convergent evolution.
But remember, DNA is also structured. HTML is the best structural match to the very simplest level of DNA on a litteral sense, I do get where your getting at, but if we did it like HTML with a 'left tag' and 'right tag' then all the program needs to know is 2 tags join together...Now, DNA naturally knows this...So its not as much bringing 'artificiality' to the system?
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Programming task (DNA editor)
« Reply #3 on: April 02, 2015, 01:50:29 PM »
You're oversimplifying  HTML. The HTML5 spec, that's quite a bit to understand for the program. Many web developers have difficulty to produce valid html code, yet DB should understand which mutations can be done, which would take time and will cost performance.

As a HTML like language is the best match to DNA, what would a html or xml bot look like?
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #4 on: April 02, 2015, 05:47:56 PM »
But remember, DNA is also structured.

I would argue DNA is not really structured.  At its most basic "coding" level, there are 64 possible instructions (the codons) in the instruction set which map to something like 20 unique assembly instructions (the amino acids).  Any random assortment of codons is still a valid DNA program.  It won't necessarily do the right thing, and I'm grossly oversimplifying the start/stop codons and the epigenetic protein expression regulation mechanisms in the cell, but in principle any arbitrary DNA strand can code a protein.

So I don't see the HTML/DNA connection you're making.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
Re: Programming task (DNA editor)
« Reply #5 on: April 03, 2015, 08:58:43 AM »
You're oversimplifying  HTML. The HTML5 spec, that's quite a bit to understand for the program. Many web developers have difficulty to produce valid html code, yet DB should understand which mutations can be done, which would take time and will cost performance.

As a HTML like language is the best match to DNA, what would a html or xml bot look like?
Ok, commands are grouped into their matching pairs
lets say we have slightly more than just the 4 possible items which each side of a base pair could be...
The starting program might look like
<A></B>
The simulation knows A can go with B, C, D or E but nothing else. It also knows B can do with A, C, D or E. At each mutation event it selects one of these 2 sides of the pair to be mutated, then off random chance will select a letter that matches...lets say B mutates this time
<A></D>
Results in that, but it could equally result in
<A></E>
Now the DNA will probably be longer than 1 pair, so A /E might suddenly make the bot go extinct because it has worse DNA.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: HTML DNA (Re: Programming task (DNA editor))
« Reply #6 on: April 03, 2015, 03:30:49 PM »
So what would a bot look like?

From this I think that fro example .repro would turn into <a><b/>.  I don't how that would make it easier.
Oh my god, who the hell cares.

Offline spork22

  • Bot Destroyer
  • ***
  • Posts: 328
    • View Profile
Re: HTML DNA (Re: Programming task (DNA editor))
« Reply #7 on: April 03, 2015, 03:34:21 PM »
It would confuse me a whole ton.
Hubba Jubba Lollywash!