[Freeciv-Dev] Re: (PR#12841) city_luxury_need function
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12841 >
On Thu, Apr 21, 2005 at 09:25:12AM -0700, Jason Short wrote:
> I don't see how the "fixed" function will be useful. Where do you plan
> to use it?
In the CM. For each #specialists, compute min-luxuries. Then if we
know we have n specialists, we know we need to produce a certain number
of luxuries (namely, min_{n' >= n} min-luxuries) no matter what; which
implies we need a certain function of lux+trade. We can check that
against the heuristic. The calculation isn't trivial devtime-wise but
it's very cheap runtime-wise: at the outset (in start_search),
pcity->size calls to city_luxury_need, and then it's just a constant-time
lookup per internal node.
This would speed up cities that are almost in disorder or that need to
celebrate. I had this idea ages ago but never got around to
implementing it.
-- Benoît
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, (continued)
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Per I. Mathisen, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Benoit Hudson, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Benoit Hudson, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Benoit Hudson, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Per I. Mathisen, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Benoit Hudson, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Jason Short, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Jason Short, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Per I. Mathisen, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function, Brian Dunstan, 2005/04/21
- [Freeciv-Dev] Re: (PR#12841) city_luxury_need function,
Benoit Hudson <=
|
|