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

People with fancy new monitors make me mad. That's because I don't have a fancy new monitor.  But Paul Boyer, the UI designer behind GalCiv II has a new one.  See the screenshot there? That's from his monitor.

There's been so much going on.  I didn't get to bed until 5am last night.  The number of touches, tweaks, and enhancements to make the game "fun" has been immense.

For me, I'm been working on balance. Making sure the game is fun and challenging.  This has mainly meant changes to the economics, weapons, costs, and most importantly, the computer AI.

I have to say, GalCiv II's AI is the finest AI that I have ever developed in my career.  I've done a lot of AI over the years and a lot of it has really culminated here.  For me, computer AI is not about making the AI win. That's easy.  What I want is an AI that plays like a human being would - minus the swearing, disconnects, etc.  The AI isn't quite human yet, there's coordination stuff that can be improved.  But it's leaps and bounders better than anything we've done before.  Given that our games are best known for computer AI, I think that says a lot.

The test this week has been what we're calling the Drengin/Human wars.  Duels.  One on One.  Can the AI adapt from dealing with a large galaxy with 9 other players to a tiny galaxy with only one player that wants to kill them?  The answer for the first GalCiv was no.  We never even tested dueling. Not enough time.  This time, the AI not only has multiple C++ personalities (our AIs aren't scripted).  They have multiple random sub-classes to call upon in order to deal with different situations.

The AI in GalCiv scales based on its intelligence.  As you increase the intelligence, new algorithms get unlocked.  At Beginner, the AI is really crippled (but fast).  At "Intelligent" it is playing its best game with the same stuff you've got.  My goal in testing it is to be able to have a hard time beating the AI at Intelligent. 

For players who have Beta 5, the AI metric we had would be what we'd call around a 20%.  That is, around 40% of players would be able to beat the AI at "Intelligent".  When we redid the AI during the holidays, we brought that number down to 20%.  At this point, I think we're getting down to around 5%.  And best of all, as we've improved the AI, we've been able to take away crutches.  In GalCiv I, the AI knew where the good planets were.  In GalCiv II, they don't. They have to scout them just like everyone else.

At first, I smoked the Drengin on intelligent.  Raising the difficulty to "Genius" made is to that I could only win if I got very good starting conditions.  But as I debugged and debugged I was able to make tweaks.  The hardest part is having the AI research the right technologies.  A good human strategy gamer often has a "build order".  But we don't want to get down with "Research this, then this, then this".  That's not AI. That' s a script.  We want the AI to choose good technologies based on analysis of the map, the situation its in, and then conclude that they need X.  So it's easy to tell the AI "Get weapons, then get invasion, then build transport and take human out." That might work for the particular situation, but it's not useful for the thousands of other scenarios out there.  That's why most single player games get boring -- scripted AIs. You figure out their trick eventually and counter them. 

If anyone is interested, I can write up the results of one of my recent tests. 


Comments
on Jan 19, 2006
Please do write up the tests, looking forward to reading it

My ideal difficulty level is where I sometimes win and sometimes lose. I don't want to crush the enemy, just to have it be a challenging game that makes me want to see it through to the end.
on Jan 19, 2006
Many games these days have pretty lackluster A.I.. I am glad some places got the better A.I. in their grips
on Jan 19, 2006
I second Mike C. I'd love to read an AAR of your more recents tests!

My ideal difficulty level is where I sometimes win and sometimes lose.


I agree with this as well. I like difficulty levels where my chances of winning are probably somewhere in the 50-70% range.

There's been so much going on. I didn't get to bed until 5am last night.


Holy crap, man. I realize I can only begin to imagine how absolutely insane it must be right now, but tell me you're getting at least a few hours of sleep at night! You're not much good to anyone if you're dead.
on Jan 19, 2006
Well... I hope your AI doesn't escape, become self-aware, and build Galnet - an evil network of galaxy conquering computers who will enslave the human race, build space ships constructed from our remains, enslave the galaxy, and then... and then... something. Who knows eh?

Just make sure if it does escape that it's not the Beginner level AI. There is only one thing worse than an evil AI on the loose: An evil AT (Artificial Tard).
on Jan 20, 2006
Great discussion, I completely agree with a lot of the points made here. The best matches are truley when you go to bed at night thinking of how to gain some tiny advantage or exploit a weakness because the game is so deadlocked. I hate it when the AI has the overwhelming advantage in the beginning, and then the player has a rediclulously overwhelming advantage in the end. SO many times I quit a game prematurely because there was simply no way I was going to lose the match in the last stages. I think instead of the AI making alliances to beat up the small guys (which have nothing to offer, and pose no threat) they should ally in the end when the player gets too powerful.
As for the algorithms to determine which techs an AI ought to research in a given situation, keep in mind the personality of the races. Some of the personalities seem so one-dimensional that they would be adverse to certain types of techs, while lusting after other types. I think there should be a recognizable pattern in the techs they chose, I don't know why the Drengin would want to discover the cure to all diseases or something socially benificial when they could be reseaching a new type of weapon. Even given the decreased overall effectiveness of the race that occurs if it is not well rounded in its tech tree wouldn't upset the balance of the game if each race did the same to suit their own style. that would free oup the player to make more linear decisions himself, and try different things from game to game.
Sorry for the long post!
on Jan 20, 2006
Please write it down. I would love to read it. Strategy is what I live for!
on Jan 20, 2006
I would also like to read some of your more recent tests. And I also agree that my ideal difficulty level is being able to win 50-70% of the time. To go up against the AI and have it be a genuine challange, without the AI having any unfair advantages (ie; heres free money, this is where all the resources are, ect.) is really a fun experience. To be beaten by an AI that is playing on the same terms as yourself (excluding their ability to calculate their economy in an instant) is truly a lesson you can learn from. I hate it when I am able to crush the enemy so easily to the point it isnt fun, or if the enemy is able to defeat me so easily because of unfair advantages. It was a brilliant move to let us pick the difficulty level for every single race, every single game. Im also looking forward to now being able to choose which races are in a game, and even have one on one duels with the Dregin (another feature GCI lacked).
on Jan 20, 2006
Man I love Stardock ... I love their games, their design philosophy and their preference for substance over glitz. It is SO refreshing to be in a community where developers have nothing to hide about their next big game, unlike other companies where every statement needs to be cleared by a division of lawyers and marketing folk.

Anyway Brad ... your comments on the AI have me drooling. I was already blown away by the AI in galciv 1 (Why oh WHY can't Rome Total War have AI like that????). Looking forward to getting my rear kicked even when the computer races are set to "Paris Hilton" level AI ...

Dano
on Jan 20, 2006
Hi!
What I want is an AI that plays like a human being would - minus the swearing, disconnects, etc.

Now that would be fun I'd like to see in diplo screen after some serious AI's butt kicking:
"F[.beep.] you human!!!! You'll never NEVER _N_E_V_E_R_ beat us!!!!!!!!!"
>Player #3 has disconnected


If anyone is interested, I can write up the results of one of my recent tests.

Silly question. OFC I am.
Just don't spend too much time writing them. I don't want the game release date be delayed for that.
BR, Iztok
on Jan 20, 2006
I can agree that AI in GCII is better than before, I used to be able to win frequently on normalt. The games I play now are at intelligent level playing based on writeups made by yourself and a few others. I still have yet to win a game there though even with good starting conditions, although I frequently hit a hard point beyond which the dreaded ctd occurs after a few turns from a loaded save game from a previous ctd and I usually end up starting over with a few down load of the beta.

Economy and the AI as well as "other than military" issues are where I am never sure of on the AI. Military wise I feel with all of the aliens playing in a huge universe I can stand up pretty well even in intelligent mode. Economy though, thats another factor, no matter what I do to improve my economy I always seem to be lagging a more lucrative AI in beta, yet when I am taking over planets (assuming I survive that long) there are frequently only factories and labs with some social civic galaxy type projects, rarely do I see a bank or market anywhere even on the nice planets.

Although at this time I never give on race an advantage not given by Stardock to them such as lowering the Drengin intelligence to normal while the other races play at intelligent I have wondered why when I play the humans I can not rethink and retool the technologies I have especially based on the stargate stroy line of having an almost a plethora of reactor power knowledge which is surely the result of having a good basic grasp of science and engineering principles. I have noted that if I stick to the basic human script howerver abilities definitely need to be rethought as your not using all of your talent if you do not.

I am looking forward to better and more intricate competition and continue to have faith in your ability to provide that for me through your productions in this iteration of Galactic Civilization and future models.

Sincerely,
Kirk Smith
aka Suralle Straykat