Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [Patch] CMA 2.2
Home

[Freeciv-Dev] Re: [Patch] CMA 2.2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Christian Knoke <ChrisK@xxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] CMA 2.2
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Oct 2001 10:05:34 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Oct 08, 2001 at 11:32:41PM +0200, Raimar Falke wrote:
> On Mon, Oct 08, 2001 at 10:25:49PM +0200, Christian Knoke wrote:
> > Am Montag,  8. Oktober 2001 19:08 schrieb Raimar Falke:
> > > On Mon, Oct 08, 2001 at 06:27:52PM +0200, Christian Knoke wrote:
> > > >
> > > > I played a bit.
> > > >
> > > > 1) strange things happen with the worked tiles display
> > > >    when you try to rearrange the workers of CMA-controlled
> > > >    cities on the main map. E.g. the center tile is not shown
> > > >    as worked sometimes.
> > >
> > > I forgot about this undocumented "feature". The player should be
> > > disallowed to change anything on the citymap if the agent controls
> > > the city.
> > 
> > citymap = main map ?
> 
> No city map = the 20 tiles a player can put workers or not.
> 
> > > > 2) whenever you release a valueable tile in the city map (or
> > > >    in the main map using "t") of a human controlled city, it
> > > >    is grabbed away by another's city agent.
> > >
> > > Should be so or not?
> > 
> > Hard to say. It is very difficult now to maintain a city by hand,
> > if there are any CMA's in the neighbourhood. 
> > 
> 
> > For the city map (i.e. in the city window) you could disallow
> > agent updates until the window is closed. But I can imagine
> > that this is not easy to do.
> 
> This may be possible. On the other side you can choose the manage all
> your cities with the CMA ;)
> 
> > Maybe you touch the limits of the agent model here.
> 
> I know that the CMA will only manage one city and that the behavior in
> such cases as mentioned above is undefined. The settler management
> agent does do a global allocation of tasks. The question is (if a tile
> has become "free" and two CMA-cities want to use it) which city should
> get the tile? And another questions is: should it be possible that a
> CMA-city gives a tile away if another CMA-city needs it more? The
> natural way would be to measure the change of the fitness
> method. However there is a problem: the re-calculation of a set of
> overlapping cities can be without limit. Another solution which has
> nicer properties is:
>  - each city has a level
>  - in a given set of overlapping cities there no two cities which have
>  the same level
>  - the allocation of tiles is based on the level

Ok and here a real proposal:

New agent called GlobalTileManagementAgent or MetaCitizenManagementAgent.

Purpose: Since the CMA doesn't do any inter-city optimization anothe
level of is needed. The GTMA/MCMA acts upon so called Overlapping City
Set (OCS). These are cities which directly or indirectly share a tile
with each other. Through the GTMA/MCMA the user can set a parameter
called level for each city within a OCS. Each city in a OCS has to
have a different level. A city with a higher level can "steal" tiles
from a city with a lower level.

If each city in a OCS is handled as a seperate object there is the
possibility that there are endless feedback loops.

Implementation: The agent will make use of the CMA. A simple
implementation would be to 
 - "freeze" the CMA
 - remove any worker
 - "unfreeze" the CMA
 - call the CMA for the city with the highest level
 - call the CMA for the city with the second-highest level
...
 - call the CMA for the city with the lowest level

Open issues: What level should have human-user managemented cities
get?

Comments?

I won't build this logic in the CMA. The new agent will be expensive
(either network related as in the solution above or computational with
another solution) but I don't see another solution for this. For
example it is possible that a city borrows for one turn a high-shield
tile from another city just to finish the production of an important
item (a defence unit for example) in the next turn. So there are uses
but it will be expensive.

I don't plan to implement this new agent in the near future. The other
agents (GA and SMA) are more ready.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Make it idiot-proof and someone will make a better idiot."


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