Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.
Published on May 10, 2006 By Draginol In GalCiv Journals

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.


Comments (Page 3)
3 Pages1 2 3 
on May 12, 2006
I would be in favor of an option to lessen the random distribution at game start so that :
every race has at least x "good" planets in the vicinity and that those planets have the same "value" of improved tiles


Please do not do this. The best games are the ones where you have a crappy starting position and need to fight out of it to survive. If I always was on an equal footing with the other players then the game would get boring quick. (It already does near the end, but you can't really help that in this kind of game.) I have never used the CTRL-N feature, and I doubt that many people really do. I think most of us like playing with the random challenge that random planet positioning gives us.
on May 12, 2006
Note: Option

I also find gigantic maps pretty easy, as noted by many, the AI simply loses all agression, or declares war and never shows up to party.
on May 13, 2006
Gringo es estupido


This means "I worship your ability to speak my native language. You, sir, are truly a giant among men!"

It does! Spanish uses fewer words to say more. Trust me. My wife teaches Spanish


Creston
on May 13, 2006
This means "I worship your ability to speak my native language. You, sir, are truly a giant among men!"

I'm sure you're right. Maybe she plays GalCiv 2...?
on May 13, 2006
I must admit, I enjoy losing as much as I do winning. I'm probably in the minority, but re-starting a game upmttenth times to get the best start feels hollow since every game ends up being the same... If you start out great, well there's not as much tension, and already "knowing" the outcome when you start is pretty pointless. Now if this were a game you'd play once or twice, then quit? Yes, I could see it then - but the thing that made MOO2 and GC so much fun was
not knowing how a game would play out. Then when you start a game that has cherry starting conditions, it becomes that much more rewarding. I love tracking my scores, whether I make dumb mistakes and lose, or play a flawless game and win.

The "add cpu cycles to AI" is something I've wanted developers to do for years, and I am so glad someone is finally going to add it as an option.
on May 14, 2006
One thing I'd love to see for 1.2 is unlocking the camera angle. If you want to see your ships in full detail on the primary map, you zoom in - but your rotational view from the x axis is between 90* and 45* angles. This means a zoomed in view only allows a very small segment of the galaxy to be viewable at any one time. If the camera was unlocked so we could view at ANY angle (like a 0* angle from the x-axis), we could actually use a zoomed in view on the main map screen, and it'd have quite a beautiful cinematic gameplay effect to boot.
on May 14, 2006
Pinard you can unlock the camera angle in the game menu
on May 14, 2006
Pinard you can unlock the camera angle in the game menu


Nope, that's the "snap back when rotating" camera option you're thinking of. I have that off and it doesn't allow you to fix your angle below 45* on the x-axis (see the attached screenshot). When you're zoomed in to view the game in all it's graphical splendor, you're maximum (actually minimum) AoA is ~45 degrees. If you could view it from a flatter angle (0-5 degrees) you'd have a significantly greater field of view than you do now. Of course, if there's a different setting I've missed all this time I'll feel quite silly...

Additionally, viewing from a slight -5x degree angle would be cool as well. Outside of ship combat and ship design, you never get to see the undercarriage of your ships.


on May 17, 2006
If you're playing on huge galaxies with tight clusters then it's really not likely to be a "fair" game. I personally enjoy tight clusters but I also turn up the AI behind "tough".
Frogboy, could you detail what galaxy setup would create the best, most even playing field for a human vs AI game? Thanks!
on May 25, 2006
but even in Chess, there's not a 100 percent chance that the computer can beat an expert human player


The best an 'expert' player (if you mean USCF expert, who is way below FIDE Grandmaster), can probablly acchieve against any modern top chess engine like Rybka is probably a draw, and he will be sweating like the hell to achieve that. A win isn't impossible, but extremely unlikely.

That because fundamentally it is probable the game of chess is drawn with best play! You make no mistakes you don't lose. Some programs also don't have any contempt factor built in, so they are equally happy allowing draws with weak players as against world champions.

3 Pages1 2 3