Squad movement & Monte Carlo Planning

Anything related on how to build / improve your AI using BWAPI, BWTA, BWSAL, etc.
User avatar
Posts: 5
Joined: Thu Jan 19, 2012 8:32 pm

Squad movement & Monte Carlo Planning

Postby breakk » Tue Apr 05, 2016 9:30 pm

I've got an idea that might improve one problem of your bots that nobody seems to have addressed for weirdly long time. Here goes:

The problem:
The spatial behaviour (army/squad movement on the map - not individual units) of current bots is quite retarded (I'm sorry - mentally challenged) which can be most easily seen when they play against humans. There is no actual reason/plan behind the squad movement and no prediction of how the opponent will move his squads. Unit groups only move based on a few simple situational rules with no look-ahead, no bigger picture.

The idea:
Maybe something like Monte Carlo Planning might be used to move your squads. You stochastically generate a couple of random movement plans of your opponent (paths that their armies can take), couple of random plans for your own squads, and evaluate each your plan against all the opponent's plans. Evaluation is just some computationally inexpensive, heuristic estimation of your own and opponent's losses when you both would execute those plans. Then select the plan for your squads with the best evaluation.
That means that sometimes your squads would be likely to intercept the enemy, sometimes to avoid him, sometimes to run-by and harass, sometimes to defend a base, to bait the enemy army, etc.

Overall, that sounds like a more reasonable, planned behaviour.
Unfortunately, I have zero time to code myself, so at least I share it here. I'd just be happy if I saw it in action - and even happier if some good soul implemented in some reusable way - for example as a module for the Atlantis framework (https://github.com/Ravaelles/Atlantis) so that everyone could profit from it.

Btw, there already exists some old Java code that does a lot of what is needed here. I can find it if someone is interested.
User avatar
Site Admin
Posts: 7
Joined: Mon Apr 04, 2016 12:33 am

Re: Squad movement & Monte Carlo Planning

Postby warwolf30 » Wed Apr 06, 2016 12:37 pm

I almost finished a journal paper that it's very similar with your idea. Once I submitted I will make public a preprint link ;)
All the code will be open source in my bot

Return to “AI development (BWAPI Bots)”

Who is online

Users browsing this forum: No registered users and 1 guest