Complete.Org: Mailing Lists: Archives: freeciv-ai: October 2003:
[freeciv-ai] Re: (PR#6567) AI has too many boats.
Home

[freeciv-ai] Re: (PR#6567) AI has too many boats.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#6567) AI has too many boats.
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 19 Oct 2003 07:52:23 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, 19 Oct 2003, Gregory Berkolaiko wrote:
> The root of all evil is the current system of boat building.
> If a city wants to build a unit which wants to go to another continent
> to settle/fight, it will normally build a boat first.

Like most of the Syela AI, the theory behind it is sound, but the
implementation is crap. The problem lies in the defective nature of
find_boat(), which more often than not does not actually find a boat when
there is one.

If we have available boats, we can assume that we can get one, and just
short-cut the build-boat step. If we do not have any available boats, we
build a boat. Thus we increase the number of boats as needed.

> There are two problems caused by this:
> 1. Too many boats are built.
> 2. Inland cities will never consider a unit for overseas jobs because it
> knows it cannot build a ferry for it.
>
> We can solve problem 1 by a simple check for the number of idle boats.
>
> Solving problem 2 is more tricky.

I do not see how 2 is a special problem. The AI already builds units for
overseas jobs if it can find_boat() a ferry. If we available boats, we can
just assume we can find a boat instead of actually look for it before
building a unit.

> But if there are many inland cities and only one coastal city which for
> some reason prefers coinage to overseas warfare and therefore doesn't
> build boats of its own accord, we are stuck.

That is a hard problem either way you do it.

> Just build units and when they _really_ (not virtually) want to go
> somewhere, build boats for them.

This is a bad idea. We should build boats first as we do now.

  - Per




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