Darwinbots Forum
Bots and Simulations => DNA - General => The Gene depository => Topic started by: d-EVO on October 27, 2008, 10:51:24 AM
-
this is a gene insert I just cooked up.
This proves I am getting better.
guess what it does
1 *.refshell sgn -5 multi sub .shoot
If it doesnt work it is because I havnt tested it, should work in theory
-
Well currently this gene will change a info shot manipulating up into a waste shoot once the enemy has shell, if you would put a - before the 1 it would be an energy steal shoot transformed into an body steal shoot once the enemy has shell ^^.
Oh I looked it up you designed it the wrong way body shoots are stopped by shell energy shots not if you can believe the wiki.
http://www.darwinbots.com/WikiManual/index..._Tutorial#Shell (http://www.darwinbots.com/WikiManual/index.php?title=Elite%27s_Bot_Tutorial#Shell)
-
oops, my bad. easy fix
*.refshell sgn -1 add 5 mult -1 add .shoot store
-
Quite efficient, but I think it might be better to do it for poison; shell makes you waste your shots, but poison wastes your shots AND does nasty stuff to you.
-
Quite efficient, but I think it might be better to do it for poison; shell makes you waste your shots, but poison wastes your shots AND does nasty stuff to you.
uuhhhhh. It is supose to shoot -1 or -6 shots depending on whether the enemy has shell or not. it works well. no idea wat you talkin bout
use it by simply puting it were your .shoot would be.
-
my bad, fixed it to work with poison and shell
*.refshell *.refpoison add sgn -1 add 5 mult -1 add .shoot store
-
my bad, fixed it to work with poison and shell
*.refshell *.refpoison add sgn -1 add 5 mult -1 add .shoot store
What he ment was that -6 shots won't trigger poison and -1 shots are more powerfull against shell.
As far as I understand (not sure or anything) then a -1 shot will trigger poison if the target has more poison than shell.
So if you don't want to get poisoned but still wan't to use -1 shots against shell then only fire -1 shots if the target has 0 poison or less poison than shell.
But beware some bots create more poison if they get hit by a -1 shot... so often the safest solution is just to stick to -6 shots unless you're in the F3 league (no poison or shell) or maybe when eating alge.
To get more from an alge you could switch between -1 and -6 shots.
.dnalen .memloc store
*.memval 13 = 'Alge dnalen is 13
-1 5 *.timer 2 mod mult sub .shoot store
-
Fine. then it is even easier
*.refpoison sgn -5 mult -1 .shoot store
-
here is anothere that will shoot :
-6 shots if poison and shell
-6 shots if poison
-6 shots if no shell or poison
-1 shots if shell
*.refshell sgn -1 add 5 mult -1 add *.refpoison sgn ~ mult *.refpoison sgn -6 mult add .shoot store
-
I think that for these purposes, inline logic will be more efficient. I tried and failed using it once, but if I understand correctly, you can put conditions inside genes such as *.refpoison 0 !=, as long as you and all your conditions up, and use clearbool when you want to clear the boolean stack (is this necessary at the end of a gene?)
-
*.refpoison 0 >
-6 .shoot store
not
*.refshell 0 >
-1 .shoot store
not
-6 .shoot store
dropbool
dropbool
How about this for conditional logic?
-
I have been using this conditional logic gene but it seems to be unreliable. The current bot I am developing does not work for bots with poison.
It also elliminates the whole point of this insert which is to be be , not nessecarly the most simple but , the most rebust possable system.
If any body wants a crack a it ( develop 1 line that determines what shot to fire in a given situation without using conditions ) go ahead and post your solution here