I am making ai for turn based game and I want it to choose good positions for its units.
Algorithm I come with looks like this:
For each tile in ai unit movement range I calculate a Djikstra map (distances with pathfinding to every other tile). Then I calculate heatmap based on distances from this tile to points of interests. Then ai just move its unit to tile with highest points.
The problem is, that result I getting is too slow. My map consist of a lot of tiles and unit movement range can be big. I can't precalculate heatmaps, because units have different pathfinding on different terrains.
Can you advice me some algorithms for this problem?