Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Re: questions about agents
Home

[Freeciv-Dev] Re: questions about agents

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: questions about agents
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 4 Apr 2002 10:54:48 -0600

On Thu, Apr 04, 2002 at 11:52:46AM +0200, Raimar Falke wrote:
> On Wed, Apr 03, 2002 at 04:27:22PM -0600, Mike Kaufman wrote:
> > > > citizen management, autosettler, autoexplore, etc are more
> > > > mundane things that the human client hands off to the ai to do. 
> > > 
> > > > It's code duplication and bad practice to have two different sets of
> > > > code do citizen management.
> > > 
> > > I agree. But the code in ai/ left me with no other choice. If some
> > > poor soul want to adapt the ai to use code of the CMA feel free
> > > so. However the resulting extract should be placed in common.
> > 
> > well, some poor soul really needs to, but the resulting extract should
> > absolutely not be in common/, it should be in ai/. common/ is [should be] 
> > for
> > code that is common to the client and server. the server should have
> > nothing at all to do with the core cma functions. It shouldn't even know
> > they exist. For now of course, since the ai library is needed by the server
> > (by virtue of the server running the ai), it will see it.
> 
> The client currently doesn't need libcivai.a. This is good this so. I
> don't want to change this. The ai directory is for the server ai
> only. So it should really be moved to server/ai/.

Maybe I'm looking a little bit farther ahead than you are... Moving the ai
to server/ai is a recipe for disaster. I want to get rid of the ai from the
server altogether. I thought you did too. If we keep thinking that ai's
place is in the server, then it'll just be longer to get it out.

_Currently_ the client doesn't need libcibai.a. The server does. I want to
see that reversed. The server shouldn't need it. Period. Hopefully you agree
with that. The client needs it because the client uses (or should/will use) 
ai functions like ai_manage_explorer() as a simple example.

> > 
> > see above on the first. I'm not sure I see your position. The agents code
> > itself should be in client/agents. The code it interacts with should be in
> > ai/ on the one hand, and packhand/guis on the other. Why would you have it
> > otherwise?
> 
> For you the agents are just a glue between the real ai functions and
> the GUI?! Right?. For me the agents include the real ai functions.

yes. GUI/UI/whatever. If a human wants to use a text interface, that's his
business.

> 
> > as for the second point, I want to do: for the interim add new files in ai/
> > that house the cma, sma, etc core functions. agents will use those
> > functions right off the bat. The functions should be general enough so that
> > ai can eventually use them. When we're ready, we punt the old worker
> > management and autosettlers code off the end of a pier (though some of the
> > old worker management stuff should be folded into the "city advisor")
> > 
> > What do you want to do that's different than this?
> 
> As I said I don't want the client to use the ai directory. Merging the
> two ais wasn't in the plan. Instead of putting them in ai/ and
> connecting them I want to put the common part (the core calculation
> methods) into common/(ai/).

Arrgh. I can't see why you'd want to do this unless you keep thinking 
about the ai in the server. I must agree with Per here. If merging
the two AI's wasn't part of the plan before, it should definitely be the 
plan now. It not only less than ideal to have separate AIs, it is
counterproductive. I understand that most of the AI code is in sorry shape,
and you don't want to touch it with a ten foot pole, but that is not a
reason to give the ai the benefit of your work.

Please present your rationale why you believe that libcivai.a shouldn't be
needed by the client. 

Why should ai functions be put in common/ when the plan is to separate the 
ai from the server altogether? 

Why is it critical for agents to do calculations rather than calling into 
the ai?

-mike


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