Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2002:
[freeciv-ai] Re: Generalised improvements AI support
Home

[freeciv-ai] Re: Generalised improvements AI support

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Raahul Kumar <raahul_da_man@xxxxxxxxx>, "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, Freeciv-ai <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: Generalised improvements AI support
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 8 May 2002 15:40:05 +0100

On Tue, May 07, 2002 at 06:05:01PM +0200, Raimar Falke wrote:
> Ben: generic_city_refresh is a nice high level function.

        That'll teach me to reply to early posts before reading the
whole discussion. ;) You're right; impr-gen touches this function in
a big way.

> Do you have numbers on this function?

        No, but I'll get some for you. There is a caveat, however; I don't
actually do any impr-gen iteration in generic_city_refresh. Instead,
whenever update_all_effects is called, the impr-gen city bonuses are
recalculated and stored in the pcity structures. generic_city_refresh
just applies these bonuses, so could actually work out as being faster
than the old code (which has all those tests for building types). I'll
get some profiles which roll in the update_all_effects (which is an
expensive function) calls too, and that'll be more representative, IMHO.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"I think there is a world market for maybe five computers."
        - Thomas Watson, chairman of IBM, 1943


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