Hello Thx for this contest, i think it was the more interesting i have done ^^ : few easy rules, “easy to understand, hard to master”… More possibility for pure algorythm ^^
My “Strat”: I just done an array of Factory/Time… full it with Moving entity, and then, Tryed to make it better for me at Round 20…
To choose Action:
- I First check for defend… (to beat other on def, you just need same number of bots…)
- After, i check every attack i can do… (but need +1 Troop) => easier to defend than attack, for same result (for same production)
- Then, the move part=> Evacuate Factory with bomb incoming Next trun… Troop can’t be loose this way… better to save same, lose the factory, but better to just send same to nearest NMY if they don’t have safe spot… will kill Troopers at least…
=>INC if my Prod isn’t upper than the opponent… (INC Is Good, but need 10 Troupes, so if you win a factory by fight, you win “free” troop income…that’s wy it’s after…)
=>Then, I move every troops resting to the fight…
No “Pathfinding” just checking All AC where AB+AC <= AC during First Turn… make a list of them…
when i want to move, from A to C, i Check If There is one or more B, i take the shortest AB (and clean when i go on)…
if there is an a “Shorter” ABCD than AD, I will find C when looking shortest way to D…
When you put All Moving troops in an array of turn on factory, you just have to check states of Factory at the turn=Distance +1… if it’s the turn where a bomb can land… don’t go… Make easier all decision… (checking if B is fre… for exemple…)
And if you seen troops incoming at the good distance to bomb them… easy kill… (don’t append often, but when it’s the case… )
No Adv prediction, he will react to my actions anyway… but i check for my Attack if he has enough troup to defend around… if yes, i don’t attack… if no, i Send them to fight… take his production, even 1 tour, can change the match…
Simple heuristique, hope to finish in Top50, but not sure… pushed a last version with a trick on map where there is no prod>1… in this case, i don’t send bomb if i don’t take 5 troop on Factory… can make some lucky strike… or loose because my ADV as at least 5 more trooper to kill me…
Thx Again, was realy fun to do that and happy to not have to wait to long before the next one ;p
(Sry for my english btw ^^just passed few debug-coding hours, i’m tired to read myself ;p)