Code center > Bugs and fixes
2.43u delgene defect? RESOLVED 2.43w
Welwordion:
I tried to make a gene that deletes itself after initializating some values for the first gneration, I placed it at the end of the genome but neither *.thisgene,*.genes, nor 8 .delgene deleted the gene always the previous gene number seven got deleted instead.
EricL:
Please post the bot.
I suspect you have an else in a prior gene body...
Welwordion:
http://www.darwinbots.com/Forum/index.php?...=0#entry1373115 the bot attached to my last post, but I do not thing it has anything to do with else, I have put the delgene command even in other genes in order to test it and the result was the same.
EricL:
Your bot has a typo. Count the starts. There are only 7 starts, not 8.
The problem is that *.thisgene uses start or else to increment .thisgene but the geneposition routine uses cond to find the gene to delete. Hmmmm. I will have to noddle on what the right fix should be.
Please always post a bot or sim with a bug report. There is no way I can keep track of everyone's posts and how else would I be able to know your bot has a typo?
Welwordion:
Sorry I did so much testing before that I did really think it had nothing to do with the bot, should have tested a different bot first ^^.
Navigation
[0] Message Index
[#] Next page
Go to full version