[freeciv-ai] (PR#9846) AI should count other players in it's territory
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[freeciv-ai] (PR#9846) AI should count other players in it's territory |
From: |
"Mateusz Stefek" <mstefek@xxxxxxxxx> |
Date: |
Sat, 28 Aug 2004 03:02:30 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9846 >
This is improved version of James Camente's patch in PR#9006.
I think it's better to count units of allies too, because AI is too naive.
I have tested it. With 3 units in ally's territory love is about 50
(Enthusiastic)
--
mateusz
Index: advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.27
diff -u -r1.27 advdiplomacy.c
--- advdiplomacy.c 30 Jul 2004 20:40:49 -0000 1.27
+++ advdiplomacy.c 28 Aug 2004 09:58:37 -0000
@@ -707,6 +707,12 @@
}
pplayer->ai.love[aplayer->player_no] -= ai->diplomacy.love_incr;
}
+ /* Reduce love by number of units in our territory.
+ * AI is so naive, that we have to count it even if players are allied */
+ pplayer->ai.love[aplayer->player_no] -=
+ MIN(player_in_territory(pplayer, aplayer),
+ pplayers_allied(aplayer, pplayer) ? 10 : BIG_NUMBER);
+
/* Massage our numbers to keep love and its opposite on the ground.
* Gravitate towards zero. */
pplayer->ai.love[aplayer->player_no] -=
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freeciv-ai] (PR#9846) AI should count other players in it's territory,
Mateusz Stefek <=
|
|