Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: Agents and network (Was (for reasons unnown): Path fin
Home

[Freeciv-Dev] Re: Agents and network (Was (for reasons unnown): Path fin

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: Freeciv Development List <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Agents and network (Was (for reasons unnown): Path findig)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Tue, 26 Nov 2002 20:32:41 +0100

On Tue, Nov 26, 2002 at 07:16:54PM +0000, Gregory Berkolaiko wrote:
> On Tue, 26 Nov 2002, Raimar Falke wrote:
> 
> > On Tue, Nov 26, 2002 at 05:19:57PM +0000, Gregory Berkolaiko wrote:
> > > On Tue, 26 Nov 2002, Per I. Mathisen wrote:
> > > 
> > > > On Tue, 26 Nov 2002, Gregory Berkolaiko wrote:
> > > > > Possible solutions are:
> > > > > 1. Make client fully rules-aware (duplicate rules engine in client)
> > > > > 2. Move theagents to the server.
> > > > >
> > > > > Option 1 is boring.
> > > > >
> > > > > Option 2 will impose some limitations on the client and is certainly a
> > > > > very brave thing to do.But it will be very interesting to code and 
> > > > > will
> > > > > also stop many compatibility problems.
> > > > 
> > > > Yes! Finally someone agrees with me.
> > > > 
> > > > Agent backends should go into the server. CM preferences should be sent 
> > > > to
> > > > the server and applied there - end of many CM problems. Path and path
> > > > parameters should be sent to server and executed there.
> > > 
> > > And we can actually go a bit further.  At the connection time server 
> > > tells 
> > > the client what agents are available and what are the parameter fields 
> > > and 
> > > options for each agent.  The client uses this information to create the 
> > > agent dialogue, collects the parameters, sends them to the server.  
> > > Server 
> > > applies the parameters, the results are sent to the client using normal 
> > > update packets.  So there are no actual agents in the client, but there 
> > > is 
> > > universal client support -- no compatibility issues!
> > > 
> > > It sounds a bit like SciFi, but I am sure it's implementable.
> > 
> > But you both know what _client-side_ AI means?!
> 
> Assume I don't.  Please enlighten me.

It means that everybody should be able to write a client side AI. This
means that the client-side parts (think agents but the idea is more
general) are freely changeable. This also means that the author should
be able to reuse parts.

Agents are _one_ implementation of this idea. So what I'm currently
did/doing is creating the infrastructure (agents.c) and basic agents
(CMA, SMA, GA) which almost every client-side AI would need. You may
now argue that these basic parts should be moved into the server to
yield better performance. But this means that now someone who changes
one of the basic parts will take a (huge) penalty hit because the
software now runs at the client. You can now raise the point that I'm
insane because I take the penalty for every case (unmodified CMA and
changed CMA). This is right. This pressure should however help us to
optimize things in such a way that the difference of client-side
running and server-side running will get smaller. I consider the idea
of freeze/thaw, queue/unqueue, buffer/unbuffer (many names for the
same thing) of the mapcanvs updates a direct cause of this pressure
(this isn't correctly right since the SDL client had it before but
only by a small time).

Big alternative would be if the client could send code to the server
and the server executes it. This however has a lot of other problems
(DoS, cheating by sniffing, ...).

Bottom line: I don't want that offical agents are better, faster than
un-offical ones just because they found they way into the server.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Programming today is a race between software engineers striving to
  build bigger and better idiot-proof programs, and the Universe trying
  to produce bigger and better idiots. So far, the Universe is winning."
    -- Rich Cook


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