Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 1.39 KB

ai-v3.md

File metadata and controls

20 lines (15 loc) · 1.39 KB

Iterate over every owned tile.

Every owned tile has a mind of its own. This mind evaluates a series of potential actions. The algorithm only has to look at its own tile, the directly neighboring tiles, and the directly + 1 neighboring tiles.

High threat, weigh these heavier (enemy with many units has units near our capital / lost units last turn):

  1. Send units to defend a nearby important (capital, gold, silver, bronze, fortress, spyglass) tile that has enemies nearby
  2. Send units to attack a neighboring enemy tile
  3. Send units to move to a neighboring tile that has a neighboring enemy tile

Low threat, weigh these heavier: 4. Send population to neighboring normal tiles that are below 50, so we stay at peak population growth. 5. Send population to neighboring capital, gold, silver or bronze tiles in order to accelerate population growth 6. Do nothing. Keep growing population until we reach 50, which is peak population growth.

To do:

  • Algorithm that calculates threat level based on the overall board. (This can be executed once globally at the start of the turn)
  • "Search" system: select tiles next to me where (select tiles where there is a neighboring tile). Can we overhaul the tilemap datastructure to make local searching easy and performant?
  • How do we implement difficulty levels in this system? (easy/normal/hard)
  • How to score action outcome in this system? Simple greedy algorithm for enemies?