On Mon, May 24, 2010 at 6:15 AM, Goswin von Brederlow <goswin-...@web.de> wrote:
> I would also like the AI to run as seperate client (that way it can't
> use privileged information from the server at all) or at least seperate
> thread. In large maps the AI takes a majority of the time and nowadays
> multi-core systems are more and more common. Freeciv would run 4 times
> as fast here with the AIs spread over 4 cores.

Just for the record, I'm making a bit of progress again on my
client-side AI experiment.  I'm back to sending settlers off to found
cities, this time in a less arbitrary and hardcoded way.  I'm somewhat
surprised by how well it picks out city sites, given the crudeness of
its calculation.  I'd be delighted to share patches with anyone who's
curious, but this is really just a hacking-for-fun effort: expect no
academic papers on it.

I think I've chatted to you about some stuff that flew right over my
head, some stuff about Voronoi diagrams and convex hulls.  Frankly, I
don't understand any of it!  I like your proposal for a "wear"
algorithm (read: I can at least understand how to implement that).

The one thing that may (or may not, I'm not familiar with the current
AI code) be new is that my struct strategy understands the time value
of money.  Founding a mediocre city in 2 turns is, in some cases,
better than founding a good one in 20.  Also, struct strategy knows
about purposes and dependencies: it has a way of encoding that to move
a (nonexistent) unit, you have to build it first.  Intuitively, both
these features feel very "right".  Time will tell if they prove to be
a lasting asset.

I'm not sure if the AI really needs long-range strategy.  At the
moment everything seems okay with a stateless model, where each new
turn starts a fresh cycle of planning.  In a sense the long-range
state is already encoded in the consequences of choices made in the
previous turn: another X shields have made it even cheaper to continue
building a settler, so the algorithm doesn't "forget" that it had
decided many turns ago to build another settler in order to build
another city.  For coordinated attack, I can easily imagine reversing
this opinion.

One thing that worries me a bit is that the client/server protocol is
somewhat hostile to client-side AI implementations: they're almost
forced to solve the hard problem of computer vision.  Some things
would have been a lot easier if the protocol allowed for some sort of
cookie to be attached to some notion of "transaction".  But so far
that isn't a major problem; it will be ifwhen I start adding military
action.

Regards

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to