Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277
Home

[Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Cc: Petr Baudis <pasky@xxxxxxxxxxx>, "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Mon, 25 Feb 2002 18:15:32 -0800 (PST)

--- Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx> wrote:
> On Mon, Feb 25, 2002 at 05:19:12AM -0800, Raahul Kumar wrote:
> > Ah hah. By the way, for Per's info, the AI does establish trade routes.
> There
> > are crap routes though, the AI does not seem to check on city size at all
> when
> > establishing trade routes.I have never seen it establish a trade route with
> a
> > foreign civ.
> 
>       Under Civ1 rules (trade routes only give a benefit to the
> originating city) the AI should (but does not) preferentially establish
> trade routes in enemy cities, to get the higher value.

I'm not sure about how to implement this. Ideas don't come to mind.

>       Under Civ2 rules, with bidirectional trade routes, establishing
> trade routes with your own cities provides the same benefit (cities in the
> same nation get half value of cities in different nations, but you just
> made 2x trade route numbers) without helping your opponents at all.

No, not quite. If you want to absolutely maximise your income, with an empire
of two cities involved in making caravans

4 trade routes with diff foreign cities, not necessarily the same empire
Assume 3 gold per route( can easily be much more) 2 * 4 * 3 = 24

Same cities trade with other cities in the same empire

2 * 4 * 1 = 8 

The guy who trades with foreign civs will have more profitable cities. More
profit cities means you can build improvement like marketplace, bank,
stockexchange and rake in more cash.

Also think of the situation over time. My two cities will produce 3 times as
much gold over the same time period. More gold = more units = more
wonders/improvs/mil units.

>       However, one of the reasons why the AI doesn't make trade routes
> often is that there is no way to know how long it is until endgame and
> calculate a proper value for that.  We could assume a minimum, and that
> would make trade route creation more common, but it would also be
> inaccurate.  This function would be useful for other purposes as well.
> 
>       The AI does check trade route value.  The code is right there in
> ai_manage_caravan().  The algorithm is:
> 
>       If we're building a wonder, go there and help.
>       If we're not, make the best trade route you can on this continent.
> 
>       This algorithm was chosen in part because trade route creation is
> broken as I recall.  It is checked when a caravan enters any city, rather
> than necessarily the city it was destined for.  (The goto arguments about
> avoiding cities may now recommence.)

Easy fix. If punit->type == caravan avoid cities on goto.

  Also, at the time, I don't think that
> goto routes across continents were something I understood how to do.
> 

Tony, does the AI use airports? The ferryboat code looks dubious at best.
Exactly what does happen when a caravan needs to go across the ocean.

>       Again, the AI want values for caravans do not seem to take trade
> route value into account, so they are not built often.  The immediate
> benefits of establishing a trade route can be quite large -- gold and
> science income of more than 50 points.  That alone might be able to justify
> building caravans in certain situations.
> -- 
> Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
> "And they said work hard, and die suddenly, because it's fun."
>       -Robyn Hitchcock.
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com


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