No problem at all. You know what Alphabeta pruning is? The search depth for a local positioning optimization could be determined by the difficulty. For example.
And what are the current values of those parameters? Is varying around them even a realistic option?
Search depth in typical civ AI routines is usually exactly one move (i.e. the one being considered). So that was a rather naive example.
I'll elaborate why search depth algorithms are not really feasible for civ-like games.
Suppose for the moment that:
a) combat in civ is deterministic (it is not adding additional complications)
b) You have a robust method of localizing decision making to a single "combat theatre" contain 10 friendly and 10 enemy units. (It is not obvious that this can even be done.)
For simplicity of the argument assume that all units have two movement points and all terrain is flat. Consequently, each unit has 19 valid moves. Suppose that you can prune this down to 5 viable moves per unit (again not that simple). This means that a single turn of civ already consists of 5^10 =~10 million possible moves. At this, point you have not even considered the possible responses of the opponent.
As you can see the combinatorics quickly spiral out of control even for a single turn in a very controlled situation. In reality, you do not control the number of involved units that well. A big risk of implementing a depth search is that in the late game the combinatorics even for one turn blow up turn times to unacceptable levels.
In practice what the AI routines do instead is that moves are evaluated in sequence one an individual basis. A context based heuristic is used to determine the best move for a unit. The move is executed and the routine moves to the next units with an updated heuristic. The AI will only play as well as the heuristic logic. It is really hard to write a heuristic that is slightly worse than another in all situations. It is easy to find one that is consistently a lot worse, but a heuristic that is slightly worse in one situation may quite well end up being slightly better in another.
Note that some attempt was made to make the civ5 decision making scale with difficulty: (from one of the prerelease podcasts)
Ed Beach said:
I think one thing the AI is going to do is we have it set up so when the AI is trying to make a decision so it's trying to decide what to build in the city, trying to decide what technology to pursue next we go ahead and we look at all the possibilities based on where they are in the tech tree right now and we rank them according to which ones we think are the best choice for a strong Civ player at that given point in time. Now what happens is when you're playing on the higher difficulty levels we almost always pick one of those top choices just because we want that civilization to be as competitive as possible with you. When you're at a lower difficulty, one of the things that we do is we start opening that up to some of those other lower ranking choices and we pick from those choices as well. We're also looking at kind of a different depth of analysis in terms of the military and tactical game when you go and you have a higher difficulty setting. So rather than just looking in the immediate area of a city when you're playing on the higher difficulty levels the AI is gonna be thinking a little bit deeper, looking further across the map and using that to kind of come up with decisions like, oh wow I'm actually 10 tiles away. Maybe I have 3 or 4 units that can reinforce the situation. I'll pull those in and that will strengthen my military right in the nick of time here.
Either this didn't work and was dropped, or it is still implemented and has hardly any noticeable effect.