Re: (PR#10203) Greedy CM algorithm
"Per I. Mathisen" <per-0/[email protected]>
| Newsgroups | gmane.games.freeciv.ai |
|---|---|
| Message-ID | <[email protected]> |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10203 > On Fri, 24 Sep 2004, Jason Short wrote: > > Do you mean units in the field and size of city here? In either case, we > > can precalculate the number of luxuries needed before starting the > > algorithm. > > I believe the amount of luxury required depends on the number of > specialists versus workers.Specialists do not have "happiness" so > happy and unhappy workers are not counted up until after the specialists > have been removed from the pool. Hmm. Specialists are taken out of the number of content citizens, and are counted as such. So unless you have transformed an unhappy citizen into a specialist, my assumption holds. And you can only transform unhappy to specialist when you have turned every content citizen into a specialist. While unlikely with default ruleset, it is, however, definitely possible... I am not sure how serious this problem is. One way to solve it, at least for default rules, would be for calling code to send a minimum number of specialists that has to be allocated (treated like any other minimum), when it recognizes that it is unable to keep city content with the amount luxuries the city can create after a first pass with the algorithm. This requires multiple passes, something I wished to avoid, but it should only happen in rare cases where the city is unable to produce enough luxuries (even with entertainers) to keep it content. This does not allow the algorithm to select solutions that are more optimal when the rules contain more complex specialists and workers, in which using few or no workers is not a fallback but a normal strategy. I am not sure if such ruleset should be considered well-formed and taken into consideration. I would think rulesets with complex specialists would have enough sense to ditch the use of workers completely. - Per