Brad Wardell's Blog


Introduction to GalCiv III AI Talk

Published on Saturday, June 6, 2015 By Brad Wardell In GalCiv III AI Talk

Greetings!

I've created a new sub-forum here dedicated to talking about GalCiv III AI.  Because of our forum system, active posts here will float up to the top so you can see this post from the main forum too.

A big welcome to GalCiv III fans or future AI game developers!

## AI Background ##

GalCiv III is the first of the GalCiv games where I didn't write the initial AI for.  This has turned out to be a good thing, something that we will all benefit from for years.  But in this section, we'll talk about what this means.

Unlike the previous GalCiv AI's, this one is data driven. That means most of its intelligence is derived from XML files in the game directory.  The team implemented the AI as a huge library of APIs that use this data and make very simple decisions with it.  Because the game is 64-bit and because each AI player gets its own thread, there is a huge amount of built in potential to do some amazing stuff.

In late March of 2015, I finished up my main work on Sorcerer King and began to look at the AI for GalCiv III.  The primary strengths in the AI are what I just described.  However, it has some weaknesses too which revolve mostly around not being very good at PLAYING the game.  

To use the Chess metaphor, the GalCiv III AI at the 0.80 level (March 2015) knew how to play the game. It just didn't know how to play it well yet.  That's where I came in.  My pre-release work consisted on making the AI more skilled in playing actual humans.  

If I were to rate the GalCiv AIs over the years, and this rating changes a bit based on how I"m feeling that day I'd rate them as follows where 1 is brain dead and 10 is the absolute best AI a game can have.

GalCiv OS/2: 8

GalCiv I for Windows: 7

GalCiv II: Dread Lords: 6

GalCiv II: Dark Avatar: 8

GalCiv II: Twilight 7

GalCiv III: 1.0: 6

 

## AI Expectations ##

Anyone who has had to deal with me on forums knows that I have very limited patience for arm-chair AI designers. I'm old and cranky.  If you're participating in these discussions, here are a few ground rules you need to understand:

1. Nearly all players play at either beginner or easy.  And by nearly all, I mean 90%.  This has always been the case and will always be the case.  So feedback or suggestions that involve affecting those players negatively or spending a vastly disproportional sum of money and time on some AI idea just isn't helpful 

2. Unless you've programmed AI, feedback suggesting new APIs isn't really helpful.  Every AI discussion always has people suggesting things like "The AI should be able to detect threats" or "The AI needs to build better fleets" or "The AI should reinforce planets that are endangered" as if these features weren't in the game before I showed up.  That's the most basic stuff.  The aI fails to do those things because something else happened and our job is to figure out what happened that kept it from doing those things.

3. Extreme exploits aren't going to be fixed. Most people who win the game are taking advantage of some level of exploit. That is fine and we can, on a case by case basis, determine which ones we should address.  I tend to fix exploits that are too tempting to ignore.  If the AI is making bad trades, for instance, that's something that should be fixed.  But if someone has figured out that they can kite some unit in tactical battle for 45 minutes doing 1 damage per turn until the monster is dead I"m not going to fix that kind of thing. Kite away, my friend.  

4. My near time objective is to get the GalCiv III AI up to a 7 and later an 8.  It is extremely unlikely I'll be able to get it to a 9 on my arbitrary scale because it's not commercially viable and I've never seen a game reach anywhere close to a 9 and only one commercial strategy game has reached an 8 besides Dark Avatar.  Most PC strategy games are less than a 6 and provide their challenge through actual cheating AI which is much cheaper and often more fun for players anyway.

5. Understand what cheating really is. If you get a handicap at bowling or golf you are not cheating.  If you get to walk up and kick down the pins you are.  People throw around the term "Cheating" so lazily now that it's having a negative impact on the incentive to actually make good AI.   The AI in GalCiv does't cheat with 1 exception: On the higher difficulties it doesn't have FOW (and even that is something I'm looking to get rid of).  Giving an AI a handicap (i.e. every credit it makes is matched by another 0.25 credits) is not cheating, it's a handicap.  If the community ever reached a consensus that giving the AI a handicap is cheating AND felt the AI was dumb then it would make more sense to just have the AI actually cheat (i.e. just give the AI whatever units, weapons, techs, etc. it needed based on the difficulty level, much easier to code).

## AI Weaknesses in 1.0 ##

The biggest problem I'm dealing with in the 0.80 to 1.03 AI of GalCiv III is that all its thinking is empire wide. I cannot control spending on a per planet basis. I do not have access the shipyard building a ship.  I am making decisions for an empire without any local knowledge. As a result, the bigger the map, the weaker the AI gets.  

The second biggest issue is related and has to do with the ships. The AI doesn't currently have access to the ships in a way that lets me work with them based on on their location.  I've alw2ays written the AIs in GalCiv as a gamer and less as a programmer. So, in my mind, I always thought of fleets as having a geographical duty. That isn't the case in GalCiv. As a reuslt, it has a lot tougher time coordinating ships into coherent local "Stuff.  The bigger the map, the worse it gets.  

Now, before someone says "How can you have crazy sized maps and an AI that can't 'handle' it" I'll bring you back to expectation #1. The AI handles it just fine for nearly all players. It's for people who are really good at strategy games that can overcome this and it's not an all or nothing thing (The AI, with enough handicaps, can overcome this weakness).

Nearly every weakness in the 1.0 AI boils down to a lack of local awareness (that is, letting planets, ships, shipyards, think locally instead of globally). The AI would do great as a federal politician...

 

## Rolling up our sleeves ##

I have a bunch of low hanging fruit that I intend to address in GalCiv 1.1, 1.2, and 1.3. Let's talk about those first:

1. Eliminate the AI's all seeing FOW vision.  This will actually make the AI substantially smarter on bigger maps.  This seems counter intuitive until you see the weaknesses I pointed out.  It's better for the AI to only "see" stuff that actually matters so that it's not sending ships across the map or building starbases where it has no business doing so.  

2. Making the AI more aware of ZOC.  Remember, the AI gets annoyed when units and starbases are in its ZOC.  The AI makes no distinction between meat and silicon.  As a result, the AI often ends up with war with each other because of this which reduces the AI's focused strength.

3. Pre-war build up.  This is something I'll be working with the Civ IV and Civ V AI developers on.  This is something they're good at that I haven't done as much on.  So I'll be implementing some of those systems (not source code of course, I'm just going to talk to them about it) into the AI.

4. Localized tactics.  This will be a major bit of work but we will start dividing up the galaxy into theaters and have the AI start thinking of its empire and strategically vital interests as theaters rather than the current system which defines 2 theaters: Theater of focus (where it is concentrating its forces) and everything else.

 

## How you can help ##

Helpful: Telling me dumb things you saw the AI do that made you able to beat it is helpful.  Very helpful in fact.  Any mistake that would allow you to win regardless of the handicap.

Not helpful: Things that could be addressed just as easily with a handicap.  The AI doesn't build up its planets well. This is on our list. But it's actually not that important since that can be addressed with handicaps. 

Really helpful: Saved LATE games with descriptions of what you are seeing.  Maybe the AI isn't defending its planets well. Maybe it's sending out crappy fleets. Maybe its fallen way behind militarily. Maybe its ships are crappy.  These are things that I'm interested in.

 

Thanks all and cheers!

So did GalCiv II have good AI or not?

Published on Friday, June 5, 2015 By Brad Wardell In Galactic Civilizations III

I occasionally see people post that the GalCiv II had "brain dead" AI.

This got me thinking regarding how much effort to put into the GalCiv III AI.  That is, with GalCiv II, many many engineering months were put into post-release AI updates to make them as good as I could realistically make them.

So my question is, do you guys who played GalCiv II consider that as having a good AI? And by good, I mean better than any other 4X game on the market.

Sorcerer King: June Update!

Published on Thursday, June 4, 2015 By Brad Wardell In Sorcerer King Dev Journals

Sorcerer King continues to get polished up.  I suspect it’s the most polished game we’ve ever made as we’ve had so much extra time to work on it.

So what’s been happening?

Originally, we were going to release Sorcerer King in April.  But we talked to our friends at other studios and realized that the Age of Wonders expansion and Pillars of Eternity were coming out during the same month.  That’s a lot of fantasy in a short amount of time.  With Galactic Civilizations coming out in May and E3 in June, we decided that July would be a good date.

As a result, the team has just kept working on Sorcerer King throughout all that time with the game getting increasingly fun and polished as a result.

What have you done with that extra time?

Asked someone. I dunno who. Someone. You there. The one reading this. You asked right?

Anyway…

When GalCiv III got released we learned a lot. For one thing, we learned that the initial impression is made in the first 6 minutes of play through.  If you’re a game developer, make note of that time. that’s 360 seconds from the time they get to the main menu to the time they’ve largely decided whether they think the game is “good” or not.

A big part of that time is making sure the game has a coherent narrative.  You have to explain to the player, immediately, what the game is about. And I can tell you, Asynchronous 4X doesn’t cut it.

Now, you guys and us know we have a fun game. But we have certain aspects of the game that have been a challenge.  So let’s talk about that.

Fantasy Star Control

Sorcerer King is, in essence, fantasy Star Control at its root.  You have a main bad guy who has already conquered everyone who is about to do some very bad stuff.  You are the heroic leader trying to assemble a ragtag force to go deal with the main bad guy while along the way picking up allies.

There’s a big problem with this idea: Replayability.  Sorcerer King has been trapped half-way between Star Control and a sandbox 4X.  

While Sorcerer King has a pretty good campaign, it’s no where near as involved as what’s in Star Control.  On the other hand, while Star Control doesn’t have a lot of replayability, it could live on its amazing story-driven campaign while Sorcerer King has been trying to have a much shorter (maybe 30 hour) campaign with the main meat of the game being the sandbox.

The problem with the sandbox, however, is that you can only beat the Sorcerer King so many times before you’ve “played the game” to its conclusion.

How do you solve a problem like Mirdoth?

So to succinctly recap:

Sorcerer King was envisioned as a sort of fantasy Star Control except where the maps are randomly generated each time. The player builds up a force, makes alliances and goes and confronts the main bad guy. 

The strength of this is that the game is extremely fun the first several times you play. But eventually, you’ve played it.

How we’re addressing this

In an open sandbox game like Galactic Civilizations III or Civilization V, the solution is that every game is totally different. You have no idea, at the start, who are going to be your friends and enemies. You have no idea what resources you will be bargaining or how the placement of other civilizations will affect your game.

Sorcerer King, by contrast, isn’t an open sandbox.  That’s because the Sorcerer King, by design, is a lot more powerful than the player up until the end (assuming you survive).

So how do you make such a game as replayable as say Galactic Civilizations?

Here’s how:

  1. You create additional victory conditions
  2. You turn those minor civilizations into actual rivals
  3. You make sure that each sovereign you choose is really different

Additional Victory Conditions

Originally the only way to win was to confront and defeat the Sorcerer King in his fortress.  However, we are going to add additional victory conditions including:

  • Victory: The Tower of Sorcery (you build a tower and begin racing the Sorcerer King to gather enough magical might to throw throw him down (this is actually what happened in the book)
  • Victory: Alliance.  Gain the trust of all your rivals and you win.  Easier said than done of course (easier on small maps with 1 opponent).

Rivals

So the once minor factions are now full-blown Rivals who you can pick and choose in the game setup and give a difficulty level.  If you conquer their city, they will start producing their specific unit for your use (you don’t have to manage conquered cities).

They now will try to found new cities as well and will go to war with each other.

You can trade and negotiate with them (though it’s not like the Trade screen but rather an RPG-like trade system instead – conversational).

Unique Sovereigns

From here on out, only Galor is the son of Relias. The others each have their own backstory and the way you interact with the world and with the Sorcerer King depends on which sovereign you have. 

So there’s your update!

Cheers!

Ashes: May Founders Update

Published on Friday, May 29, 2015 By Brad Wardell In Escalation Dev Journals

image

The Ashes of the Singularity Founder’s Alpha is starting to come together.  We’re looking at the second week of June presently to get it into your hands.

So what will it have?

  1. Single player Skirmish
  2. 3 different planets
  3. 2 player multiplayer (maybe 4 but no promises)
  4. Lots of pew pew

We’ve uploaded a couple of new videos to the Founder’s Vault. Do not share those videos. You’re welcome to talk about them on the forum but given how early the game is, we don’t want people seeing it yet.

GalCiv III 1.01FROG

Published on Sunday, May 24, 2015 By Brad Wardell In Galactic Civilizations III

For those of you willing to play with my personal build off my machine where I test different AI strategies and performance tweaks, you're welcome to try out what i have.

 

https://dl.dropboxusercontent.com/u/8051911/GalCiv3101frog.zip

 

This is the 1.01frog build.  If you play MP, don't bother with this as it will prevent you from playing MP. Make sure you backup your existing galciv3.exe as I have no idea whether this even works with the current Steam build or not.

What's different:

+ Should be substantially faster especially on larger maps

+ Should run better on lower end systems

+ AI should be substantially smarter.

+ Slightly smoother animations

Note: Only tested on one machine. Mine. At home. On Memorial Day.  

Some GalCiv OS/2 memories

Published on Wednesday, May 20, 2015 By Brad Wardell In Galactic Civilizations III

If you want to see what the first GalCiv looked like back in 1993 you can see here:

 

http://www.quartertothree.com/game-talk/showthread.php?73790-Galactic-Civilizations-3-announced&p=3780404&viewfull=1#post3780404

While the graphics are nothing to write home about, please remember that the other game of the time, MOO looked like this: http://www.abandonia.com/files/games/101/Master%20of%20Orion_3.gif and probably had artists and more than a college student for its main dev.

 

 

Cool goodies for GalCiv III players

Published on Tuesday, May 19, 2015 By Brad Wardell In Galactic Civilizations III

As some of you know, the game has already become a huge hit.

As a result, with the extra sales we've had, we're going to be releasing additional music for the game (I'm having it composed right now) as part of the base game. No DLC. Just a free update.

Thank you for your support!!!

739 pages 71 72 73 74 75 76 77 78 79 80 Next