0 votes
1 view
in AI and Deep Learning by (50.5k points)

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 defense towers.

  • Cities with higher populations are more important to defend

  • Losing a defense 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 the placement of towers?

1 Answer

0 votes
by (108k points)

The existing single-player mode of the DEFCON game contains a computer opponent that employs a finite state machine with five states which are carried out in sequence:

  1. placement of ground units and fleet,

  2. scouting by planes and fleet to uncover structures of the opponent,

  3. assaults on the opponent with bombers,

  4. a full strike on the opponent with missiles from silos, submarines, and bombers,

  5. Last but not the least a final state, where fleets of ships approach and attack random opponent positions.

Once the state machine has reached the fifth state, it remains in that state for the remaining of the game. Performing this we get a predictable strategy that may appear monotonous to human players.

Generally, the AI-bot maintains a case-base of previously played games to learn from. It uses a structure placement algorithm to determine where nuclear silos, airbases, and radars should be deployed. To perform this task, the AI-bot retrieves games from the case-base, ranks them using a weighted sum of various attributes (including life span and effectiveness) of the silos, airbases, and radars in the previous game, and then uses the ranking to determine the placement of these resources in the game being played.

For a better understanding, refer to this link: https://www.hindawi.com/journals/ijcgt/2009/129075/

Welcome to Intellipaat Community. Get your technical queries answered by top developers !