[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]
On Sun, 19 Oct 2003, Per I. Mathisen wrote:
> 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.
Yep, this is what I meant by "a simple check" below.
> > 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.
What if we don't have any available boats? We just don't build the unit
then? Because we have no mechanism for asking other cities to build a
boat for us...
> > 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.
Why? Boats have the same upkeep and cannot be useful for defence (for
example) while they are waiting for the passengers.
On the other hand, if we make inland cities to only consider overseas
jobs when there are boats, an existing boat can stimulate production
inland...
G.
|
|