[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]
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.
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.
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.) Also, at the time, I don't think that
goto routes across continents were something I understood how to do.
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.
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), (continued)
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Per I. Mathisen, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Tony Stuckey, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Petr Baudis, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277),
Tony Stuckey <=
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/25
|
|