Complete.Org: Mailing Lists: Archives: freeciv-ai: February 2005:
[freeciv-ai] Re: AI is really confused about wonders
Home

[freeciv-ai] Re: AI is really confused about wonders

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: AI is really confused about wonders
From: saywhat@xxxxxxxxxxxx (Eddie Anderson)
Date: Fri, 11 Feb 2005 03:32:50 -0500

Benoit Hudson <bh@xxxxxxxxxxxxxxxxxxx> wrote:
>On Thu, Feb 10, 2005 at 02:18:52AM +0100, Lo'oris wrote:
>> the top (even losing some food if necessary), and if i can i send it=20
>> some caravans/freights.=20
>>=20
>> i suppose he doesn't do any of theese things :/=20
>
>The AI does, in fact, send caravans.  That said, the AI doesn't value
>the Trade tech very highly, so it doesn't get caravans until about 1000
>AD in a typical game.
>
>(I have a patch out to make the AI smarter about using built caravans,
>but I don't know of work to make it smarter about getting caravans).

    Would it be possible to copy the "want ferry" code and modify it
to do "want caravan"?  If so, then maybe I have a solution to the
problem of creating "want" for caravans in some cities.  See below.

    Does the "want ferry" code also influence the AI's want for
ferry-building techs?  If so, then maybe the "want caravan" code
could be made to increase the AI's want for the "Trade" tech.  Does
this seem feasible?


>> i receive lots of messages of cities starting to build a wonder and=20
>> changing idea. He always looses large amounts of production and time=20
>> this way. Sometimes he also starts to build the same wonder in two=20
>> cities, and things like that.=20

    This frustrates me too.  In fact, it is currently my biggest
complaint about the AI.  The AI looks very stupid when it does this
over and over again.

    And AFAICS, the AI can't blame its ineffective wonder building
on sudden needs for defensive units.  Because even when there are
no enemy offensive units *anywhere* on the map, the AI fails to
finish most of the Wonders that it starts.  Moreover, even when
there are no enemy cities *anywhere* on the map, the AI *still*
can't reliably finish the wonders that it starts.

    Furthermore, the AI's inability to build wonders makes Freeciv
much less interesting to play (IMO).  Peaceful games of Freeciv
(emphasizing technological/economic competition instead of war) are
practically pointless because the AI does not compete effectively
(in building wonders).


>Major problem; it's been happening forever; it happened in civ2 as well.

    At least I haven't seen the Freeciv AIs imitate the Civ2 AIs'
tendency to build Palaces (switching the capital from city to city).
I'm thankful for that.


>The reason: most things are done with local reasoning.  That is, each
>city thinks "oh, it'd be nice to have the pyramids" and starts to build
>it, all at the same time.  Then the city has some pressing need (say,
>for a defender), and it can't ask another city to fulfill it, so it has
>to switch.

    Could the AI's wonder building decisions be centralized?  I have
an idea that works by simply restricting each AI civ's building
choices.  The restrictions I have in mind are these:

1) Only one city at a time (per AI per continent) should be allowed
   to build a wonder.

       Before the AI tells a city to start building a wonder, the AI
   should check to see if any other of its cities (on that
   continent) are already building a wonder.  If there are none,
   then go ahead and start building a wonder in that city.

2) Once a city starts building a wonder, it *must not stop* until
   a wonder (*any* wonder) is completed.

       After that city completes a wonder, only then can a different
   city start building a wonder.

3) Until that wonder is complete, any other city which is *tempted*
   to build a wonder should build a caravan (or freight) instead.

4) When that caravan is done it should be sent to the city which is
   currently building a wonder.

5) If a defensive (or other) unit is needed in the wonder-building
   city, then one of the cities building a caravan should switch its
   production to the needed unit (and then send that unit to the
   wonder-building city).

    If the AI followed these rules, then it would appear to be
vastly smarter than it does now.  I hope that someday, if the AI can
be taught to make reasonable wonder-building decisions by other
means, then these restrictions could be removed.  Until that day, I
would like to see a method like this tried.

-Eddie





[Prev in Thread] Current Thread [Next in Thread]