Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2003:
[freeciv-ai] Re: Ferry dating agency.
Home

[freeciv-ai] Re: Ferry dating agency.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Anthony J. Stuckey" <astuckey@xxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: Ferry dating agency.
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Wed, 26 Nov 2003 22:49:51 +0000 (GMT)

On Wed, 26 Nov 2003, Anthony J. Stuckey wrote:

> On Wed, Nov 26, 2003 at 06:05:27PM +0000, Gregory Berkolaiko wrote:
> > (I hope my email will not be classified as spam due to the subject).
> > 
> > This is about how ferries find their passengers and vice versa.
> > Several approaches are possible, for example:
> > 
> > 1. Ferries do PF search which goes inland too.
> > 2. Land units do PF search which goes into the seas.
> > 3. Land units head for the nearest shore.  Ferries do PF search up to 
> > coastal tiles.
> > 3a. As in previous, but unit head for the nearest port.
> > 4. Ferries head for the nearest port.  Land units do PF search through 
> > their continent only.
> > 
> > Right now a dodgy version of 3 is implemented.  Ferries do their search 
> > alright, but whether land units will go anywhere depends on luck (see 
> > find_boat function).  This works fine if the land unit is on the shore in 
> > the first place, which is most of the time.
> > 
> > I am inclined to change to system 2.  Any comments?  Suggestions of help?
> 
>       It seems to me that the strategy is somewhat dependent on the ratio of
> available ferry capacity to units needing ferries.  Units which are still
> being built should also be considered.

Yes, I thought that this could be decided dynamically.  But it would mean 
much code for ferries looking for units and vice versa.

>       Military units should try to wait in a port, as unhappiness rules would
> come into play if they were to wait outside.  Non-military units are free
> to wait on any coastal tile.

Ah, this is a very good point!

It is possible to have a unit-seeks-ferry search which only considers 
cities as possible rendezvous points. But this means a unit might be asked 
to walk to another city and thus cause unhappiness.

This is hard to take into ccount properly though: iamgine a RR-covered 
continent.  Then units _should_ go to the port nearest to the boat as it 
will not cause any unhappiness during this journey.

>       Idle ferries should always head back to port, or to a site of predicted
> need if units which are still being built are considered.  (Or explore, in
> the very early game.)

This is what they do, only they explore not only early, but always.  This 
is easy to change though.

G.




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