Just to throw in a couple cents here... I don't fundamentally disagree with
what Per is saying here, but I don't think that it's all gloom and doom.
Take AI government choice for example. To make the 'correct' choice of a
government, a server-side AI can actually change the government, recompute
all the cities and check against other choices. A client-side AI can't do
that, or at least can't do that in a way which loads down the server (and a
client-side AI is what we're talking about here).

The CMA on the other hand can load down the server (if I recall; it's been
awhile) because the client can keep asking for cma_results from the server
to see if they're ok to do. Perhaps throttling these requests is a

I wholeheartedly agree that generalized rulesets have made it hard on AI,
and doing a lot of the heavy-lifting pregame, after the rulesets have been
received by the client, but before the game begins is probably the only way
to go without your supercomputer.  Despite this, humans can do pretty well
with the amount of game state that the server sends their clients, so I
expect that client-side AI can do the same with just as much information
and more attention to detail.


On Wed, Jun 17, 2009 at 06:55:08PM +0200, Per Inge Mathisen wrote:
> Just to echo what was said earlier - the idea of client side agents is
> fundamentally a bad one because it requires too much information to be
> kept and sent to the clients. Only on the server can you access the
> amount of game state required for such agents without running head
> first into race conditions and then deadlocks when try to fix that
> because data has to be distributed over the network link and goes out
> of sync. It took CMA a very long time and a lot of work to reach its
> present state of stability. And CMA "only" does city tile management.
> I have also changed my mind about the desirability of a computational
> game AI. The amounts of CPU time required to compute best outcomes
> increases in such a dramatic fashion when the game rules are
> generalized, that it is simply not worth it. Good rules of thumb that
> can be written as AI scripts specifically for each ruleset will be
> faster, easier to write and maintain, and (therefore) probably even
> lead to better outcomes. This was not an easy conclusion for me to
> reach, because I spent a lot of time on the current computational AI.
> Hindsight is nice.
> If you want to throw computations at Freeciv AI problems, I recommend
> writing a program that analyses a ruleset then generating script rules
> that can be used later for a game AI. That way you can use as many CPU
> cycles as you want without anyone complaining.
>   - Per
> _______________________________________________
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev

Freeciv-dev mailing list

Reply via email to