Placement of defensive structures in a game

Posted by Martin on Stack Overflow See other posts from Stack Overflow or by Martin
Published on 2010-02-23T11:39:25Z Indexed on 2010/05/22 23:50 UTC
Read the original article Hit count: 270

I am working on an AI bot for the game Defcon. The game has cities, with varying populations, and defensive structures with limited range. I'm trying to work out a good algorithm for placing defence towers.

  • Cities with higher populations are more important to defend
  • Losing a defence tower is a blow, so towers should be placed reasonably close together
  • Towers and cities can only be placed on land

So, with these three rules, we see that the best kind of placement is towers being placed in a ring around the largest population areas (although I don't want an algorithm just to blindly place a ring around the highest area of population, sometime there might be 2 sets of cities far apart, in which case the algorithm should make 2 circles, each one half my total towers).

I'm wondering what kind of algorithms might be used for determining placement of towers?

© Stack Overflow or respective owner

Related posts about language-agnostic

Related posts about game