Author Topic: Save robot function formatting RESOLVED 2.43.1M  (Read 2648 times)

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Save robot function formatting RESOLVED 2.43.1M
« on: August 02, 2008, 06:49:20 AM »
The save robot DNA function (under Robots -> Save Robot's DNA) exports the dna with the cond on the gene end line (and is thus commented out).

Actually, I just tested it again with one of my bots and it worked fine, it still doesn't work for the red bots in Nitus's sim (here), strange  

Here is how the red bot is exporting on my machine:
[attachment=965:testBot.txt]
« Last Edit: August 11, 2008, 12:51:33 PM by EricL »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Save robot function formatting RESOLVED 2.43.1M
« Reply #1 on: August 11, 2008, 12:57:53 PM »
When a cond is encounterred inside a coding region, the formatting code adds an implicit gene end comment line marking the end of the previous gene since a cond implicitly defines a gene boundary.  However, the code neglected to add a CRLF following the comment line in such cases.   This was not an issue for hand coded bots where an explicit stop marks the end of the previous gene.  For these hand-coded cases, the gene end comment is added when the stop is encounterred and cond is encounterred in a non-coding region.

Fixed in 2.43.1M.  Implicit end-gene comments inserted by the formatting code when a cond is encounterred in non-coding region are now followed by a CRLF.
Many beers....