[Freeciv-Dev] Re: Preparations for other AIs and humans
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Friday 12 January 2001 13:00, Raimar Falke wrote:
> As an preparation step for including other AIs (especially client side
> AIs) I would like to discuss about existing parts of code which do
> some kind of automation.
>
> There are very easy things which can be used be everyone (unit goto,
> tech goal) and also more advanced things like auto-settler and
> auto-explorer. There are things which can only be used by the current
> AI (ferryboat, bodyguard). And there is at least one thing which can
> only be accesses by clients: goto drawing (I didn't look into the
> code. Is the code copied from the server?).
Yes, it is copied from the server. With some small changes that couldn't be
done in the server because the AI depended on them. (like changing the warmap
max cost from char type to short - maybe it should be int?)
Remember my auto ferryboat patch. (which should maybe be ported to the
client.)
> It would be good if any client can easily access these basic kinds of
> automation. Sometimes more flexibilty would be useful. The human may
> specify "auto settle and emphasize on roads/railroads and also build
> them between my cities" because he knows he will attack with cannons
> in 15 turns.
>
> I would also like to see and implement further kinds of
> automation. auto-build-city is an example (there must be code in the
> current AI).
ai/advdomestic.c
> Also some kind of basic city management which can be told
> to "maximize for trade" would be nice. This can also be extended into
> "manage the city so that the city grows in the same turn as the
> production is finished you can use up to 30 credits to buy
> production". Together with worklists would this reduce micromanagement
> a big way. There exists some code about this topic in
> server/cityturn.c:auto_arrange_workers.
>
> IMHO all these things are semantically on top of the basic server
> functions. So I wouldn't bury these code parts deep into the
> server. This only complicate the server's core.
>
> What do you think about this? Where would you put the code?
Client all the way. Then
1) We don't have to worry about cheating. (half reason for goto in client)
2) You can change what you want in your own AI without changing the server.
3) Interaction between the various AI component would be easier if they were
all in the client.
Actually I think we should move most of the player help functionality like
explorers, autosettlers, tech choice and city build choice into the client.
> If the code which exists can not be used to other AIs or is not
> flexible enough it would get reimplemented. Also human clients will
> have an advantage (humans also transfer units over the sea).
I think you will find it not flexible enough (and too undocumented to bother
understanding rather than writing your own). Some of the ideas in it can be
used though, IMO.
-thue
[Freeciv-Dev] SV: Preparations for other AIs and humans, Erik Sigra, 2001/01/13
|
|