GalCiv III: Weekend update

It was a totally awesome weekend for GalCiv AI and perf progress.

There is a lot new in GalCiv III over GalCiv II but one of the most obvious is the number of players and the galaxy size the game supports.

GalCiv II topped out with 16 players. That was a lot for back then when you’re dealing with a non-cheating, sophisticated computer AI that has to design its own ships and planets.

But GalCiv III tops out with 128 players.  That’s 8 times more players than GalCiv II and the map sizes (or more importantly, the number of planets) tops out at around 8 times more as well if you’re really wanting an insane game.

Thankfully, our CPU power has increased by a factor of 6 since then. But that power is a bit deceptive because most of that power comes from multiple cores.  In 2006, the high end machines had 2 cores which GalCiv II made the most of.  Today’s machines have more and we do our best to utilize them. 

Turn Time focus

The most interesting way to get perf improvements is to throw everything we have at it.  In this case, play a game on an insane galaxy with 100+ players.  On Beta 5 (the build you have) each turn took on my monster box 95 seconds by turn 5.  That’s unplayable IMO.

So why was it so slow? Things that are fine with 10 players quickly break down as you add more.  But even at 10 players, those inefficiencies are there.  By the time we finished this evening, we had gotten that time to 24 seconds.  That’s still really long but we’re going to have to soon make tough choices between non-cheating, smart AI and performance. 

The good news is that there’s still a lot of room for improvement between now and release.  On a more reasonable map size, the next beta update should be a pretty spectacular improvement.

AI Focus

The analytics on strategy games show that most people don’t really appreciate good AI. But we know our core customers care about it and that helps motivate me to make sure the AI is as good as I can make it in the time available.  I look at GalCiv III as the starting point as I am sure I’ll get schooled by other players.  But this weekend saw some massive improvements to the way the AI fights wars and detects threats.

The AI improvements were one of the reasons I decided to dive into the performance issue so much.  The things I’m doing are expensive and while I am pretty familiar with how to limit the scope of an AI call, it’s still expensive to do a proper threat evaluation.

Not this week but next week I’ll get started on the diplomacy AI. I’ll be asking for your feedback on possible exploits and such to look out for.

Stability

The stability on the largest maps is still really tough. It’s made a lot of progress recently but it still has a ways to go.  It’s not particularly complicated it’s a matter of optimizing and compressing data to handle those really really really large maps. 

As a practical matter, if you have less than 4GB of memory you should probably not be going beyond large.  The large map size in GalCiv III is really big. The bigger ones are gratuitous but are also being made with the knowledge that in a few years, 16GB and 32GB will be a thing. 

That said: We are focusing a great deal of effort in optimizing memory use.

96,968 views 30 replies
Reply #1 Top

Well done keep up the good work im seeing allot of improvements.  Im personally sick to death of dumb AI.  Sid Mires Beyond Earth, Endless Legend, Age of Wonders 3, Distant Worlds and yes Fallen enchantress all for the most part abandoned in part dew to lacking AI as well as other reasons.  And why now i still go back and play Civilization 5, Even though its not necessarily strategically smart with unit placement and combat the AI plans fairly well with diplomacy and assets.  

Just finished a Altarian map on medium.  Influence flipping still way to easy and OP.   AI doesn't seem to understand or see it as a threat.  Got to flipping a planet every other tern including home worlds but buy the end not so much as FU or war form the AI.  Or at lest counter culture to hold me off.  Most of  there worlds seemed to still be making default 1.3 influence levels.  One would think if say Russia Exerted large influence over Ukraine and filliped Crimea there would be a alot of fuss about it going around. 

Reply #2 Top

I am a huge GalCiv fan. I've been watching and waiting. I do not want to play the game until it is a finely polished, released, diamond. AI is critical. Very pleased to read this latest post. I love massive map games with about 10 races. Custom races are also very important to me. I much prefer designing a unique race to a spacecraft.  

Keep up the great work.

 

-Marz 

Reply #3 Top

AI is the MOST important thing. We will notice the quality of AI. Invest more in AI.

Stability and speed are also quite important  :grin: . The game runs quite slow for me (just moving ships around and so on), which seems odd, given that my PC handles all other apps and games fine.  

Reply #4 Top

It's great to hear that you're working on the AI and I found your stream on Saturday quite interesting to listen to.

 

If I may be so bold, I think the problem at the center of the AI's lack of competitiveness is how it manages planets.  My current game is on turn 80 and after toggling god mode and FOW I found the large majority of AI worlds has only 2-4 buildings on them.  The problem seems to be that the AI will upgrade buildings before filling empty tiles and that it leaves the wheel at 1/3 manufacturing, 1/3 wealth, 1/3 research on every planet.

 

Until the AI can get its planets built nothing else can help it because no matter how good it is otherwise it won't have the means to resist the player.

 

Getting the AI to fill in all tiles before upgrading and favouring manufacturing until every tile is built should go a long way.

Reply #5 Top

Re Culture

The culture buildings are insanely OP'd.  We're balancing

Re AI on planet management

They are going to get a lot better at it.  Right now, they don't know how to set spending on a per planet basis. But that'll come soon.

Reply #6 Top

Good to hear fixes are coming.

 

About culture, it might be too late to change, but I realized today that culture isn't effected by population.  Adding population is actually bad because it lowers approval which slows culture growth.  So you just build as many consulates as will fit.

If you had to build farms, stadiums, and a clinic for the consulates to work it would make them more balanced and make culture planets more interesting.

Reply #7 Top

In an insane map about turn 100 I met the Drenghi. I had about 28 colonies and the Drenghi had 55. I was ahead of 4 other factions by 8-10 colomies and here they come with 55. I immediately started a trade with them and of course I expected them to be loaded with military tech and since they were ahead of me in power I expected a few nice fleets in their list of ships.

In stead the only tradeable tech they had was population tech and the only ships in their fleet were about 50, no shit, 50 colony ships. Obviously they are draining their population by colonizing soo quickly, and so much, and to their credit they are desperately trying to catch up by researching population tech. Anyway you look at it the Drenghi are acting insane on an insane map.

Anyway, I thought it was interesting and worth passing along. I read another post tonight where the Drenghi had doubled the closest player in colonies so it must be some behavior algorithm that has been thrown for our old friends

Reply #8 Top

Smart AI! Smart AI I beg of you! To hell with perfomance it doesnt mean a thing with the crappy ai. I can play 10 turns in a day if it has to be this way but the game must interesting with the cool and powerful AI.

Reply #9 Top

Quoting Franco, reply 7

In an insane map about turn 100 I met the Drenghi. I had about 28 colonies and the Drenghi had 55. I was ahead of 4 other factions by 8-10 colomies and here they come with 55. I immediately started a trade with them and of course I expected them to be loaded with military tech and since they were ahead of me in power I expected a few nice fleets in their list of ships.

In stead the only tradeable tech they had was population tech and the only ships in their fleet were about 50, no shit, 50 colony ships. Obviously they are draining their population by colonizing soo quickly, and so much, and to their credit they are desperately trying to catch up by researching population tech. Anyway you look at it the Drenghi are acting insane on an insane map.

Anyway, I thought it was interesting and worth passing along. I read another post tonight where the Drenghi had doubled the closest player in colonies so it must be some behavior algorithm that has been thrown for our old friends

This could be their strategy of sorts. Grabbing as much land as they can and then try to improve those worlds so that they get an edge on anyone else who failed to build such big empire. But this is my rough guess maybe this is indeed a bug

Reply #10 Top

Great to hear, an intelligent A.I. is very important.

as for stability, in opt-in 0.82, I dared to play a medium sized galaxy with 7 opponents, and constantly get "out of memory" errors after a few turns. I have Windows 7, 8 Gigs of Ram, 1 GB graphic card. I think 8 GB of memory should be able to handle a medium-sized map.

 

Reply #11 Top

Quoting JTS80, reply 10

as for stability, in opt-in 0.82, I dared to play a medium sized galaxy with 7 opponents, and constantly get "out of memory" errors after a few turns. I have Windows 7, 8 Gigs of Ram, 1 GB graphic card. I think 8 GB of memory should be able to handle a medium-sized map.

That depends, how much memory is other programs using on your computer at that same time?  Do you have virtual memory enabled?  All that will play a roll in this.

Reply #12 Top

I certainly don't mind the time it takes for the AI to do its thing; although I am use to Medieval II taking its time.  However, with M2TW, you knew which faction the AI was spending the most time with and it made a big difference if you were (able to and) watching the action.

So, there's a bit of a difference between a minute and a half of just blindly waiting and 95 seconds of watching the AI taking its turn with each faction.  When you think about it, half a second per faction is not bad at all!

As for the insane map size: I prefer it for spreading things out.  I certainly don't want an insane amount of habitable planets; especially quality ones.  Nor do I want there to be an insane amount of resources...

Thus, let us all hope that Gal Civ III isn't just More of the same (from II); as it's the "strategy" of the game that interests me the most: Picking the best planets; and making the most efficient use of my Starbases; my Shipyards and et al.

With any luck, I'm still smarter than the computer; even if I'm not as fast.  Trust me, I spend way more than 95 seconds per turn!

Reply #13 Top

Quoting Franco, reply 7

In an insane map about turn 100 I met the Drenghi. I had about 28 colonies and the Drenghi had 55. I was ahead of 4 other factions by 8-10 colomies and here they come with 55. I immediately started a trade with them and of course I expected them to be loaded with military tech and since they were ahead of me in power I expected a few nice fleets in their list of ships.

In stead the only tradeable tech they had was population tech and the only ships in their fleet were about 50, no shit, 50 colony ships. Obviously they are draining their population by colonizing soo quickly, and so much, and to their credit they are desperately trying to catch up by researching population tech. Anyway you look at it the Drenghi are acting insane on an insane map.

Anyway, I thought it was interesting and worth passing along. I read another post tonight where the Drenghi had doubled the closest player in colonies so it must be some behavior algorithm that has been thrown for our old friends

 

I also had an Insane Map and 16 factions. I also ran into the Drengin at about turn 165 or so. I was ahead of everyone up until then, I had 59 colonies, the Drengin had 95, TONS of Overlords and many many resources. He was #1 in Power, Influence, UP voting power, Military and Population.  Performance was ok, I have a good system and I was averaging about 16-22 seconds per 'turn' thinking. I do notice that if you hit turn and don't click on stuff or move the map the thinking appears to go faster. 

 

Here i was being smug with my 'Elite Fleets' and he comes along and invites me to a B-B-Que. 

 

Ai is definitely BETTER this Beta update. All opponents were on 'Normal' 

 

I think the 'uncommon' habitable planet distribution is (too common) for my tastes. I was running into far too many planets. Granted it was fun but I like the feeling of a large Galaxy and its like Xmas when you see even a lowly class 6. 

Reply #14 Top

Can we still look forward to the AI pulling info from saved games to learn from players and whatnot?

Reply #15 Top

One worry I have. Can we have an option somewhere to change AI based on map size, or have this implemented automatically? I'm wondering what percentage of players will play (and more importantly finish) an insane 128-player map. I tend to favour small maps and I'm worried that trade-offs will be chosen to suit a small percentage of players on insane maps, where more complex AI would work fine on the smaller maps.

In general map size worries me. I've posted before that the AI still emphasizes range techs on tiny maps, where you need perhaps the first range tech to cover the entire map. This sounds trivial but in a close game having the AI research ten useless techs is a big problem. Also wonders like the Spin Control Center in GalCiv2 were incredibly powerful on small maps but much less so on large maps, with no balance or AI changes accounting for this.

 

TL:DR: I understand the enormous potential size is a selling point for the game. However, what percentage of players are estimated to ever use it to completion? And, if this is large, will it have a significant impact on players that prefer small map sizes?

 

Thanks :-) 

Reply #16 Top

A good AI means excellent replayability. A crappy AI means you are dependant on human opponents.

Reply #17 Top

A good AI is one of the main reasons I played GalCiv II. Really and when I talk to others about the game its one of my main selling points. Looks like you are making good progress on it too, looking forward to seeing it in the next few patches!

Reply #18 Top

Quoting Rincewind57, reply 15

One worry I have. Can we have an option somewhere to change AI based on map size, or have this implemented automatically? I'm wondering what percentage of players will play (and more importantly finish) an insane 128-player map. I tend to favour small maps and I'm worried that trade-offs will be chosen to suit a small percentage of players on insane maps, where more complex AI would work fine on the smaller maps.

In general map size worries me. I've posted before that the AI still emphasizes range techs on tiny maps, where you need perhaps the first range tech to cover the entire map. This sounds trivial but in a close game having the AI research ten useless techs is a big problem. Also wonders like the Spin Control Center in GalCiv2 were incredibly powerful on small maps but much less so on large maps, with no balance or AI changes accounting for this.

 

TL:DR: I understand the enormous potential size is a selling point for the game. However, what percentage of players are estimated to ever use it to completion? And, if this is large, will it have a significant impact on players that prefer small map sizes?

 

Thanks :)  

 

To try and summarize things I have heard:

You don't really want an AI that will be different for different size maps, or different abundancies of resources, opponents, whatever.  You want an AI that has some sort of awareness of map size, abundancies, whatever, what effects those differences have, and the ability to react to those conditions accordingly.  At least that is how the devs seem to be looking at it, and I see their point.  It is part of what they call an "honest AI", one that doesn't have to be told things it shouldn't know, doesn't have to be scripted to given actions. It just plays the game the best it can.  I can't see them putting any throttle or chokes on the AI for map size.  All the devs know that the AI will constantly and greedily eat up cycles.  They just have to get it working and then optimize it later to reduce inefficiencies.  There have already been optimizations, but they also released the insane map sizes, so it can be hard to notice the optimization.  They warn that insane means insane, not just for complexity, but for load. 

So, in many ways, you should be able to look at your smaller maps as the actual norm for the AI, where it has plenty of time to do all its decisions while you take endless microseconds trying to make up your organic mind.  Then the larger maps are just that same AI stretched out a bit, until you get to Insane.  That is just insane, and I wouldn't really expect them to design to it.  Design everything so it works pretty well there, too...  That I think they are actively working on. 

Anyway, that's what I see happening.  If I am way off base, someone will gladly correct me.

Reply #19 Top

Quoting Larsenex, reply 13

I think the 'uncommon' habitable planet distribution is (too common) for my tastes. I was running into far too many planets. Granted it was fun but I like the feeling of a large Galaxy and its like Xmas when you see even a lowly class 6. 

 

Thanks for the update Brad - I have great confidence in you, Paul and the team to pull together a balance of intelligent strategy & performance. On the comment from Larsenex re uncommon planets, I found the same thing when playing a Huge map. So many great planets that I thought I had mistakenly picked Common or Abundant (was not the case). Was pretty cool but was a bit much for the Uncommon setting.

 

Cheers,

Zoo

Reply #20 Top

I don't really understand what could possibly be interesting about 128 computer players. They can't have unique identities or AIs. My experience with Civ games has been that once you get a machine down that can survive your biggest threat, you can mechanically overcome one, two, twenty civilizations without changing your tactics. 128 players would work if the basic productive unit of your civ was the vassal, not the planet. I guess Europa Universalis has 128 players, but you are not expected to expand over the whole world and they have their own characteristic alliances, storylines, and religions.

Reply #21 Top

This is broadly good news - a few suggestions though:

You mentioned that there is a tradeoff between stable/smooth performance, AI, map size, etc, for a given PC. Let players make that tradeoff...

Allow players to choose if the AI cheats - almost as a performance setting. In a similar way to the way we currently configure graphics settings based on what card we have, allow players to configure the AI based on their PC. Literally just add a new section in the game setup window, like choosing a map size. Choose AI "intelligence" - making it clear to the player that higher AI settings require beefier PC's - and that a high AI setting on a gigantic map is likely to result in big performance issues. You can even make suggestions based on detected PC hardware - ie if the player sets the AI to genius, and has 4GB ram and a basic quad core processor, then when they go to choose a map size you can warn them to choose a small map, in the same way many other games warn you if you set the graphics to ridiculous levels and have a shitty graphics card. 

I mean, while its many people's dream to play 128 players in an immense map, with exceptional AI, any realistic gamer will realise that sacrifices must be made. Personally, I'd rather play against 8 very smart AI that don't cheat on a medium or slightly larger size map, than play 128 cheating AI on an insanely sized map. But im sure many people will disagree, so let them make that choice.

 

----

 

On the topic of economy, am I the only one who thinks that the "build 50% factories 50% research buildings + a few farms" strategy is ridiculous right now? Properly optimised you can pump through the tech tree stupidly quickly, reaching 1 turn per tech wayyyy too fast with only 1-2 planets (homeworld + 1 other high class). 
For those that haven't clued in... building (roughly) 50% factories + 50% research/wealth buildings on basically any planet over class 12 or so just seems to be by far and away the best strategy. 1-2 of these planets will have you at 1 tech/turn really really quickly, yet still provide the opportunity to swap military in the event the drengins decide your little altarian blue men look tasty.
 
Just seems not enough risk for going balls to the wall tech down the green path. Sure you might lose a couple of planets if someone goes for the surprise attack, but your superior economy with all planets having at least 50% tiles factories will surge back into action quickly and you'll tend to have a big production/tech lead.

 

 

Reply #22 Top

Sorry, to be clear:

"building (roughly) 50% factories + 50% research/wealth buildings on basically any planet over class 12 and then building research/wealth project"

I guess I just find it stupid that the "jack of all trades master of none" strategy is the best at each point in the game. 

Its best early, because early on factories are essential to expansion and building other tiles quickly, so you need them anyways. So you fill up roughly half the tiles with those. By this point every other building is 1 per turn. So maybe 5-10 turns later, you have a "complete" planet. Build farms to keep pop less than max pop. 

Midgame, its still the best, because by this point your 50%/50% planets will actually produce more research/wealth than a 100% focused planet. And you'll reach midgame faster since you started researching - rather than producing, much earlier. 2-3 tech planets will get you at 1 turn techs permanently, with 2 researching and 1 upgrading at any given time. 1-2 wealth planets will keep your funds in order.

By lategame, one high-class planet doing 50/50 will produce all the tech you need to hit 1 turn techs at the top end of the tree. At this point you'll probably want to start replacing more of these with farms, but typically you are a LONG way ahead by this point.

The equations need to be adjusted - no planetary building strategy should be flat out superior across each point of time within the game. 

Reply #23 Top

One last thing - as it stands right now resources are pretty insane - particularly the value the AI places on them.

AI will trade a resource for a low-level tech, which is crazy. I usually just go and trade away half my early-game tech with the AI just to bag all the earlygame resources, which leave you with huge bonuses across the board. At the very least, the AI needs to value resources far more. That said...

The resource trading probably needs to be implemented civ-5 style - ie not a 1-off trade, but more of an ongoing trading relationship. Ie cash for resource, resource for resource, etc. Declaring war should probably negate all existing deals. Would be cool if you had to send freighters between the 2 planets (buyer/seller) to keep the trade going. I realise this is more the role played by Thulium, Durantium, etc - but right now the 1 off trade feels a little odd. 

I love how you are rewarding acquisition of space-based resources though with prototype parts and more support options. Great idea.

Maybe consider super-buildings/wonders based on resources too? Ie a super-factory that requires durantium, the antimatter power plant requiring... antimatter. Etc

Anyways, me done for the night. Really enjoying Beta5 patch 2!

Reply #24 Top

I want AI may execute sneak attack from fog of war onto human players 8(| . Maybe I want too much  :bebi:  And please report the campaign story of the game on the near future as GalCiv is the only tbs space game has a campaign I know :digichet:  I really wonder what will be  the story :inlove: . Take Earth back! (Maybe I played so much Mass Effect):d

Reply #25 Top

they mentioned some of the campaign in the most recent dev stream 4/10/15 i believe