AI and counting - why a computer can't compute?

Shyrramar

Warlord
Joined
Dec 14, 2003
Messages
294
Location
Fin(e)land
I have always been annoyed by the fact that computer controlled players (AI-players) can't count - even though that's essentially what the computer is good in.

The AI is of course the one thing that needs to be upgraded most of all. And the AI should be taught the basics of counting, so the difficult-levels would not only affect the AI's aggression and necessary shields and food needed. I have many times noticed, that a city that is unable to grow anymore has many tiles unnecessarily worked by the AI whereas many cities take their food from unworked tiles. It should not be too hard for the AI to simply count how big the city can get. If it is not along a river, the maximum would be six for starters and 12 after aqueduct. Other factors are terrain and unhappiness. It would probably take about a millisecond for the AI to count how big the city would optimally grow, how big considering the number of luxuries (and thus the number of unhappy citizens), and how big considering the aqueduct and hospital restrictions. If the AI would count that the city could grow to size 8 with two entertainers (or something like that), it should irrigate and mine all the necessary tiles so that it would get the optimal result. Heck, I can do that, and my computer does count a few million times faster than I!

Another part of the calculations are probabilities. The AI seems to have some basic understanding of this, but often it surprises me with its stupidity. If I have a cavalry (6/3/2) in a grassland beside an AI city with one defender, which happens to be a swordsman. The city's size is, say, four. Now why the swordsman does not attack? The AI should well know that no units of mine apart from that cavalry is in the neighbourhood. One reason would be, that my cavalry can withdraw and then bypass the swordsman and enter the empty city, but the AI has no concept of such a thing - this situation is common even though bypassing is impossible. Now if the swordsman stays fortified in the city, it has a defence value of (I don't remember the exact numbers, but they are irrelevant here) 4 at most (+50% fortification, some percents from citizens). This would be 6:4 ratio. If he attacked, it would be 3:3. Now the latter is significantly better. I know this and that knowledge has saved me a number of times. The AI should know this too and attack, but it doesn't. AI seems almost completely oblivious of these facts.

Then there is this stupidity. Let's say that I have a longbowman in a grassland. It is just one tile out of a cavalry's reach. What does the AI do? It, of course, attacks the longbowman thinking it an easy target. So on it rushes. I watch in paralyzed terror as the harbinger of death rides to crush my hapless longbowman, and then the cavalry stops. "Nice job!" I think to myself and slaughter the cavalry. Now I do this kind of mistakes only by accident - not knowing about the unit. The AI should easily be able to calculate that it can't reach the longbowman, and even calculate the best tile to move into to kill off the unit the next turn. I once slaughtered a whole bunch of longbowmen with my longbowmen (equal units!) because the AI was two tiles away: I simply waited a turn and on they game to meet their doom.

With some scripting and brute-force-counting the AI could be made significantly stronger. By building proper tile-improvements and counting the most probable outcomes of battles, the results would be great. The tactics of AI may be hard to script and are full of problems, and a learning AI is hard to do (although would be nice), but making the AI do what it does best - calculate - should be easy to implement and would have a huge impact on the AI-behaviour. This way the difficulty-levels could perhaps affect the actual intelligence of the AI. The emperor-level would be a fine level to allow the AI to calculate everything the best it could. Earlier it made intentional mistakes.

Once when I player Unreal Tournament or some other 3D-shooter, this all came into my mind. In UT in the harder levels the AI had instantenous reflexes and could count exactly where I would be (so it could shoot me down from air). It also learned from my playing style. The AI in UT is of course very different from what is needed in Civ, but the basics are the same. Computers can't be as creative as men, nor as cunning, so they shouldn't try too much. It should use the best advantage it has and brutally calculate many things so that it can do them optimally.

What do you guys think? Any other ideas concerning the calculation come into mind? I think this is very important, as almost all suggestions here need a better AI to be possible.
 
I've played Civ 3 a lot.. And the most annoying factor is the stupid AI, which must be set to cheat a lot if he is to stand a chance. This creates a whole lot of stupid game play because the AI works with different rules than the rest of us..

Oh.. The enemy has a lone settler.. Lets take it.. Oh.. He built a city with it, and now he suddenly has several military units come from nowhere.. Fun..

The only thing I really wanted in Civ4 was a good AI, such that the difficulty settings could be about how intelligent the AI should be and not about how much either party could cheat.

Haven't played Civ 4 enough to get an understanding of all the new tech parts and how things work underneath now, and have thus not found good enough strategies yet to decide if the AI has improved from #3 or not. But my first Civ 4 game on noble I seem to be winning with ease. I want a challenging AI without him having to play using other rules than me. However, still in Civ4, it seems like all the difficulty settings employ the same AI, just with more or less cheating.

Optimally I would like a system where the difficulty setting said how long the computer was allowed to calculate his moves.
 
Back
Top Bottom