**Legend #90 **
1) Data Structure:
I have an array of monsters for each player separately based on the threat_for variable. This helps me to focus on the threat monsters first and neutral monsters later.
2) Sorting
Sort all my monsters based on distance to my base
Sort all enemy monsters based on distance to his base
Sort all neutral monsters based on distance to my base
Sort all enemy heroes based on distance to his base
3) Art of Defence - 2 Defenders
Both my defenders guard two points GUARD1 and GUARD2
GUARD1 = Point(3600.0, 6500.0);
GUARD2 = Point(6800.0, 2000.0);
if (turn > 20) { #be slightly more defensive after 20 turns
GUARD1 = Point(3600.0, 5500.0);
GUARD2 = Point(5800.0, 1000.0);
}
-
Intercepting monsters - not chasing - This makes a huge difference at gold as this increases the win rate drastically especially against players with equal strategy.
-
Keep the guard - Always keep both defenders closer to either GUARD1 or GUARD2 (by 2200 distance) or closer to the base (9000 distance). Allocating 1 hero to each GUARD is not possible in the late game since monsters health is huge and they appear randomly and 1 defender cannot kill all the monsters coming towards a GUARD. They have to often go to the other hero’s GUARD either to kill the 1st closest monster to the base or the 2nd closest monster to the base and work as a team.
-
Focus on killing the first monster - Always let the closest defender (I call him the 1st defender) go after the first monster as it’s the most dangerous monster that could cost us a life. Use the next defender to either go after another monster or GUARD based on the danger level of this first monster.
-
CONTROL for defence - I’m kidding. I never use CONTROL for my defence. 1) It’s not an AOE spell, 2) It’s push distance is very less 3) It’s not effective in the immediate turn. The only time we would need a CONTROL is when the monster is going to damage our base and there is no way to kill the monster and the monster is out off range for using WIND. The chance for this was less than 1% and it never happened in any of my games even though I’ve this case programmed.
-
WIND only on the first monster - WIND is the only defense that’s actually required to defend our base and it’s always effective if we use it only on the first monster. If the monster is shielded there is no use in WINDING other monsters because we should use the time in killing the shielded monster than using WIND on another monster.
-
Always attacking - less walking - Our defenders should always be farming and walking less. Watching more replays and fixing team work among defenders helped me improve on this part. To avoid a hero going too far from his current position, I ignore defending with the 2nd defender when the 2nd defender is too far from the monster (say 3000 distance)
-
Knowing when to give up If I can neither intercept a monster nor use CONTROL spell on it’s time to give up on that monster. I assume it’s dead and ignore it.
-
Parallel farming There are cases when the two closest monsters are very close to each other (i.e. < 1600 distance) in this cases positioning both our defenders in between these monsters will do 2 damage per turn for each monster by each defender. i.e. 8 damage per turn which is nice.
4) Art of Attack - 1 Attacker
-
Double Wind I didn’t want to complicate my wind calculations by doing a cross pull to keep the monster in vision and do a second push. Instead I move my hero ahead 1279 distance ahead of the monster so that I can use the double wind effectively.
-
Tracking the monster that I wind
As I’ve only one attacker and I only wind 1 enemy monster at a time, it’s easy for me to track it in the next turn even when it’s not in my vision. -
Farm with attacker on low mana. NEVER help the enemy
I never hesitate to farm with my attacker when I’m low on mana. But I made sure that he never ever helps in enemy defense i.e. to damage a monster who can be a potential threat to the enemy. (i.e shielded monsters, monsters with less than 2 health (Killing it reduces the number of threats for enemy). -
Shileding This is the most OP skill in the game lasting for 12 turns with no counter except by killing it manually using defenders. I use it only when I know this shield lasts until the monster hits the enemy base and also only when 1 defender is not sufficient to defend this SHIELD before this monster kills opponent base making it a killing blow. Making both enemy defenders constantly busy keeps the opponent under pressure and gives them less vision in the map.
-
CONTROL Enemy defender cannot defend for a turn and he will be pushed away. Should I say more?.
5) Customized defense against 2 attackers
When I see two attackers closer to my base I name this opponent as a sneaker and store in a global variable. For this opponent I spam a lot of winds on the enemy attackers and even chase them when they come closer to my base. This did not work well against top level players like Blasterpoard whose attackers CONTROL me the moment they see my defenders. But it worked against most other players with two attackers as they often hesitate to use control or shield themselves as they are usually in less mana.
6) Protection against enemy CONTROL (Rare scenario)
When enemy attackers control my hero it’s often pretty scary and most likely lead to monsters damaging the base so I self shield my defenders when I have a large quantity of mana and monsters are threatening my base and the enemy has a good opportunity to CONTROL me.
To sum it up I had 193 if statements in my code and it was fun filled contest. Only feedback to CG is to increase the speed of servers as the submits are often too slow during contests. I say this besides CG being the best platform available for us to learn and test our AI.