Detecting being surrounded

Started by
3 comments, last by Ezbez 14 years, 8 months ago
I use influence maps in my AI, and that works fairly well to generate a good strategic and tactical disposition of the forces opposing the player. Except, in the case where the enemy is surrounded. The AI should really try hard to break free, and I'm working to overcome the problem of desire to escape versus having to break out of an encirclement. Once that is solved, there will be a further problem: the (human) player will catch on to that, and will leave a one-hex corridor free, so the enemy isn't completely surrounded, obliterating any enemy that attempts to escape that way. I could try pathing every possible escape route, but that would be much, much too time consuming. There must be some way of taking my influence map data, and generating some sort of measure that would rate the closeness to being surrounded. Does anyone know of an article or technique I can use to detect the amount of "surroundedness"?
Advertisement
My initial reaction before I even read your posts was "influence maps and pathing." I was relieved when I saw I didn't have to explain the former. For the pathing, you only need to attempt to find ONE path from your current location to the edge of a map or some other point outside the circle. If you weights are such that you can make those occupied and semi-occupied areas "impassable", then your path should fail (after filling the entire area of the circle). If that is the case, you are surrounded.

Also, you can treat it like topology and use the techniques for detecting local minima, etc. That is, if you are in a "bowl", you are surrounded. I don't know these techniques off-hand.

One thing you need to watch out for is that the definition of surrounded can be dicey. You want to include a range component as well. Being surrounded in terms of feet and yards is often different than being surrounded with the enemy miles away.

In terms of handling things, remember to combine multiple influence maps... the negative of the enemy and the positive of your goals (like retreating to your base). If you lay down a preferred path from your current location to your goal and boost it, you can bias that area so that (all other things being equal) it becomes your preferred break-out direction.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Isn't it 'how' the AI tries to break the ring as well as where it tries?
I've no military training but, depending on the situation, there'll be a defined way on breaking the loop. Maybe sending a scout/point so you don't get ambushed( the one hex free approach). Maybe to verify strength of opposition if you use fogging on your influence maps.
Have a look at some military sites which might give details.
I got this...
Combat Leader's Field Guide
a couple of years ago and thought it was fantastic for the army approach
(not sure if it has how to break a trap though).
It's that one hex path that is the problem. I'm looking for a way to get the AI to recognize the encirclement *before* it is total. When it is a "C" shape, for instance - recognizing the developing danger in that rather than letting the human player fold-up the AI's lines into itself.
Quote:Original post by ID MerlinOnce that is solved, there will be a further problem: the (human) player will catch on to that, and will leave a one-hex corridor free, so the enemy isn't completely surrounded, obliterating any enemy that attempts to escape that way.


Sounds good to me. Coming up with these kinds of strategies is an interesting part of the game. Few players will really notice them, thus rewarding attention to detail. Of course this also rewards those who look at online strategy guides, but oh well. To make it harder to notice (and possibly harder to counter) have the AI only do that some of the time, chosen randomly.

This topic is closed to new replies.

Advertisement