Strategy development

Posts: 28

Strategy development

Post#1 » 03 Apr 2017, 04:50

Here are some notes on the basics of my current strategy and how I have developed it.

I have pretty much had the same main AI since I started. I have done a bit of clean up from time to time but I have not yet done a complete rebuild.

Initially I just focused on fighting and my resource handling logic was limited to "If Any Enemy Not Exists" and this was enough to get into grand master. For me the basics of fighting are basically what is posted elsewhere on the forums. You need solid retreat logic - being able to determine when a bot needs to retreat in order to avoid being killed or even take a large chunk of health damage. You also need to be targeting and applying damage efficiently - shooting at ranges that are best for each bot class and minimizing situations where time is wasted due to retargeting and target moving out of range. In my opinion using "SelfAttacking" and having different logic for continuing to attack a target compared to attacking a new target are a key part of this.

As I played more I continued to build out my main AI to have better resource handling etc. After some time I got to a point where the most obvious improvements where map specific rather than applying to every map. So I began to develop specific AI's that still make use of all the logic in the Main AI. There are 2 approaches I use for this:

1) My preferred approach is what I believe is called the decorator pattern in some other threads. If my main AI is called "Main" then I will create a specific AI maybe called "Circle" with the specific logic on the left and then the "Main" AI as a sub tree on the right. Looking down my AI list I think I currently have 25 AI's that I use that follow this pattern.

2) Sometimes the decorator approach doesn't work because I need to make a specific change within the main AI. In those cases I clone the main AI and swap out one of it's subtrees. For example if my main AI called "Main" has a subtree called "Pickup" I might make another version of "Pickup" called "FastPickup" and then clone "Main to create "MainFastPickup" which is the same as "Main" except it uses the "FastPickup" subtree, It can be painful to maintain AI's created this way so I try to avoid it. Currently I have 3 AI's that I use that follow this pattern.

In terms of improving your AI's I think the most important thing is to watch and analyse every replay. Even my easiest wins I watch on fast forward looking for anything unusual that needs to be analyzed more closely.

If I lose I want to know why I lost and sometimes you will need to go through critical moments of the replay tick by tick to work out what is happening. If I can't see any obvious fix or improvement for my strategy then I closely analyze what the opponent is doing to see what I can steal from their strategy.

If I win I am looking for:
- Are any of my bots dying when I don't expect them to?
- Are any of my bots taking large chunks of health damage when I don't expect them to?
- Are any bots spending a lot of time re-targeting but not getting shots off?
- Are any bots making strange movements that I can't explain?

Posts: 13

Re: Strategy development

Post#2 » 03 Apr 2017, 10:24

I feel like my universal AI is pretty strong and I will go up in ranking (currently I am like ~1600 but this is because I do not play a lot of matches). There are some corner cases and rough edges that need to be polished but apart of that map specialization is the way to go.

Wozza wrote: Looking down my AI list I think I currently have 25 AI's that I use that follow this pattern.

And this is whats make me sad.. because creating like 25 AI to be in top 10 seems painful even if you use decorator pattern. I am looking forward to seeing random maps.

Posts: 3390

Re: Strategy development

Post#3 » 03 Apr 2017, 11:19

Ultral, nullpointer had like 150 specialized Ais before. It is the price of competition.

Anyway, nice writeup wozza and I do most of the things that you mentioned exactly the same, just I don't do specialized versions of my generic AI, only decorators, because I'm lazy.

Other similar topics:


viewtopic.php?f=3&t=372 -> Gladiabots CHAT, stats, insights and more ;

Return to “Strategies”

Who is online

Users browsing this forum: No registered users and 1 guest