Bots and Simulations > DNA - General

my tryouts. Help plz

<< < (8/13) > >>

Welwordion:
Jeez just shot me I can not understand the world anmyore.
Gene 6 the feeding genes gets activated  but it does not feed and ithe bot ties to bots of the same species although that is forbidden (cond in gene 9 ssay there has to be already one tie and it must be a multibot already)

'gen1
cond
*.numties 0 =
*.multi 0 =
*.eye4 *.eye5 > or
*.eye3 *.eye5 > or
*.eye2 *.eye5 > or
*.eye1 *.eye5 >
start
*.eye1 3 mult *.eye2 4 mult add *.eye3 5 mult add *.eye4 6 mult add 10 div
.aimsx store
stop

'gen2
cond
*.numties 0 =
*.multi 0 =
*.eye6 *.eye5 > or
*.eye7 *.eye5 > or
*.eye8 *.eye5 > or
*.eye9 *.eye5 >
start
*.eye9 3 mult *.eye8 4 mult add *.eye7 5 mult add *.eye6 6 mult add 10 div
.aimdx store
stop

'gen3
cond
*.vel 30 <
*.multi 0 =
*.numties 0 =
start
30 *.vel sub 2 div .up store
stop

'gen4
cond
*.eye5 50 >
*.numties 0 =
*.multi 0 =
*refeye 0 =
start
20 .tie store
stop
cond

'gen5
cond
start
885 inc
stop

'gen6
cond
*.numties 0 >
*.trefnrg 4000 >
*885 2 mod 0 =
start
-1 .tieloc store
-1000 .tieval store
20 .tienum store
cond

'gen7
cond
*.nrg 9000 >
*.multi 1 =
*.numties 1 =
start
314 .fixang store
40 .stifftie store
stop

'gen8
cond
*.multi 1 =
*.numties 1 =
*.nrg 10000 >
start
70 .repro store
stop

'gen9
cond
*.eye5 30 >
*.numties 1 =
*.multi 1 =
*refeye *.myeye =
start
10 .tie store
stop

end

PurpleYouko:
You have a few errors here.

gene4 is the cause of the bot tying to his own species.

--- Quote ---'gen4
cond
*.eye5 50 >
*.numties 0 =
*.multi 0 =
*refeye 0 =
start
20 .tie store
stop
cond
--- End quote ---

You are missing a dot between the * and the refeye.

In other words this line says 0 0 = which is always true. It is going to fire a tie at anything it sees as long as it doesn't have one already.

You also have an extra "cond" at the end. This may cause problems.

Gene6

--- Quote ---'gen6
cond
*.numties 0 >
*.trefnrg 4000 >
*885 2 mod 0 =
start
-1 .tieloc store
-1000 .tieval store
20 .tienum store
cond
--- End quote ---

First the trefnrg won't work. It will require a command line "20 readtie store" in a prior gene in order to function. It doesn't know which tie to read otherwise.

You are ending the gene with a "cond" instead of a "stop"

Make these changes and try again

Welwordion:
Seems to work better(thx) although the mod command seems still to be faulty used by me as it only works if I take this condition out.
(hope I am not annoying you with this kind of mistakes)

Numsgil:
You can't have actions in the cond of a gene pre 2.4.

cond
5 6 add 11 =
start
...

will not work.  I don't know what it will do.

In 2.4, you can totally do this.

Welwordion:
Can robots(not the user) monitor the activation of gens? So the might learn to associate certain genes with certain chnages in their condition?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version