Bots and Simulations > DNA - General

Basic Math

<< < (2/3) > >>

Numsgil:
To reset it, have this before the below gene:

cond
*.var 100 >=
start
0 .var store
stop

Also, by *.var I mean a custom label.  At the top of your DNA have this:

def var memorylocation. where var is the label name and memorylocation is a free memory location.

inc tends to work differently than a store command.  Inc seems to work more immediatly, so make sure you don't do something like:

cond
*.var = 0
start
.var inc
stop

cond
*.var = 1
start
.var inc
stop

or it will execute both genes.  Place them in reverse order and you're safe.

Numsgil:
And *32 inc won't work like you want.  It needs to be 32 inc to increment memory location 32.  Unless you're using 32 as a pointer.

Botsareus:
Num can bots mutate there own custom labels , or atleast reguler memory locations and memory pointers !!! yey !!!! , or else I start a new thread

ex:

*.32 100 <

or is it

.32 100 <

now I am confused

if
--- Quote ---*.32 100 <
--- End quote ---
really means a pointer from memory location 32, then I should have never started "errays other topic" thread, But now there is use for the "errays other topic" thread once more!!!!

 :D sorry for the complete inconsistency

Numsgil:
Bots can (I think) mutate to use new memory locations.  I'm not sure how advanced the code is for it, to be honest.  One of these days I'll go through the mutations code and rework it a bit.

Botsareus:
Make sure mutation works for "condition" part of the gene , I know mutation really works well creating memory locations in the "execution" part of the gene

make sure its for bouth pointers and reguler memory...

...This conversation has moved to the (suggestions > "arrays other topic") thread

thanks for your help Num

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version