Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2003:
[freeciv-ai] Re: (PR#6595) Optimize/reimplement CM
Home

[freeciv-ai] Re: (PR#6595) Optimize/reimplement CM

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#6595) Optimize/reimplement CM
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Nov 2003 11:05:40 -0800
Reply-to: rt@xxxxxxxxxxx

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

Guest wrote:

> Actually, if the implementation allows for such a solution, then the
> optimization will be much easier. You could just solve the problem using
> continuous linear programming, and then realize this solution by using
> the food box as a buffer. The only case I can think where this is not
> possible, is if one tile by itself produces more food than the food box
> can contain, since the food box then cannot act as a buffer.
> 
> Of course, this approach blurs the difference between long-term and
> short-term/immediate goals, but if the implementation allows for such
> planning, it will at least result it better use of tiles. It will also
> shorten the shorter execution time needed to find an 'optimal' solution,
> since you don't need to consider integer programming, but instead you
> have to keep a record of the planned tile usage and use time to update
> the city tiles every turn (possibly). I don't know what the net effect
> on execution time would be, but the idea will at least solve the
> potensially very difficult integer programming problem.

I think the implementation would be fairly straightforward.  First solve 
the LP problem, then take all the remainders and pick a pseudo-random 
combination of those tiles based on the turn number.  Then do a final 
check on the base constraints (mimum food and production surpluses 
necessary to avoid unit/population loss).

jason




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