Darwinbots Forum

Bots and Simulations => DNA - General => The Gene depository => Topic started by: d-EVO on October 27, 2008, 10:51:24 AM

Title: my little insert
Post 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

Code: [Select]
1 *.refshell sgn -5 multi sub .shoot
If it doesnt work it is because I havnt tested it, should work in theory
Title: my little insert
Post by: Welwordion on October 27, 2008, 11:52:41 AM
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)
Title: my little insert
Post by: d-EVO on October 27, 2008, 12:48:35 PM
oops, my bad. easy fix

*.refshell sgn -1 add 5 mult -1 add .shoot store
Title: my little insert
Post by: bacillus on October 27, 2008, 11:53:46 PM
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.
Title: my little insert
Post by: d-EVO on October 30, 2008, 09:30:18 PM
Quote from: bacillus
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.

Title: my little insert
Post by: d-EVO on October 30, 2008, 09:41:32 PM
my bad, fixed it to work with poison and shell

*.refshell *.refpoison add sgn -1 add 5 mult -1 add .shoot store
Title: my little insert
Post by: Moonfisher on October 31, 2008, 08:32:44 AM
Quote from: d-EVO
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
Title: my little insert
Post by: d-EVO on October 31, 2008, 10:13:37 AM
Fine. then it is even easier

*.refpoison sgn -5 mult -1 .shoot store
Title: my little insert
Post by: d-EVO on October 31, 2008, 10:20:48 AM
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
Title: my little insert
Post by: bacillus on October 31, 2008, 06:47:45 PM
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?)
Title: my little insert
Post by: Welwordion on November 02, 2008, 04:36:04 AM
Code: [Select]
*.refpoison 0 >
-6 .shoot store
not
*.refshell 0 >
-1 .shoot store
not
-6 .shoot store
dropbool
dropbool

How about this for conditional logic?
Title: my little insert
Post by: d-EVO on November 11, 2008, 03:27:13 PM
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