Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1998:
Re: [Freeciv-Dev] External AI client
Home

Re: [Freeciv-Dev] External AI client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Cc: Porterd@xxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] External AI client
From: Sverker Wiberg <sverkerw@xxxxxxxxxxxx>
Date: Tue, 3 Nov 1998 23:37:05 +0100

David Pfitzner wrote:
> David J Porter wrote:
> > 
> > I've begun work on an _external_ AI client, 
> 
> I hope you have a lot of spare time :-)
> (I think you'll need it to make a good client-side AI.)
> You should probably try to understand the current (server-side)
> AI, since you should be able to borrow or adapt parts of it.
> (Though understanding the current AI may itself take some time :-)
> 
> > QUESTIONS:
> > 
> > 1] Does there need to be a protocol whereby an AI client needs to declare 
> >    itself to the server and through it to the human players in a particular 
> >    game?
> > 
> > 2] Should all AI clients be run on the same machine as the server? (Or at 
> > least 
> >    restricted to some known server machine?)
> > 
> > 3] Should human players be allowed to spawn AI clients, or soley connect an 
> > AI 
> >    client?  (The latter may be useful for developing the AI algorithms, or 
> > even 
> >    in the case where games are run solely for the purpose of AI versus AI 
> >    battles in the FreeCiv 'arena'.)
> > 
> > 4] Would/Should it be possible for the server to spawn AI clients on a 
> > players 
> >    machine?  On willing players machines?
> 
> As far as I'm concerned, for the server (and other clients) a
> client-side AI should look just like a normal player.  One of the
> benefits of client-side AI would be that if you happen to have a 
> local network with idle machines, you could run the AI's on 
> different machines and reduce CPU usage on the server machine.
> It would be cool to combine a client-AI with a normal client and 
> be able to turn parts of the AI on or off as "player helpers", though
> that's getting even more ambitious...

One idea would be to let the civ client publish an AI-interface
through SysV IPC (the map and some status as shared memory, commands
and notifications as messages). Semaphores would probably be needed to
protect data in the shared memory (making the client somewhat more
complex). The IPC facilities would, in a sense, be the AI's display
and keyboard.

That would, of course, need data structures shared between the client
and the AI. Also, the configure script should test for SysV IPC (and
also permit disabling the interface).

/Sverker


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