Brad Wardell's site for talking about the customization of Windows.

By beta 5, it should be pretty clear that GalCiv III is an entirely different beast from GalCiv II.  This post won’t go into the game play differences, which are pretty vast. This is about something a little more dear to many of our hearts: modding.

Why GalCiv II was the way it was

The thing about GalCiv II that I would like you guys to understand is that I wrote nearly all the economic, diplomatic, AI and other code personally.  I enjoyed doing it but it also meant that *I* wrote it. It wasn’t data driven in any way.  If I wanted the Drengin to focus more on getting some tech, I modified C++.

GalCiv III, by contrast, has a much bigger team and while I designed (or helped design) the high level way that the economic, diplomatic and AI works, I didn’t program it.  And since the talented folks on the team are aware that we will be making GalCiv III expansions into the next decade, the entire thing is data driven.  This is good news for modders.

Your first mod

If you hit the ~ key you can bring up the game’s console. From there, you can type “soak” (no quotes) and “fow”.  Soak has the AI play itself once you hit the turn button. fow unhides everything.

In GalCiv II, if the AI was doing something stupid, well, too bad. Because you’d have to wait for me to fix it and between my various opium walkabouts and general laziness who knew how long that would take? But in GalCiv III, you can make the AI better the same way I am, through changing the data.

What makes the AI decent?

Right now, in beta 5, I’d say the AI is…adequate for most people. Which is to say, it’s not very good by my standards or the standards of those reading this post.  This isn’t due to the AI being badly written, it’s all about data and strategy.  

So what makes an AI in a strategy game decent?

  1. Having a focused tech path
  2. Knowing what techs it must get
  3. Understanding timing attacks (i.e. by this point you should have X)
  4. Being good at macro strategies (building out, expanding).
  5. Being good at micro strategies (make this planet do this, make that planet do that)
  6. Being good at having good ships and at the right time.
  7. Focusing your attack on one player at a time and not attack everyone
  8. Organizing the tip of your spear to be as sharp as possible (no death trains)
  9. Focus its spending on what its current strategy is effectively.
  10. Build a network of friends diplomatically and make good trade.

 

At this stage, the AI gets an F at 1, and F on 2, and F on 3, a B on 4, an A on 5, a C on 6, a B on 7 and a B on 8 a D on 9 and a C on 10.

This might be a bitter pill for some of you but for release, we only need to get everything up to a C. If we do that, the AI will satisfy nearly everyone.  Post-release, me and you guys will likely work together in ways we can only dream of to bring all these to an A.

Where GalCiv III beta 5 currently falls down:

  1. What to spend its money on
  2. What techs to pick

These are not “AI” as much as scripted strategy based on playing.  It’s purely data driven.

The Terran Alliance: Techs

First 100 turns the Terran Alliance needs these techs:

  1. Xeno Industrialization
  2. Planetary Improvement
  3. Soil Enhancmeent
  4. Environmental Engineering
  5. Interstellar Travel
  6. Orbital Manufacturing
  7. Orbital Speiclaization
  8. Zero Gravity Construction
  9. Weapon Systems
  10. Defense Systems
  11. Universal Translators
  12. Xeno Commerce

Now, a player can try to b-line over to Invasion tech but unless you’re playing on a really small galaxy, that’s not idea.

 

Modding the Terrans: Techs

So open up TerranTechDefs.xml.  You can find those techs and find AICategoryWeight.  Make these numbers big across the board because they are strategic. The higher you make them, the harder it is to trade for them so keep that in mind.  I’m going to make mine all worth 25 in every category.

Modding the Terrans: Personality

Now open up FactionDefs.xml and look for the Terran Alliance.  You can see the AI category weights which align up nicely with the ratings on different techs. So you can pretty obviously see what techs matter to the Terrans. 

image

These are great numbers.  Unfortunately, I’ve learned something about random number generators.  Do you know what the difference between a 12 and a 14 is as far as random is? Nothing.  If we want the players to really play differently (differently as far as the player is concerned) we’ll need to make these numbers a bit more extreme.  How extreme? That’s the fun: Try it for yourself and find out.

Here are my numbers:

image

So I made the scale from 0 to 25. As long as you’re consistent (your range is basically the dice roll size).  I like to have very distinct differences in the numbers.

Test #1: First 100 turns

So before, after 300 turns, none of the AI had even medium sized ships.

Let’s see how the two sides are doing now.

Terran Flag Ship:

image

Attack of 20, defense of 18. 63 HP.

For comparison, let’s look at what the Drengin has:

image

Attack of 12, defense of 18, 39 HP.

So clearly no match, one on one, with a Terran ship.  They’re both using rail guns oddly enough. Not sure if that’s a coincidence or not.

Terran techs after modification

  1. Xeno Industrialization
  2. Advanced construction
  3. Institutional Research
  4. Planetary Improvement
  5. Environmental Engineering
  6. agriculture ADaptation
  7. Xeno Biology
  8. Interstellar Travel
  9. Orbital Manufacturing
  10. Zero Gravity Construction
  11. Interstellar Logistics
  12. Weapon Systems
  13. Missile Weapons
  14. Beam Wapons
  15. Kinetic Weapons
  16. Militarization
  17. Defense Systems
  18. Shield Systems
  19. Armor Systems
  20. Universal Translator
  21. Xeno Commerce

So it got all the techs and then some.

However, not all these choices were good choices.  It should have picked a single weapon system to focus on.

Drengin techs (unmodified)

Let’s look at what the Drengin have (their tech tree is whatever is already in beta 5)

  1. Xeno Exploitation
  2. Xeno Slavery
  3. Persuaive Research
  4. Planetary Exploitation
  5. Agreiculture
  6. Enviromental Engineering
  7. Interestellar Travel
  8. Orbital Manufacturing
  9. Interstellar Logistics
  10. Weapon Systems
  11. Beam
  12. Missile
  13. Kinetic
  14. Militarization
  15. Defense Systems
  16. Shield Systems
  17. Universal Translator
  18. Xeno Commerce

So some easy progress there.

Next up: Spending.


Comments (Page 2)
2 Pages1 2 
on Mar 30, 2015

One advantage we have in doing AI for so many years is that there are some simple AI testing methodologies that help a lot.

Let me give you a straight forward example:

If you let the AI fight each other, will someone conquer everyone else? Seems simple enough.  But most games, no AI player will actually ever "close the deal".  Usually what game devs will do is create an AI victory option that essentially involves them building something that counts as a win because that's a lot easier.  Conquering all other players in a multi-player game is much harder.

 

on Mar 31, 2015

Well one of the things the ai did a poor job at was using tiles appropriately. Another thing I didn't like is how it valued planets. Can we see a way to have a jagged knife that can financially fix itself,  and build all its superprojects. Can we have ai pkayers that will reasobably respond to this by maybe trying to get the good planets. The ai couldn't use sliders right. It would be nice to control how it used its diplomacy,  or how it votes on up.  I would like to control its resourse allocation, how it builds ships, where it puts starbases, how it micromanages, and who it likes. I don't mind terraforming,  but not when you have empty tiles. I don't mind upgrading,  but not when you can't afford to. Maube havr a preference list on what to build based on class or type.of pkanet colonised. I want an ai that utilise combined research to npt just the human. Other alliances to. By the way I do want an adaptive ai. Please don't mix me up for someone who don't. 

on Mar 31, 2015

Frogboy

One advantage we have in doing AI for so many years is that there are some simple AI testing methodologies that help a lot.

Let me give you a straight forward example:

If you let the AI fight each other, will someone conquer everyone else? Seems simple enough.  But most games, no AI player will actually ever "close the deal".  Usually what game devs will do is create an AI victory option that essentially involves them building something that counts as a win because that's a lot easier.  Conquering all other players in a multi-player game is much harder.

 

Okay I'll interpret that as a Yes to Question 1.  With respect, we are beating around the bush a bit, admittedly in a cool way, but is there any chance of a straight answer to Question 2, 3 and 4?

 

on Mar 31, 2015

1.   Last night in an immense game out of the blue three AIs banded together and DoW on me simultaneously.   Good thing.   It was suicidal...for them.   Bad thing.  But nice to see them working together even if it's only for a DoW.

2.  Evaluations are a big issue.   One exploit that I have used is to get extreme colonization fast, then colonize somewhere deep in another faction's ZOI.   I can then trade the colony to the AI for a bundle of techs and cash...they don't seem to get that if they just wait they will get it for free, and imo they overvalue the colony anyway.

3. It's a good question as to what SD would like us to try to test, that is, see if an AI does this or that.    Is just reporting the builds on a conquered planet any use, for example?   At this point the AI doesn't look like it is building out very well.

 

 

on Mar 31, 2015

I posted in this originally in the Steam forum but am posting it here as well as I don't want to take shots at Brad behind his back.

" so theres no reason it shouldnt have been done already you feel? "

Yes and as aJynks and Ice are debating - this does not even remotely strike me as the AI not being capable of. It's just making the right priorites - and seems to just have been missed and never corrected in both instances on GC2.

And when the AI misuses it's planet resources and / or attacks the same planet with transports 30 times in a 100 turns and still loses - it means you are forced to match wits with an imbecile.
Not exactly a ringing accomplishment if you win.

I think a lot of the times gamers and devs are so focused on making graphics and other flash - which I refer to as cartoons - they overlook what is underneath the glitz entirely.

Which hey Brad Wardell - I'm talking to you - seems pretty pitiful for a flagship game of Stardocks which has been around for 10 years and you take pride in having programmed the AI yourself and to have made it challenging in single player.

Please do not be offended Brad - I like the game and Stardock a lot - and admire you - but feel this is a legitimate complaint.

on Apr 01, 2015

What's little tiny frogs.

on Apr 01, 2015

admiralWillyWilber

What's little tiny frogs.

Brad's own personal portal into the Stardock forums??

on Apr 01, 2015

Delete dup post

 

on Apr 04, 2015

[quote who="Icemaniaa" reply="12" 

4.       With respect to the need to play the game plenty to get to a C or above … well of course.  Is there a need to ask for more AI specific feedback from the community and internal testers that are currently playing the game right nquote]

From reading his ai posts Im sure that's what he's. Doing. He asks exactly that on another post.

Omega777

Yeah Ice - I figured you'd know from evil Spock 
 

 
spock is my favorite startrek character next to data,  or oto.Or maybe the dinasaur race Iin voyager. Or the undine, or the borg. I hope hhe's in the new starwars.

2 Pages1 2