Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2003: [freeciv-ai] Re: (PR#6227) Boats in assess danger

# [freeciv-ai] Re: (PR#6227) Boats in assess danger

[Top] [All Lists]

 To: undisclosed-recipients: ; Subject: [freeciv-ai] Re: (PR#6227) Boats in assess danger From: "Gregory Berkolaiko" Date: Mon, 22 Sep 2003 03:47:45 -0700 Reply-to: rt@xxxxxxxxxxxxxx

```On Sun, 21 Sep 2003, Per I. Mathisen wrote:

> On Sun, 21 Sep 2003, Gregory Berkolaiko wrote:
> > There are other possibilities:
> > 1. only consider boats found on the same square as the danger-induced
> > unit. This is not very good as it will completely ignore units which
> > are about to embark on a ferry -- these might be just one turn away.
> >
> > 2. assume that the boat will be where it is needed "by magic".I.e.
> > assume enemy units can walk on water as fast as the enemy boat can.
> > This will require some crafty path-finding, in particular it is harder
> > to make one-size-fits-all map for distance estimation because the
> > different units walk with different speed on land but with the same
> > speed on water :(
>
> To assume that all units can walk on water is too demanding and too
> paranoid. We can, however, assume that every unit within reach of a ferry
> are on board it, up to its carry limit. Then we check all ferries if they
> are near us.

I am not sure why this is "demanding" and to make it less paranoid all you
have to do is to reduce the danger generated by such units by a good
factor.  So we would check
1. Can this unit get to us by itself
2. Does it have a transporter on the tile
3. If none of the above, we use the "walk on water" model

Looking for the ferries in vicinity is tedious and time-consuming.  All we
need is an estimate really.  Also looking for ferries doesn't take into
account the ferries that can be bought/built next turn.  The more specific
you make the distance checks, easier it is to fool them.

> That still leaves the question of how we figure out which units can board
> that ferry. Overlap mode will find the large majority of real world cases,
> I think. Ferries in cities will search its continent, while ferries in the
> sea will search the beaches. We still have the case of an inland unit that
> can move (road/rail) to the beach and jump into a transport, but going to
> such lengths will consume too much CPU to be worth the effort, IMO.

You have problem of (a) enemy inland units and (b) your inland cities and
finding beaches for both boarding and landing and so much of such
calculations that bugs alone (not talking about speed) will render it
unusable.

G.

```