[freeciv-ai] Re: interested in building a new client-side AI
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, 21 Apr 2003, David Chen wrote:
> I am a Berkeley student working with my professor on implementing an AI
> for freeciv.We are interested in building a completely new AI agent that
> knows only as much as the human player.As I understand, the current AI
> code is a bit messy and is attached to the server side.Moreover, one of
> the current goals being worked on is building a client side AI.So I was
> wondering how difficult it would be to build an interface for a client side
> agent.Since we require no omniscience, it wouldn't need any hack on the
> server code.If anyone can point me to the files that I need to read to
> build a clean interface, that would be greatly appreciated.
The easiest solution is to write a server-side AI, since then you won't
have to deal with network issues.
However, if you really want to do a client-side AI, then you should look
at client/gui-stub/ in the sources, which is a bare-bones client that you
can use as a starting point for a new AI client.
I'd also recommend reading the mail archives, since this is an issue that
has been discussed before at length and you might learn something, and
I don't know how much code from other AIs you can use, but you should at
least look at Raimar Falke's client agents and ask your professor if you
can use the common AI code that is in common/aicore/. I think there isn't
much innovative in writing yet another path-finding or worker management
You should also make up your mind about whether you want to make an AI
that does exactly the right things all the time on the micro level
(Raimar's approach), or an AI that is more fuzzy, fast and does decisions
primarily on the macro level (the approach by the original server-AI
author, as well as myself usually).
Then there is the rules-in-client vs rules-in-server issue, that is,
whether you want to duplicate the server's understanding of the rules in
the client (Raimar's approach) or whether you want to query the server for
its rules judgements (current client approach).
Note that combining microlevel exactness and rules-in-server will kill the
network, flooding the server with requests.
Anyway, don't be afraid to ask questions on this list if you have any.