[freeciv-ai] Re: FreeCiv
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Oct 26, 2002 at 12:14:35PM +0200, Guillermo L?pez Alejos wrote:
> Hi!
>
> I'm studing Software Engineering at the University Carlos III of
> Madrid (Spain). I'm going to start a project at the Artificial
> Inteligence group of the Computer Science Departament of my University
> and I've seen that the FreeCiv Project needs a hand with the client
> code. In particular, I'm interested on the back-end comms code. This
> is something that is also interesting for my advisor due to the
> possibility of defining AI players. In case it is of interest to you
> that I work on this interface, I would like to know if you would tell
> me where to start from (parts of the code to look at or methodology to
> follow, if any). I've never worked for an open source project before,
> so I don't know how to work.
The Freeciv network protocol is made of packets which are "serialized"
in a maschine independent manner for the transport
(common/packets). The client caches almost all information which it
gets (client/packhand contains the function which are called if a
specific packet is received, cities and units are caches in a hash
(common/hash, common/idex, common/city, common/unit)). You can access
these cached data with a lot of function from common/ (example is
common/game:find_unit_by_id).
If you want to program an AI you have two choices: a server side AI or
a client side AI. While the current AI is server based (and does heavy
cheating) it is consensus among the developers that a client side AI
is better in the long term since it has some advantages (for a
detailed list I have to dig the mail archive). However there are also
some disadvantages. The main problem is speed: you either have to ask
the server a lot of questions "how long will it take to get the next
tech if I set the science tax rate to 50%". This costs a lot of
traffic but also a lot of round trip times. The alternative is that
the client does these kind of calculation local. This however requires
that client and server calculate stuff in the same way.
BTW: it is possible that I misunderstood you and that I wrote stuff
you already knew and doesn't want to know.
Raimar
P.S.: I CC freeciv-ai because this is the right group for this topic.
--
email: rf13@xxxxxxxxxxxxxxxxx
Q: Do you know what the death rate around here is?
A: One per person.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freeciv-ai] Re: FreeCiv,
Raimar Falke <=
|
|