Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2004:
[freeciv-ai] (PR#9063) Bug: AI can't handle notradesize/fulltradesize
Home

[freeciv-ai] (PR#9063) Bug: AI can't handle notradesize/fulltradesize

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] (PR#9063) Bug: AI can't handle notradesize/fulltradesize
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Fri, 24 Sep 2004 03:18:06 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9063 >

> [mstefek - Fri Sep 24 10:16:15 2004]:
> 
> Here's a patch. It helps a bit.
> You can really see a difference in worker arrangement.
> Of course it doesn't solve whole problem, but it's worth commiting
> AI should build more harbours and irrigate more.
> --
> mateusz
> 

Index: cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.264
diff -u -r1.264 cityturn.c
--- cityturn.c  22 Sep 2004 02:00:58 -0000      1.264
+++ cityturn.c  24 Sep 2004 10:11:21 -0000
@@ -205,7 +205,11 @@
    * are on a different scale.  Later the ai may wish to adjust its
    * priorities - this should be done via a separate set of variables. */
   if (pcity->size > 1) {
-    cmp.factor[FOOD] = 10;
+    if (pcity->size <= game.notradesize) {
+      cmp.factor[FOOD] = 15;
+    } else {
+      cmp.factor[FOOD] = 10;
+    }
   } else {
     /* Growing to size 2 is the highest priority. */
     cmp.factor[FOOD] = 20;

[Prev in Thread] Current Thread [Next in Thread]