Ok, I am not fully understanding the code, how would the following gene work....
start
*.eye5 25 >
*.refeye *.myeye !=
*.refshoot *.myshoot !=
*.refpoison *.refshell =>
and
and
and
16 .shootval store
-6 .shoot store
stop
Think of it this way: conditionals can now be executed in the body of the gene and memory modifications can now be executed in the conditional portion. The way I'm planning on doing this, a gene begins at either a Cond or Start and ends at a stop. Conds or Starts in the middle of genes are ignored. This means that all existing hand-coded bots will continue to work exactly as they do today without a single change. Total backwards compatability. However, the behaviour of evolved bots may change as operations which were previously ignored (boolean operations in the body or memory operations in the conditional header) now execute, for example, changing the value on top of the boolean stack and thus may impact the evolved code in a major way causing logic that used to fire to no longer do so or vice versa.
EDIT: So, a correction. A Start in the middle of a gene isn't exactly ignored. It means "AND together all the values on the boolean stack and place the result on the top of the stack."
So, the gene above works just fine as does:
cond
*.eye5 25 >
*.refeye *.myeye !=
*.refshoot *.myshoot !=
*.refpoison *.refshell =>
and
and
and
start
16 .shootval store
-6 .shoot store
stop
as well as:
cond
*.eye5 25 >
*.refeye *.myeye !=
*.refshoot *.myshoot !=
*.refpoison *.refshell =>
start
16 .shootval store
-6 .shoot store
stop
But
start
*.eye5 25 >
*.refeye *.myeye !=
*.refshoot *.myshoot !=
*.refpoison *.refshell =>
16 .shootval store
-6 .shoot store
stop
will not work the same. The stores to .shootval and .shoot will only be predicated on the result of the last boolean operation (*.refpoison *.refshell =>) not on the logical ANDing of all four. Thus, you can't just remove all the starts from your code. Doing so will change the behaviour of any genes with more than a single line conditional.