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: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Cc: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: questions about agents
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 3 Apr 2002 21:29:01 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Apr 02, 2002 at 03:55:26PM -0600, Mike Kaufman wrote:
> On Tue, Apr 02, 2002 at 10:50:47PM +0200, Per I. Mathisen wrote:
> > What are the current plans for Settler Management Agent?

I will restart working on it if the new release is out.

> > Is there any code, any specs or anyone working on it?

Only some (very) old code.

> > Is the plan to replace all the current autosettlers code with
> > this, or just some of it?

Long answer: The general idea is to create/copy-modify code which
handles the basic tasks (auto*) and also higher tasks in a fashion
which is ok for client side operation. This ai-code and the "classic"
server code will both be put into the CVS tree. If at some point the
"new" ai-code is as good as the "classic" one and the civbot is coded
the "classic" one can disabled/removed.

Short answer: server/autosettler.c and other ai/*.c and server/*.c
won't be touched by new agents.

> > And move GOTO to the client (please)?

We have three users of goto (server, client and agents). If we can
agree upon an interface and an implementation I would really to unify
this and create a common/goto.

> > Why are we not using the agents code for the server-side AI? (I know I've
> > asked about this before but I have forgotten the answer and it seems so
> > strange I have to ask again.)

This isn't the plan. If you want to use agents at the server you have
to either use the civbot way or have to look at this for yourself.

> As I have mentioned, I don't have the answers to these (Raimar has a much
> better idea), but I do have some comments.
> 
> My feeling is that agents should simply be the interface between the client
> and the ai.

What client? The client in "client and server" or the GUI client?

> 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.

> Agents should do two things. Get directives from the client to tell the ai 
> what to do and then request the server to do that thing. Using CMA as an
> example, the agent should 1. get the goals from the client gui and ask the
> ai function what worker arrangement best satisfies that goal directive. 2.
> then send some packets to the server requesting worker rearrangement. All
> the actually calculation should accomplished in ai/
> 
> Actually this might be a good first step toward a more rigorous ai
> advisor type setup. The advisor in advdomestic.c presents goals---just like
> the human client---to the core cma code which returns the best arrangement.
> The advisor then implements that arrangement in the current server-ai
> setup, or will send requests to the server in the future client-ai setup.
> 
> another example is the autoexplorer. Right now, we hand the unit off to the
> server which calls ai_manage_explorer. In a perfect world, the server
> should not be the one doing this. There should be an agent which manages
> all the autoexplorers doing the calls into ai_manage_explorer, and then
> send destination or move info to the server through the regular request
> packets.

I see two points where we disagree:
 - where should be code be placed client/agents (maybe with common/) vs ai
 - whether we use the existing infrastructure in ai/ or not

> I don't know that the plan was for SMA, but the plan should be as generally
> outlined above. All the settler "want" code in settlers.c should be moved
> to ai/ and then an agent and the helper gui should be added to call into
> that code, which will then send requests to the server on a per-settler
> basis.
> 
> anybody have any comments? yay, nay? Raimar?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Just because you put a flag on the moon doesn't make it yours, it just
  puts a hole in the moon."


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