Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] (PR#9480) Re: [freeciv-ai] A TODO list for AI (fwd)
Home

[Freeciv-Dev] (PR#9480) Re: [freeciv-ai] A TODO list for AI (fwd)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9480) Re: [freeciv-ai] A TODO list for AI (fwd)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 22 Jul 2004 14:42:10 -0700
Reply-to: rt@xxxxxxxxxxx

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

Forwarding to RT, since this patch is worth considering. Although the size
should not be hardcoded like this.

  - Per

---------- Forwarded message ----------
Date: Wed, 14 Apr 2004 17:34:36 -0400
From: Benoit Hudson <bh@xxxxxxxxxxxxxxxxxxx>
To: Per I. Mathisen <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: Re: [freeciv-ai] A TODO list for AI

On Wed, Apr 14, 2004 at 01:28:40PM +0000, Per I. Mathisen wrote:
>  - Better coordination of 'Rapture', ie trying to make cities celebrate so
> that they can grow, tying in the use of luxuries, elvises and tax. Never
> try half-way (as the AI often does now), either go for rapture or only do
> as much luxuries as necessary to avoid revolution/unrest.

A partial answer would be to fix the problem the CM has with thinking
that a city of size 2 can be in rapture.   A patch to do that is
attached.  Hard-coding '3' is bad, but I'm not sure how better to fix
this.  Add a function in city.[ch] ?

Once we fix that, then we can make the AI always use a celebrate bonus
of +50 or more, and put a weight on luxuries of zero.  That'll make the
AI try hard to celebrate without making it maximize luxuries for their
own sake.

This is only a partial answer because you pretty much need some luxuries
in the tax to celebrate.

        -- Benoît

Index: common/aicore/cm.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/cm.c,v
retrieving revision 1.20
diff -b -u -p -r1.20 cm.c
--- common/aicore/cm.c  26 Feb 2004 04:05:10 -0000      1.20
+++ common/aicore/cm.c  14 Apr 2004 21:31:38 -0000
@@ -478,7 +478,7 @@ static void copy_stats(struct city *pcit
   result->surplus[SCIENCE] = result->production[SCIENCE];
 
   result->disorder = city_unhappy(pcity);
-  result->happy = city_happy(pcity);
+  result->happy = city_happy(pcity) && (pcity->size >= 3);
 }
 
 /****************************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9480) Re: [freeciv-ai] A TODO list for AI (fwd), Per I. Mathisen <=