Last week I was in south Texas on vacation. A lot of Spanish speaking people down there. For years, I've told my wife that for the 3 years I took spanish the only thing I remember is "Donde esta la pluma" (where is the pen).
We were at an ice cream place and the lady behind the counter, having taken someone's credit card said "donde esta la pluma". My moment had come. My entire life was merely preparation for this one moment. This was the time for me to shine -- where everything was coming together.
I quickly said to my wife and everyone else in line "She wants to know where the pen is! I KNOW that phrase!" I finally felt like a big man.
Writing computer AI, on the other hand, is not a fast track to feeling like a big man. I read the AI suggestions people make. And most of them (okay some of them) are well meaning. But most of the suggestions fall into the "Well duhhh.." category.
The main reason why computer AIs in games tend to suck is that the people programming them aren't good at strategy games and so they can only incorporate their own ideas into it. Since I'm a strategy game maniac, the limitation has more to do with programming. I know how to beat the AI at the highest levels in certain circumstances. And it's very hard to get the AI to deal effectively with it when it's playing at the resource level as the human player.
Some people actually believe that the AI should be able to beat an expert player when the AI only has the same resources as the human player. That's not going to happen any time soon. Not until processors are a LOT faster. Right now, while the human player is taking their turn, the AI is putting together its strategies. It's adaptive in a given game. But there's only so much that can realistically be done.
One of the most common suggestions is to improve the sensor capability of AI ships. The problem is, I barely make of sensors on a per tile basis. Instead, I'll have it scan through ONCE per turn and set various flags on a sector by sector basis. The reason for that is time. A given sector has 15x15 tiles. That's 225 tiles per sector. That's 73,000 tiles in a huge galaxy. If a given player has say 300 ships doing their thing and you have 10 players that could be an immense amount of "looking". That's one reason it's so hard for the AI to get that "first strike" thing. But there are countless other things like that.
That is why in 1.11 we added a new option (which needs to be renamed) "Intense AI" (that's what I think it should be called later). If that's selected, i'll have the AI make use of new algorithms that do a lot of checking. I can have the AI do a lot more analysis. I can have the AI create armadas (groups of fleets) and other such things that are just too CPU intensive (O^2) for now. Hopefully people have found 1.11 to be somewhat smarter on AI that previously. I will continue to enhance the main AI as well.
The reason why players and reviews praise the GalCiv II AI is that relative to other games, it is quite strong. Compared to some fictious perfect computer player an expert may find it lacking. But reviewers and players can only compare it to other games to be fair. And there's a lot there that it can do.
For example, the AI, without having to mod anything, will automatically adapt to user-mad mods. That's one advantage of not scripting it. You could redo the tech tree, you could replace the units, change galaxy sizes, play on custom maps with custom ships, etc. and the AI will adapt to a varying degree of gaming. When someone says "The AI is easy when I play on tough on a gigantic galaxy with tight clusters" my inclination is to make tight clusters no so tight rather than putting in weeks of work to try to get the AI to deal with such a specific circumstance. Realistically, tight clusters on a gigantic map is effectively like saying you want the game to be easier. Which is fine. But if you want more challenge, turn up the difficulty. Tight clusters allow players to turtle in and build up. I do have some ideas though for making things more challenging at that specific level.
Still, there's only so much challenge you can have if players are going to hit Ctrl-N until they get some idealized galaxy set up and then complain that the AI wasn't challenging enough when given the same resources when the poor AI got stuck with 1 planet in the corner while the player got set up in a "cluster" with 5 class 15 planets with super-super planet bonuses (yes, we can tell how many times Ctrl-N was pressed in a given saved game).
But I won't get to do AI stuff this week. I'm currently visiting Microsoft on business in preparation for Windows Vista so my AI coding will have to wait until I get back.
AI programming is my main area. I wasn't particularly involved on the Diplomacy AI stuff. I've started getting more involved and will conitnue to start to look more at it. In the expansion pack, I want to throw in a lot more types of things to diplomacy. I also plan to change it so that gifts and such give you a set relations bonus that can be limited to stop people from gifting their way to victory (gifts should help but they should be part of an overall package).
So my AI moment will come just like my Spanish moment will come.
When the ice cream lady heard me yipping away she said "Gringo es estupido". I don't know what that means but I assume it means Guy is smart or something like that since I'm sure she was impressed that I knew and announced to everyone that she was looking for a pen.