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

image

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:

^9E9DBC1E87109FFCA9D11B3AADC28A027000B32228F93E72A7^pimgpsh_fullsize_distr

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 1)
3 Pages1 2 3 
on Dec 20, 2017

Thanks for the article, interesting read.

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.
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.
I'm curious about this part.

Hmm, let's assume what you are doing is like training a neural network. Is the learning closer to supervised or to reinforcement learning?

Does the learning only occur on your end, i.e. between patches or also in between games which I play on my local pc?

on Dec 20, 2017

On my end, I only learn what tests to give the AI and then provide conditions on what passing the test would require.  How it does that it up to the AI.

That's why I was shocked to see 3 fully loaded invasion fleets.   

But the actual learning is only happening within a game.  My part is only to devise new tests.

on Dec 20, 2017

Regarding ship design, I think the AI should just cheat. Like just let them know what weapons their main enemy is using so it can pick defenses easily. 

on Dec 20, 2017

AI is something that can be majorly difficult to nail, but when done right it can be the best part of a game.

on Dec 20, 2017

Outstanding.

 

Keep up the great work everyone!

on Dec 21, 2017

P-DEX

Outstanding.

 

Keep up the great work everyone!

Well, yeah.  It's great work by Frogboy and the GC3 team.  I'm just worried that he's going to make it so smart I won't be able to beat it anymore  

on Dec 21, 2017

iRedEarth

Regarding ship design, I think the AI should just cheat. Like just let them know what weapons their main enemy is using so it can pick defenses easily. 

I'm against a cheating AI if it's possible to achieve the same effect by letting the AI use the game mechanics properly.

on Dec 21, 2017

Appreciate the post Brad and your efforts.

To get to that Dark Avatar level I would also suggest there is a need to look back at the DLC before you get heavily involved at Crusade and ensure the AI is reasonably effective at using them.  Specifically, improving AI use of Mercenaries, exploring Precursor Anomalies and being more aggressive with colonisation of Precursor Worlds.  I also don't think I've seen the AI use special components from Precursor Treasures, ever.

It's funny, almost 25 years ago I studied Adaptive AI, little did I know at the time of it's role in good games!  I went the Engineering path ...

 

on Dec 21, 2017

Started a 2.7.1 game last night and saw very effective colony ship use at the started (AI at gifted levels)- enough so that the AI may hit some admin point limits. Be interesting to see how it makes balancing choices to get more admin points as the game goes on.

on Dec 21, 2017

Great stuff.

About the call for reviews: unfortunately imho most people who take the time to visit the forums prolly alrdy wrote a review. Its the other poeple  that would be great to reach, but the same time there is no channel to do so.

on Dec 21, 2017

This is the kind of stuff I've been waiting for.  It gets old playing the game time after time when the only way the AI is any good is because the deck is stacked in it's favor and it still only churns out simple ships and fleets.  I did expect more tactical surprises from GCIII.  This might be part of the out cry to have the multi-player in GCIII.  They were looking for a more unpredictive opponent.

Thanks Stardock for continuing to improve this game. 

on Dec 22, 2017

With 2.7.1 I could see a more rounded strategy was needed.

With 2.8 I wonder if people will be needed.

on Dec 22, 2017

ForesterSOF iam sure you are alone with your question in reference to 2.8 and that's good so. 

on Dec 22, 2017

Another good measure of success would be ... the complaints of Noobs on Normal difficulty become so loud that Brad has to nerf the AI on Normal difficulty ... like Gal Civ 2.

 

on Dec 22, 2017

Iam also and can't await it! 

3 Pages1 2 3