From technology to politics to video games; these are the random thoughts of a geek with too much time on his hands
I'm sorry Dave, I can't let you move that ship there.
Published on December 13, 2006 By Zoomba In GalCiv II News
One of the most touted features of Galactic Civilizations II: Dread Lords was the artificial intelligence, which can give even the best players a run for their money.  The AI was written by Brad Wardell, who took some time recently to write up some of his thoughts on the AI in the upcoming expansion, Dark Avatar, for an IGN Developer Diary.

It's an interesting look into AI and how technology like the new dual and quad core processors open up a lot of potential for better AI in games without causing noticeable performance hits.  Be sure to check it out!


Comments (Page 2)
3 Pages1 2 3 
on Dec 15, 2006
Afaik Brad has rewritten the planet build AI from scratch after he fired the dummy who did such a terrible job of it first time round.

Do the latest beta include Brad's planet build AI yet? That should make it worth trying alone.
on Dec 15, 2006
Actually, since I've heard DA bonus tiles are a lot rarer, that should make for some improving performance in the planet build AI by itself. In lots of cases, yes, it can just follow a basic "script".

However, the scripting still IMHO should be a weighted based on value the item adds to the current planet layout, and value the item adds to what the empire is trying to achieve. (Otherwise they may *never* build the wonders)

The problem with straight scripting a planet build is that there are so many different special cases. Yes, we humans go about it rather methodically in most cases, but sometimes I'll build a research center on a bonus tile then focus on social production when it is completed in order to get what is essentially a factory and a research center out of the first build. There are also the low pq planets that most players tend to make all research. It is a matter of carefully balancing the values, and the only way I can see getting this right is writing a GCII with fighting disabled, and simply watching the AI build up its planets, then repeating the process until most people stop whining.
on Dec 15, 2006

Few quick answers:

1) Dark Avatar has options for enhanced CPU usage that make use of the new MC_AI (multicore) functions. They will still work even if you have a normal (non dual core non quad core) but you'll end up waiting between turns. Beta 2A has some of this already in actually

In 2A, if the AI has the high CPU option on, you'll see them start moving their ships onto your doorstep before attacking (unlike normal where it'll declare war and you'll sometimes have a phoney war fo rawhile). The extra CPU lets me use algorithsm that involve coordinating groups of ships and focusing them in the right place.

2) The planetary improvement stuff is re-done for Dark Avatar. Which means it'll have its own set of bugs and problems but so far it seems to be quite a bit better. But the underlying..system for planetary improvements (i.e. th einterface I work with) is not something I'm very familiar with and has given me no end of grief.

(i.e. WHY does it build a factory on a research bonus tile sometimes? I don't know. It shouldn't. Half the time good aI is just getting the bloody thign to do what it's supposed to do).

on Dec 15, 2006
They will still work even if you have a normal (non dual core non quad core) but you'll end up waiting between turns.


Is this *necessarily* true, or is it *likely* to be true? From how you've explained your AI calculation process (or how I understand it anyway), the threads for the AI should finish and sleep on a decent single core CPU if it takes me a couple minutes to do a turn.
on Dec 15, 2006
They will still work even if you have a normal (non dual core non quad core) but you'll end up waiting between turns.

Though off topic to this immediate discussion, I do have a quasi related question. I received my new Intel Core 2 Duo E6600 PC yesterday. I haven't quite finished setting it up yet, but I'm wondering, is it already obsolete?
on Dec 15, 2006
gal

actually, i believe you are the one who has said nothing of value. I would have hoped by this point, having been slapped down so many times for your silly fan-entitled jabs at the game, you would have gotten some perspective.

Guess now I'm the one who has been expecting too much.
on Dec 15, 2006
I haven't quite finished setting it up yet, but I'm wondering, is it already obsolete?


Yes, the AMD quad cores are the top of the line for overall processor power.
*However*, you need to keep in mind that obsolete is a relative term. The quad core technology is really only appropriate for servers. IMHO the dual cores are overkill for a home PC at the moment, because so few applications exceed 10 threads. Besides, there's no need for a dual core with less than 2 gigs of memory, since the net processing power gained by upgrading ram on a single of equivalent power is about the same until this point is reached, and is a lot cheaper. So if anyone has a dual with less than 2 gigs of memory, consider upgrading that machine in the future.

I can't recall a time recently where Intel has had the fastest chips on the market, but they certainly do have the most economical multi-cores at the moment.

That and there just seems like there's something about the Intel assembly language that takes longer to process.
on Dec 15, 2006
I think most computer equipment is probably obsolete before it is put into production these days.

I don't worry about it too much. I'm still using the system I built in 02 with its 2.4 GHz P4. The only thing I've done to it was up the RAM to 2 gigs last year, and it can run M$ Office programs, Photoshop, .NET Studio, and GalCiv2 simultaneously with no problems.

I'm not planning a new purchase anytime soon, but if there is a radical improvement in AI development based on multi-core processors, I will probably consider upgrading. Because, you know, I have to *cough* work *cough* at home sometimes, and it would help me be more efficient.
on Dec 15, 2006
obsolete is a relative term

Yes indeed. But literally anything would have been an improvement over what I had. I did go with 2 GB of DDR2 667MHz ram. I can double that to 4 GB at some point and/or goto higher frequency ram.

I think I did reasonably well for $1300. The bleeding edge in performance is so much more expensive and the time to obsolesence is really not that much greater. As an example, I bought a 17.4” 1280x1024 LCD display in 2001 for $1600. As part of my new PC I got a 19” 1280x1024 flat screen for $50 after rebate. I didn’t really need a new monitor and if I did I would have gone with a 21” 1600x1200, but for $50 how could I refuse?
on Dec 15, 2006
I don't worry about it too much. I'm still using the system I built in 02 with its 2.4 GHz P4.


Yeah, as long as you maintain your windows operating system, extensive power isn't really that necessary anymore. Hardware is getting so fast that developers can't keep up with it... we might be able to if there was a better standard set of libraries available to *everyone*, but companies want to keep their trade secrets.


I think I did reasonably well for $1300.


I didn’t really need a new monitor


Yeah, sounds like what I paid for my system in '04. Although mine is still fairly beasty by today's standards. I agree, I went for that notch right below top of the line... you know, the one where the cost is a tenth but has 95% of the performance. And, you didn't "need" a new monitor, but you may as well have dual monitors to go with your dual core .

Hold up, time out, what was this post about?
on Dec 15, 2006
Hold up, time out, what was this post about?


how technology like the new dual and quad core processors open up a lot of potential for better AI in games without causing noticeable performance hits.

Not really that far off topic. Very similar to the "REALLY Nasty AI!" thread, but without the discussion of the "Wife AI".   
on Dec 15, 2006
2) The planetary improvement stuff is re-done for Dark Avatar. Which means it'll have its own set of bugs and problems but so far it seems to be quite a bit better. But the underlying..system for planetary improvements (i.e. th einterface I work with) is not something I'm very familiar with and has given me no end of grief.


Thanks for the answers there, but now comes the bigger question... Are you planning on bringing this code back over to dread lords at some point? (realize they could be apples and oranges at this point...)

With this sort of change I think the days of folks winning at suicidal would be numbered...
on Dec 15, 2006
I don't normally post to these discussions (though I do read them with interest), but the AI has been an issue in the two gigantic challenging-level DA beta games I've played so far. Simply put, why doesn't the AI attack more? In both games I was able to expand like crazy and not build any military ships until I had over thirty worlds. By that time, I already knew I could beat the game and it wasn't as much fun to play. I don't like playing at the highest difficulty levels without modding because the AI "cheats" and what I really want is smart AIs, not cheating AIs. I recently played Medievil II: Total War at medium difficulty and the AI recognized when I had failed to adaquately defend a province and attacked. That recognition of vulnerability and ability to exploit it is what makes the game fun. I don't remember CGII being so easy (especially if the Drengin were on my border).

I love to play CGII. I play it more often than any game I currently own, PC or console, so my expectations for DA are pretty high. Do I have to set the difficulty higher to get a more challenging game, or is it possible to make agressive AIs be, well, more aggressive?
on Dec 15, 2006
Simply put, why doesn't the AI attack more? In both games I was able to expand like crazy and not build any military ships until I had over thirty worlds. By that time, I already knew I could beat the game and it wasn't as much fun to play.


Really? Cuz I've played gigantic maps I can *colonize* over 50 worlds and still lag behind... since gigantic maps can have like 400-500 planets.

Please don't complain about the AI until you're using it at it's full potential, which i believe is the notch right before masochistic. Everything else the AI still makes dumb moves. I know you don't want to give the AI "cheats", but challenging is pretty low on the totem pole
on Dec 15, 2006
Please don't complain about the AI until you're using it at it's full potential, which i believe is the notch right before masochistic. Everything else the AI still makes dumb moves. I know you don't want to give the AI "cheats", but challenging is pretty low on the totem pole

Agreed. Actually I don't think you can even begin to complain until you play the AI at the 125% bonus level. The extra 25% bonus is hardly noticeable and in my opinion makes for a "fair" game.

3 Pages1 2 3