Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.
Tweak tweak
Published on February 16, 2006 By Draginol In GalCiv Journals

Just because the game has shipped doesn't mean that development should stop.    Each time I play the game, I play it in a window, in a debugger.  As I get better, I think of new possible strategies and then try to incorporate them into the AI.

Tonight I'm in the middle of Drengin/Human Wars XVII.  I've won the previous 16 games and I am...reasonably confident I will win this one as well.  I have this map called "duel" (comes with the game) and I set the Drengin to intelligent and starting at war.  Then I see how many turns it takes for me to beat him. I look for faults in what he did and rectify. 

Of course, one has to be careful not to update the AI so that he's better at this particular scenario. Instead, I look at what sorts of things should he have been looking at and what sorts of things should he get access to?

For example, at the time of "gold", the cool ranking system that human players get to see to see where they rank was only available to the humans. But I've since gotten a set of APIs so that computer players can look at it too.  As a result, the computer players can make fine-tune adjustments to their strategy based on their rankings in a half dozen different categories.

Mind you, at this point improvements are a matter of degree.  I don't think people will be saying "The AI sux" (well actually yes, people establishing their "street creds" will say it sucks regardless).  Most people felt the AI in Beta 5 was challenging and that AI was a total joke compared to what's on the CD.  But just because the CD has been mastered doesn't mean we shouldn't keep updating. That's the whole point of making a PC game -- you can keep improving it.

(you can tell I'm nervous about even talking about this because any time I talk about adding new things to the game or tweaking something I worry someone's going to think that the CD version wasn't "finished" or something when it's just a matter of wanting to keep improving the game).

I'll respond here with the results shortly to Drengin/Human Wars XVII.


Comments (Page 1)
2 Pages1 2 
on Feb 16, 2006

Nope, he's going to die again.

So let's take a look at his vitals as his death nears..

1) His ships are not bad. They're not quite as good as mine. We both went with mass-drivers.  My ships each have 5 attack 0 defense. His are 4 attack 0 defense. So he's a bit behind me in weapons technology.

But I've been out researching him there:

2) His economy is mostly focused on military and research which is probably pretty optimal given the circumstances.

3) I saw a couple of tactical errors.  One thing I would like to do after release and we have a better idea of people's hardware level is something like this:

a) The AI "remembers" ships its seen better.  It makes guesses whether it knows where a ship is but it could be better.

The AI creates a "path of resistance".  That is, it doesn't just look at a target, it looks at what it knows it will have to go through to get there.  When it has better engines, it's not as much of an issue, but if he could take better account of other defenses in a given sector that he'll have to go through to get to his target, that would be useful. Problem is, that's very CPU intensive and the average player won't even notice the difference.  It already looks at what's around it each turn so it does care about trying to avoid danger. But an overall "Danger path" would be nice.  Not sure if this even makes sense to anyone.  But essentially point A to point B that it looks at all the known dangers across the path.  The problem being that since ships move so much the value of such a path would be limited in some circumstances.  And I don't think it would have made a difference in this game.

 

 

on Feb 16, 2006

Okay so let's take a look at what he researched and figure out any mistakes (well that's subjective but let's take a look anyway)..

1st: Xeno Research (probably a good idea)

2nd: Gal Warfare (good)

3rd: Space Milit (good)

4th: Starship defenses (Hmm..)

5th: New propulsion (okay)

6th: Ion Drive (good)

7th: Research Centers (hmm pretty expensive tech to go without the others)

8th: Planetary Improvements (Hmm, you do know you're at war right?)

9th: Impulse Drive (fine)

10th: Space weapons (fine)

11th: Armor Theory (you really should get weapons first buddy)

12th: Xeno Economics (boo! you're at war, defend thyself first)

13th: Beam Weapon Theory (good)

14th: Mass Driver Theory (okay)

15th: MiniBalls (about time!)

16th: MiniBalls II (good)

17th: Shield Defense Theory (hmm. okay)

18th: Deflectors (okay)

19th: Mass Drivers (good)

20th: Enhanced Deflectors (well I'm not sure of this)

21st: Mass Drivers II (good)

22nd: Research Academies (ack!)

So you can see the problem here.  The AI knows it's at war. Should be trying to defend itself quicker and should be careeful about researching expensive techs like this.

This all involves tweaking as it already does take these things into account.

What is worth remembering is that there's no scripting here at all. You hear in other games about how players can "modify the script" for a given game.  "Oh just download the SDK and modify the script and improve the AI" is something people have probably seen in the past.  Here, there's no script.  The AI only knows categories of techs and a general weighting of them so that we can put certain key ones in there.  But it won't research the same thign in the same order and it's not very random (it's not purely deterministic either it's a mix). 

It picked these technologies based on the info it knew.  Now it's a matter of going in and tweaking it and improving it.  My conclusion is that it lost time researching long-term techs when it should have been getting itself geared up for the war it was already in.

One other thought would be to have it look more at the distance its enemies are from it so that it can determine how much it should worry about a given enemy.  I.e. if they're on the other side of the galaxy, then it can build up its infrastructure. It did a pretty good job of that, it was preparing for a longer game. 

What we have is a classic on-line game scenario -- The AI was "building its base" and I rushed it.  But it needs to look for the tell-tale signs of it.  Unlike in say Warcraft or Rise of Nations, players (and the computer) has access to real time graphs of enemy military strength and other factors. It should use this and look for tell-tale signs. 

Final results:

 

on Feb 16, 2006

Final results:

Drengin/Human War XVII: Rating Differnetial: 29.9 (down from 35.7 for XVI -- the goal is to get it to 0 or negative). Beta 5 was at 83.2 (Drengin/Human war game #1). The one one discussed HERE had a differential of 44.7.  The "Gold" build had one of 37.1.  SO now we're down under 30. 

on Feb 16, 2006
With this level of AI detail, it would be fun to watch two computer players duking it out.

Thanks for bringing us along on another game recap. We geeks really dig this stuff.
on Feb 16, 2006
Always fun to read these kind of things, thanks.
on Feb 16, 2006
Another interesting read, Brad. Thanks for letting us ride "shotgun" on another chapter of H-D Wars. And good luck getting the Rating differential down to 0!!
on Feb 16, 2006
Very interesting read. I wonder if you'll ever get to zero. If that ever happens we'll sure have a very scary AI to deal with.
on Feb 16, 2006
The AI "remembers" ships its seen better. It makes guesses whether it knows where a ship is but it could be better.

Ever thought about "telling" the AI to build AWACS-like ships? Perhaps it would help.
on Feb 16, 2006
Yeah but Draginol/Frogboy/Brad.

I realize this map is pretty small and it's playing itself out in a 1v1 type deathmatch. What happens when your on a gigantic map, and it's filled with 9 other folks. And they are all set on intelligent. (And how long does a turn in that game take to load through. LOL)

My question is, how is it doing in a larger scale environment? Oh and please keep telling us these stories, and keep enhancing that AI. I'm always up for a decent challenge. And thus looking forward to playing.
on Feb 16, 2006
Brad - a few comments:

In regards to a "danger path" - I think it should be implemented. It is not a
concern that "the average player won't even notice the difference". The AI on
"Intelligent" is not geared towards the average player. Besides, having a
calculated "path of least danger" is what any above-average human player would do.

In regards to the AI's play in the duel - you stated that "The AI only knows categories of techs and a general weighting of them". If left with one opponent (a duel condition), perhaps the weighting should have a multiplier applied to the techs that help it gear up for the war. This multiple can be left at 1 during a non-dual condition. The multiplier can even increase or decrease as the war tech level begins to catch up (or exceed!) the opponent's war tech level.

Pardon the rambling, not enough caffeine (sleep-substitute!)
on Feb 16, 2006
I have to disagree with some of your comments about the tech path. Personally, even at war, I'll focus on economics to keep my civ operating at 100% capacity. Then again, I play at Gigantic, and the colony maintainence really adds up with that many planets. The advantage of research techs is that if they can out-tech you in the long run, they should win. At least it tends towards that direction in my games.

Then again, this could be just a difference of opinions.
on Feb 16, 2006
Yeah but playing against Brad there might not be a long-run. If it doesn't focus on the present war, its gonna be SOL.
on Feb 16, 2006

The reason I play on the small maps is because that's where the disadvantage to the AI i strongest.

In most strategy games, the games top players tend to win are those small maps because the AI's native advantage of statistical analysis is at its weakest. 

If I had put the Drengin on a medium map, it's hard to say what would happen. But it would probably be tougher for me to win.

As for building AWACS units, the AI does build scouts which have good sensors.  The problem is coordinating those units can be tricky and they get killed so quickly.  As a human player, I build AWACS like units very sparingly and rarely when I'm at war.

on Feb 16, 2006
Just one more on the senate. If everyone has the same type of senate, are the parties the same for Drengin as for humans?
I find it hard to imagine a pacifist party among Drengin .

marcus
on Feb 16, 2006
Brad,
what sort of 'signs' could the ai have looked for whilst it was building up for a long game? OK it could have seen you building lots of warships and eventually moving them at itself, but can it look into your research (i.e. cheat) and determine that YOU are not researching for a long game?
2 Pages1 2