Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.
Diplomatic powers
Published on December 27, 2005 By Draginol In GalCiv Journals

GalCiv II has a new diplomacy AI.  It's a complete rewrite from what was in Galciv I.  The AI literally calculates how much it should like a given player based on a broad range of factors.  Some of these factors are displayed on the "report" dialog on the foreign policy window.

During the course of the betas, the kinks in the new system have shown up and this past week I've been going through and addressing them.  For example, the AI tended to go to war with way too many players.  The cause of that was that each "Factor" was independent of others. 

That is, the AI WOULD take into account that it was at war with multiple players. But it didn't do enough countering of that if it didn't like a given player.  So you ended up in a sort of banzai type mentality in the game.

What I've done this time around is to have a "worst enemy" concept.  If the AI is at war with its worst enemy, it will really try to stay out of war with other players.  If it is at war with someone else who is not their worst enemy, it'll potentially make room to go after the worst enemy if it ismilitary strong enough but generally it'll try to stay out of war with more than one player at a time if it can.

This brings us to one of the goofiest parts of GalCiv I that needs to be addressed -- alliances.  In GalCiv I, alliances were great for the weak player but horrible for the strong player because the weak player could run amok because if they got into a war, even if the weak player started it, the strong player got sucked in.

This time, Alliances will be turned into a defense package.  That is, if you attack someone else, your ally isn't bound to help you.  ONLY if you are attacked first will your ally come to your aid. 

So if you are at war with the Drengin and Yor and they are both allied and you make peace with the Drengin, that peace will remain because the Drengin won't be honorbound to re-declare war with you UNLESS you make peace with the Yor and then later START a new war with the Yor.


Comments
on Dec 28, 2005
This time, Alliances will be turned into a defense package. That is, if you attack someone else, your ally isn't bound to help you. ONLY if you are attacked first will your ally come to your aid.



Draginol, you rule. This has been a problem in just about every single TBS game I've ever played, not just GalCiv 1. What I really hated was when your ally would start a war, drag you into it; and then they would make peace with your supposedly mutual enemy (and of course then the enemy civ won't make peace with you, just with your ally). Glad to see you've fixed this, and that you've made alliances work how they ought to!
on Dec 28, 2005
I'm happy about this.This was a big beef for me in the beta.
on Dec 28, 2005
I see a possible problem with this, depending on the exact implementation of this. Does declaring war because of a mutual defense pact trigger a mutual defense pact on the other side?

Question on this: Race A and B have a mutual defense pact. Race C and D have a mutual defense pace.

Now, Race A declares war on Race C.
This triggers the C<->D mutual defense pact, so Race D declares war on Race A.
This triggers the A<->B mutual defense pace, so Race B declares war on Race D
This triggers the C<->D mutual defense pact again, this time with A delaring war on D.

So, in the case of a mutual defense pact on both sides where delaring war to fulfill a mutual defense pact would trigger another mutual defense pact, nothing is gained.

Now, I have no doubt you've thought of this and taken care of if, my question is, how? I just want to make sure I have a proper understanding of the mutual defense pacts.
on Dec 28, 2005

Indeed that can happen, Popup Target.  In the real world, it was called World War I:

Austria-Hungarian prince is assasinated by a Serbian nationalist.

Austra-Hungary declares war on Serbia.

Russia had a mutual defense pact with Serbia and declares war on Austria-Hungary.

This triggered a mutual defense pact Austria-Hungary had with Germany so Germany declares war on Russia.

France had a mutual defense pact with Russia and is thus trigged and declares war on Germany.

When Germany attacks France, they go through Belgium which had a defense pact with Great Britain.

All that because some Serbian nut assasinated the Arch Duke of Austria-Hungary.  So yea, defense pacts can get tangled still.

The difference now though is that at least you're not trigged into war when someone else does the attacking.

on Dec 28, 2005
O.K., I'm fine with that. Between that and the AI focusing on fighting a single enemy at a time, has it improved the "galaxy-wide war" that's been the norm in GC2 so far? Just this one change doesn't look like it would improve that behavior, but since you've the working code to play with, I'm sure you're in a far better position to see if it leads to eternal wars.

My only concern is that for all intents and purposes, a mutual defense pact will still get triggered if the attacker attacks someone with a mutual defense pact, just by indirect means.
on Dec 29, 2005
My only concern is that for all intents and purposes, a mutual defense pact will still get triggered if the attacker attacks someone with a mutual defense pact, just by indirect means.

I guess the whole point of defense pact is that they are triggered once. You can have the whole galaxy at war at a point. But this won't last as soon as some peace are made.

In your example:
Now, Race A declares war on Race C.
This triggers the C<->D mutual defense pact, so Race D declares war on Race A.
This triggers the A<->B mutual defense pace, so Race B declares war on Race D

If after that, D and A make peace, they won't go at war the following turn as it is the case now.
on Dec 29, 2005
That would make things better (in that respect), having only the declaration of war trigger the pact. Of course, that means that a mutual defense pact isn't much of a deterance, since if A attacks C, D sides with C, B sides with A, A and D make peace, B and D make peace, C stands alone against A and B. Of course, A could make peace with B, but it still means that A has C all to itself.

Just thinking it through, I think I'm going to have to see it in action in order to make any real judgement on it.
on Dec 29, 2005
Does the A.I take into consideration the combined military strength of an alliance when deciding war with them, or just the single civ of the alliance he has designs on?
on Dec 29, 2005
I like this, tho it still causes problems if your allied with 2 civs, and they go to war with each other. As its annoying having to break an alliance. You should be able to say "well, im friends with both of you, so im staying out of it"


I wouldnt mind some sort of "spoils of war" pact either, to replace the current war-pact thingy. This would allow each side to specify which planets/starbases it wants to capture or destroy of the target civilization, as this would add a lot to the strategic terms of a the pact. I.e you'd know what your ally was going to be after, so you could go after the spoils you want.
on Dec 29, 2005
The AI looks at who people are allied with.
on Dec 30, 2005
I wouldnt mind some sort of "spoils of war" pact either, to replace the current war-pact thingy. This would allow each side to specify which planets/starbases it wants to capture or destroy of the target civilization, as this would add a lot to the strategic terms of a the pact. I.e you'd know what your ally was going to be after, so you could go after the spoils you want.


I agree with this one.
on Dec 30, 2005
I wouldnt mind some sort of "spoils of war" pact either, to replace the current war-pact thingy.


I agree as well. It would alos rule the case of the surrending enemy - what gets to whom.