Code center > Bugs and fixes

2.43u delgene defect? RESOLVED 2.43w

<< < (2/4) > >>

Numsgil:
.vshoot also seems to have a similar problem.

EricL:
To fix this, we need to agree on exactly what a gene is - where it begins and ends and what should happen with gene numbers for .mkvirus and .thisgene in certain cases.  We need them to use idencial rules for determining where genes begin and end.

I assume it's agreed that genes start at number 1 and begin with either a Cond, a Start (or an even an Else) and that genes end in a Stop or when another Cond is encounterred.

Q1) What if one or more Starts (or Elses) follow a Cond before a Stop or another Cond is encounterred?  
Is this one gene or two?

cond
start
start
stop

Q2) What about this?

start
start
stop

Welwordion:
I would say make it like this:
Cond = this will be added to the next gene that occurs
Start=  if (lock == 0) Gene begins set lock = 1 else ignore
Stop = end gene set lock = 0
that means :

cond
start
start
stop

is one gene and

start
start
stop

is also one gene

MacadamiaNuts:
From a virus point of view, it would be anything between two stores, in-gene conditions included.

But that would mean that all virus would need to be One-Store, which appeals me, as they wouldn't totally choke the host bot, but would be more annoying to code.

EricL:
We need to keep in mind that gene numbers are also used for other things besides viruses such as for human debugging.  The gene activations histogram will use the same definition of gene to show activations for example.  So, while I understand the one gene per store philosophy, I think that is too fine grain for a number of reasons.

One opinion I hold is that it should be possible for non-coding DNA to lie between genes and in particular for the definition of the end of a gene to require that semanticly, non-coding DNA may follow.  Thus, I would agree with Peter that multiple starts without corrosponding stops should not represent gene boundaries.  An embedded start will "AND UP" the boolean stack and control execution of stores for it's section, but it does not represent a gene boundary.  Thus the following is one gene:

cond
true
start
'this gets executed
false
start
'this does not get executed
start
'this does not get executed
dropbool
start
'this gets executed
stop

So, Peter has it I think.  Restated, a gene begines on a cond or start without a cond and only ends when a stop or another cond is encounterred.  Cond's can be thought of as containing an implicit stop.  

Personally, I would like somday to do away with cond completly.  It is superfilous given that boolean logic can now control store execution in-gene.  That would mean that genes start on a start and end on an stop and are controlled internally by boolean logic and if you want to simulate the cond-start-stop structure, you use a second start.  e.g.

start
boolean logic
start ' AND it all up
do the stores
stop

But realisticly I won't be doing away with cond anytime soon.  

So, to fix this bug (and some other related ones) I will impliment gene boundaries as above unless there are objections.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version