[freeciv-ai] (PR#9884) AI never breaks alliance
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[freeciv-ai] (PR#9884) AI never breaks alliance |
From: |
"Mateusz Stefek" <mstefek@xxxxxxxxx> |
Date: |
Tue, 31 Aug 2004 15:22:27 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9884 >
> [glip - Tue Aug 31 21:32:13 2004]:
>
> On Tue, 31 Aug 2004, Mateusz Stefek wrote:
>
> > In current implementation AI will break alliance only if you are not at
> > war with it's target. AI never considers it's allies as war target. This
> > should be changed. Attached patch is really simple.
> > Note that if ai.love == 96 (maximum realistic level), war desire is
> > divided by 25!. So it will really rarely happen. (You can move your
> > units into AI's territory if you want to reduce love a little)
> >
> > I playtested it. AI broke alliance with me when I was four times as big
> > as he and the second most powerfull nation was two times smaller than
> > me. I had also had units on its territory for few turns (love was = 70
> > in a turn when it broke alliance).
> > I think this is a step into correct direction.
I also noticed that it formed alliance with former enemies.
> It sounds like AI committing suicide...
> It either should break alliance earlier (say when human power > AI player
> + runner-up AI) or naively hope that the big brother won't screw them
>
I agree that AI should go to war earlier.
I hope that this patch will help.
It has to be massively playtested just like all changes in rules. It's
very hard to find correct balance.
--
mateusz
Index: advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.31
diff -u -r1.31 advdiplomacy.c
--- advdiplomacy.c 31 Aug 2004 16:47:10 -0000 1.31
+++ advdiplomacy.c 31 Aug 2004 22:18:33 -0000
@@ -627,10 +627,10 @@
}
} players_iterate_end;
- /* Modify by love */
+ /* Modify by love. Increase the divisor to make ai go to war earlier */
kill_desire -= MAX(0, kill_desire
* pplayer->ai.love[aplayer->player_no]
- / 100);
+ / 200);
/* Amortize by distance */
return amortize(kill_desire, adip->distance);
@@ -787,10 +787,6 @@
continue;
}
- /* Strongly prefer players we are at war with already. */
- if (pplayers_non_attack(pplayer, aplayer)) {
- war_desire[aplayer->player_no] /= 2;
- }
PLAYER_LOG(LOG_DEBUG, pplayer, ai, "Against %s we have war desire "
"%d ", aplayer->name, war_desire[aplayer->player_no]);
|
|