Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.


Just in time for Christmas we released version 2.71 which is almost strictly about AI tweaks based on player feedback and saved games.  Now, someone might ask "Why do you need save games to make the AI do [obvious thing]?".  The answer is that with so many different ways of playing the game (both in terms of game setup and in-game strategies) it turns out people play the game very differently from one another.  It's one of the reasons why you have most people who think the AI is really good and some people who think the AI is a total push-over.  It's not that the latter group are cheating or even exploiting, they have simply discovered a strategy that is unbeatable.

But as much as version 2.71 improves the AI, I'd like to give you a sneak preview of 2.8...



Game AI understood

Over the years, I've written a lot of different types of AI and I've generally tended to make what can broadly be called instanced adaptive AI.  That is, the AI performs a series of tests on itself on the background to see how it is doing and makes a series of adjustments based on how it does on that test.  This worked really well in GalCiv II for the most part

When Stardock made Galactic Civilizations III, I wasn't really involved in its design and the team chose to go with "modding" as its focus.  That is, let the player have a bunch of XML files to modify how the AI works.  The problem I have with that system is that it only really works if you get an AI modder who is performing the adaptation for you. 

When I returned to GalCiv III for the Crusade expansion, I began working with this system to make it more adaptive.  When I joined, there were 8 key areas that the "moddable AI" wasn't really suited for:

  1. Exploring space that adapts to the size of the map
  2. Picking technologies to research
  3. Putting together a fleet based on the state of the galaxy.
  4. Designing its ships
  5. Choosing what ships to build based on the state of the galaxy
  6. Knowing how much escort a transport needs
  7. Building up its planets based on the state of the game
  8. Building up its planets in the right order based on the state of the game.

Not all 8 are equally important but all 8 need to be addressed, imo, before GalCiv III can claim the AI crown from GalCiv II: Dark Avatar.

Version 2.5 of the game was the first version to start to tackle this:

2.5:  Putting together a fleet based on the state of the galaxy.

2.6: Building up its planets based on the state of the game

2.71: Exploring space that adapts to the size of the map

Those 3 items make a huge difference to the way the game plays.  Being able to right-size its fleet size is crucial.  You don't want an endless stream of tiny fleets uselessly attacking you and it does no good if the AI waits forever to send out some mega fleet.  It was version 2.5 that really addressed this and based on what I've read on forums and Reddit I think was the key AI feature that helped word-of-mouth on the game.

Today's update, 2.71 is pretty crucial for those crazies that play on really large maps.  The moddable AI had very fixed ways of exploring the galaxy and as we've increased the map size over time, the AI had very limited abilities to adapt.  Contrary to what people who lose the game would have you believe, the AI can't "see" the planets.  It has to explore them.  It has its own FOW just like you (and that's one reason the AI uses so much memory -- every tile has to hold the FOW state for up to 255 players and there's a ludicrous number of tiles on the largest map size.

Version 2.8

At 2.5, the AI satisfied most people.  At 2.71, we are definitely in "diminishing" returns.  But 2.8 is something I'm really excited about.  Here's a sneak preview screenshot:


So this is from a game I was playing last night.  That's 3 enemy fleets with with transports.  On normal difficulty.  Things didn't go well for me after that.  Which isn't to say my work is done.  While 2.8 addresses the moddable AI fleet governor (yea, there's an XML file you can mess with that says what must be in an AI fleet that no one has ever touched) to have that fleet adapt based on the player's needs, it doesn't deal with the moddable ship design template which affects the quality of those fleets (so you end up with meh enemy ships).  HIgher difficulty levels can fix that and frankly, 17 "meh" ships will still wipe out most players. 

The other thing about that screenshot is that each of those fleets is traveling at 7 moves per turn. This is due to the AI adapting its research path based on the state of the galaxy.

Next up is having the ORDER in which the AI builds improvements be based on its needs rather than based on modding.  At this point, you probably wonder, what happens to the modding? The answer, nothing good.  Moddable AIs are a bad idea imo.  A good AI should work in a way that is well beyond our understanding.  Not because it's "smart" but because it should be very complex. 

My job, as the AI guy, is to simply come up with tests the AI uses to measure itself and adapt to it.  That's how I've been doing it since the OS/2 days.  The more data I have access to, the better tests I can perform and the AI makes adjustments based on that.

I don't do this for you guys, I do it for me. Because an adaptive AI will surprise you.   Last night when those 3 fleets showed up, I woke my poor wife up when I yelled "Oh shit!" because I was totally not expecting that.  Until the adaptive transport fleet AI was made, the AI had never put together a fleet group like this. 

After the adaptive improvement construction is handled, next up is the AI ship building being adaptive.  That's going to take some time.

My Fuel

As some of you know, what motivates me is you guys.  That's why I harp on the Steam reviews so much.  If people don't like the game, I don't really want to work on it. If you haven't already reviewed the game, I encourage you to do so.

There is a small chance that I might get an opt in of my first pass of 2.8 before Christmas.  But people are starting to go on vacation so no promises.  In the meantime you can hang out with us on Discord.


Comments (Page 3)
on Jan 17, 2018

Love GalCiv3. Love Crusade even more.  It's one of the best 4X games I've played in 35+ years of gaming.  It's a lot better than Civ 6


There are 4 areas I'd like to see AI improvement please:

  • AI building placement.  Often when I successfully invade a planet, I ask the AI - "why did you place THAT there?" or "why did you build THAT and not THIS"?  Sometimes the building placement is spot on, other times, the AI is screwing itself over with its crazy placements.
  • No AI stacks of doom.  When I declare war, I use 3 stacks of doom and they all move together.  Depleted stacks (~<2/3) hold back until they are re-enforced.  Newly built ships muster at a safe rally point & when the stack is full it moves to the front line to join the battle.  The AI splits its ships all over the place, so they can be picked off in 2s and 3s.  Birth of the Federation had the same problem.
  • AI builds too many tiny and small ships.  I never bother with these ships; I beeline straight for medium hulls.  Every game the AI wastes loads of time/resources building these little ships, which get annihilated by a few medium cruisers.
  • No AI Tank and glass cannon fleet formation - I don't see AI using the tank and glass cannon builds.  i.e. Escort ships absorb the damage, whilst the capital ships deal out DPS.  Perhaps they do, but with their little ships and no stacks of doom, I've never noticed.

New content / DLC suggestion.

  • There is no war weariness.  This allows the player to steamroll themselves to victory once they have the upper hand.  In the Civ series, you often have to take 20-30 turn breaks between campaigns to build happiness buildings / let war weariness reduce.
  • Make military starbases more useful.  Currently I never build them.  I would definitely use them if all military S/Bs within 5 tiles of the target planet had to be destroyed before invading.  Key planets could be defended with multiple military S/Bs, S/B effects could stack (reducing balance), it would create defensive options, invading key systems would be harder etc.

Just some thoughts.


» 25133
» 31
Sponsored Links