Darwinbots Forum

Bots and Simulations => DNA - General => Tips and Tricks => Topic started by: Elite on May 04, 2006, 12:40:47 PM

Title: Bot combat tips
Post by: Elite on May 04, 2006, 12:40:47 PM
There are two ways you can beat another bot in a league:Here, you can post tips for the second option: Beating your enemy in one-on-one combat

***

Messing up your enemy:

.setaim .shoot store
*.aim .shootval store

^ This gene will cause an enemy to face away from you, even if they are facing away to start with. It is very effective.

***

Counterattacking:

cond
*.shflav 0 !=
*.shflav -2 !=
start
*.shang .aimshoot store
32 .shootval store
-6 .shoot store
0 .shflav store
stop

^ If shot, a bot with this gene will shoot back with deadly powered-up shots

cond
*.eye5 0 =
*.refeye *.myeye = or
*.refshoot 0 = or
*.shflav 0 !=
*.shflav -2 !=
start
942 *.shang sub .setaim store
0 .shflav store
stop

^ A bot with this gene will immediately turn to face an attacker if no bots, a conpec or a veg, is in sight

***

Accuracy:

*.refxpos *.refypos angle .setaim store

^ This gene will aim you at an enemy with very high precision

***

Anyone got any other tips?
Title: Bot combat tips
Post by: Numsgil on May 04, 2006, 12:47:07 PM
Quote from: Elite
Messing up your enemy:

.setaim .shoot store
*.aim .shootval store

^ This gene will cause an enemy to face away from you, even if they are facing away to start with. It is very effective.

 How about:
 
 cond
 *.shflav 0 !=
 start
 .aimdx .shoot store
 628 .shootval store
 *.shang .aimshoot store
 stop
 
 That would be quite effective as a "leave me alone, I'm busy" counter.
Title: Bot combat tips
Post by: abyaly on May 04, 2006, 12:58:48 PM
cond
*.eye5 50 >
*.refeye *.myeye !=
*.shup 0 !=
*.shflav -2 !=
start
.shoot .shoot store
-2 .shootval store
stop




Both of the primary combat methods you mentioned gain benefit from finding more food than your enemy. This is important enough that it may deserve it's own category.
Title: Bot combat tips
Post by: Elite on May 04, 2006, 03:54:12 PM
Quote from: abyaly
Both of the primary combat methods you mentioned gain benefit from finding more food than your enemy. This is important enough that it may deserve it's own category.
Yeah, your bot should quickly secure food locations and defend them

However, if you are efficient enough you can get food just from killing your enemies

***

Venom is also a great tactic

There's some fun venom ideas here - in my tutorial (http://www.darwinbots.com/WikiManual/index.php?title=Elite%27s_Bot_Tutorial#Venom)
Title: Bot combat tips
Post by: abyaly on May 04, 2006, 04:57:35 PM
How about firing cancer viruses at veggies? ^^
Hmm, maybe I should make vector do that.
Title: Bot combat tips
Post by: Elite on May 04, 2006, 05:04:31 PM
Quote from: abyaly
How about firing cancer viruses at veggies? ^^
Hmm, maybe I should make vector do that.

Hey, that isn't a bad idea

If you make Vector do it though you will loose the end-all antivirus protection
Title: Bot combat tips
Post by: abyaly on May 04, 2006, 05:09:08 PM
Quote from: Elite
Hey, that isn't a bad idea

If you make Vector do it though you will loose the end-all antivirus protection
Ill make it lose conspec recognition if the number of genes is wrong. Its family will cure it of the virus.
Title: Bot combat tips
Post by: abyaly on May 05, 2006, 11:58:31 PM
Man, veggie cancer viruses are awesome. They give my bot such a huge advantage. Carrying them will be worth the effort of designing a more complex viral defense  
Title: Bot combat tips
Post by: Endy on May 06, 2006, 05:46:20 AM
You can pretty easily defend yourself from your own viruses. If you set a condition in the virus gene like:
Code: [Select]
cond
*50 1 !=
start
50 .repro store
314 rnd .aimdx store
stop
you can keep them from activating in your own bot, by setting 50 to one at age zero

   In the virus tutorial we all kind of forgot that part, it has been corrected  

Theres also species specific stuff you can do with them but it's kind of tricky, I wrote about over in the wiki if your curious.
Title: Bot combat tips
Post by: abyaly on May 06, 2006, 08:16:38 AM
This is the gene I used:
Code: [Select]
cond
*.myeye 55 !=
start
50 .repro store
500 .aimdx store
-2 .shoot store
*.thisgene .mkvirus store
200 .vshoot store
stop
And entirely by coincidence, this virus is also deadly to bots ^^


The viral defense issue comes up because it can't be an SG bot if it uses this method. So I can't indiscriminantly .delgene gene 2 every cycle.

My current understanding is that viruses are inserted between the first and last gene. Is this accurate?
Title: Bot combat tips
Post by: Elite on May 06, 2006, 09:48:41 AM
Quote from: abyaly
My current understanding is that viruses are inserted between the first and last gene. Is this accurate?
Yes, that is accurate. You can .delgene gene two when you have more than 2 genes but the problem is that if the virus can do as it likes for about one cycle.

Here's a virus I programmed that wipes enemy DNA clean. Test your antivirus defences against it:

cond
' conspec recognition
start
 *.thisgene 1 rnd 2 mult -1 add add .delgene store
stop

You may have to place your 'main gene' last and the virus first. If your 'main gene' detects that *.thisgene = 3 then it .delgenes gene 2. That way the virus can't override your antivirus.

Use *.thisgene to detect the virus as *.genes can be tampered with

Use delgene to delete the virus as soon as you detect it. If you don't then it may .delgene one of your genes.
Title: Bot combat tips
Post by: abyaly on May 06, 2006, 11:16:12 PM
It is starting to seem to me that the most difficult part of writing DNA code is finding out exactly how everything works. There are many general descriptions available, but finding the precise ones is like an easter egg hunt.
Title: Bot combat tips
Post by: Numsgil on May 07, 2006, 12:54:30 AM
Alot of things are in constant flux as the developers (specifically me) change certain behaviors from release to release.

Feel free to add insights you find to the wiki.
Title: Bot combat tips
Post by: Endy on May 07, 2006, 08:09:10 PM
You could just delgene the viral cell as soon as you shoot it. Basically you'd be shifting from a 2 gene bot, to a SG bot. If the virus is self-replicating and it hits it's target it'll keep spreading, but not affect your own bots due to your conspec recognition coding.
Title: Bot combat tips
Post by: abyaly on May 07, 2006, 10:56:12 PM
But there is a sacrifice. I was testing the viral vector against the sg vector. Even with cancer, the veggies can be wiped out. I would rather  have the bots continue to be able to create their own food supply.
Title: Bot combat tips
Post by: PurpleYouko on May 08, 2006, 09:24:50 AM
Why not take a leaf out of the book of good old "T-Preservans" (Greenpeace)?

It used *.refenergy so that it never fired that last killing shot against a veggie so it kind of farmed them.
Title: Bot combat tips
Post by: abyaly on May 08, 2006, 12:14:35 PM
Is keeping the vegs alive by not eating them a better solution than creating more vegs to eat?  
Title: Bot combat tips
Post by: PurpleYouko on May 08, 2006, 12:43:29 PM
Well just make 'em reproduce if you can't eat them yet.

All you gotta do is fire a shot with a shootval of 50 into a veggies .repro memory location and you will force it to reproduce.
Title: Bot combat tips
Post by: abyaly on May 08, 2006, 01:16:51 PM
Why so much opposition to my viral solution? It works so well in practice, and the only cost is slightly diminished defense against enemy viruses.  

I fail to see how .repro shots are more effective.
Title: Bot combat tips
Post by: Elite on May 08, 2006, 01:28:45 PM
Viruses are a little dodgy in 2.4, and they can't be aimed (I think Num made some changes) and you don't keep the condition (which can be a good thing. If you have an impossible condition then it just gets stripped off when fired)

I'd think that viruses would be more effective. They get passed to offspring too.

cond
' conspec recognition
start
50 .repro store
314 .aimdx store
*.thisgene .mkvirus store
100 .vshoot store
stop
Title: Bot combat tips
Post by: PurpleYouko on May 08, 2006, 02:56:48 PM
I don't much like using viruses (even though I was the one who first introduced them)
Virus code can mutate. A few generations down, you might end up catching a virualent plague that wipes out your entire population.

In combat, viruses are an effective weapon but in eco-sims? I wouldn't recommend them.
Title: Bot combat tips
Post by: Elite on May 09, 2006, 02:27:03 PM
How's this for a neat instant-kill virus:

cond
 ' conspec recogntion
start
-2 .shoot store
*.nrg 10 mult .shootval store
stop
Title: Bot combat tips
Post by: Numsgil on May 09, 2006, 02:59:34 PM
Instakill viruses tend not to be as worthwhile as viruses that cause the enemy to languish for a while (and thus be able to spread the virus).
Title: Bot combat tips
Post by: Light on May 09, 2006, 03:15:15 PM
Viruses as a combat weapon aren't that great, instant kill ones are maybe usefull against powerfull bots but other than that a waste, and ones that impare a species usually take to much time and energy to propergate to be effective.
Title: Bot combat tips
Post by: abyaly on May 09, 2006, 05:42:29 PM
I think you have the wrong outlook on viruses. Since in combat there is no guarantee that the virus will work on the enemy bot, viruses used for killing are not favorable. So, instead, you could have a virus that improves eating, similar to my veggie cancer virus.

I mean, you could create a virus that causes a veggie to consume all of its body except 10 and fire all of its energy in the direction it is shot from. While this does not act as a weapon of mass destruction and it wont be something the bot can fire at every veggie, it will increase the speed and efficiency with which the bot eats.

Also, you could have a spreading virus that makes veggies inedible to other bots. Any number of methods come to mind. The veggie could attack things that are not your species. Or it could blindly fire at everything with -1 shots -- but your species has an anti-firing poison. It could react by moving away from -6 shots, while your bots eat vegs with -1s.
Title: Bot combat tips
Post by: Light on May 09, 2006, 05:46:57 PM
Your assumptions are wrong, doing that will severly hamper feeding as most of the energy will be shot out and most likely hit nothing and I have yet to see a virus enhance a good bots abilities in combat, overall I just dont think viruses are effective in combat.
Title: Bot combat tips
Post by: abyaly on May 09, 2006, 06:14:23 PM
Quote from: Light
I have yet to see a virus enhance a good bots abilities in combat, overall I just dont think viruses are effective in combat.
Wait until Vector 2 is done  
Title: Bot combat tips
Post by: Numsgil on May 09, 2006, 07:36:16 PM
Spanish Conquistador is nothing without its virus.
Title: Bot combat tips
Post by: PurpleYouko on May 10, 2006, 09:14:25 AM
Quote from: Elite
How's this for a neat instant-kill virus:

cond
 ' conspec recogntion
start
-2 .shoot store
*.nrg 10 mult .shootval store
stop
Just remember that there is an upper limit (1000 I think. Might be even less) for the size of a -2 shot.

This was added WAY back in V2.1 to counter a loophole in which a bot (I-Venia I think) used information shots to make an enemy bot send out huge -2 shots.