[freeciv-ai] Re: (PR#10997) AI can sell his last cities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10997 >
On Sat, Nov 13, 2004 at 06:59:40AM -0800, Mateusz Stefek wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10997 >
> There's a problem with including the percent of the empire in
> calculations. I want to avoid situation when buying cities in two steps
> is more/less profitable than buing it in a single step.
> Is there a good formula for that?
A general technique for any such thing would be to evaluate a treaty for
a large number of cities by simulating a series of one-city treaties,
and charging for the cheapest order (because the buyer could just offer
one-city treaties in that order anyway).
If you want to compute just based on the number of cities, then the
order doesn't matter; given n cities, then the first city costs you 1/n;
the second city costs you 1/(n-1), and so on.