Complete.Org: Mailing Lists: Archives: freeciv-ai: April 2003:
[freeciv-ai] Re: [RFC] Ferry code

[freeciv-ai] Re: [RFC] Ferry code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: [RFC] Ferry code
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Sun, 6 Apr 2003 13:34:35 +0200

On Sat, Apr 05, 2003 at 05:34:55PM -0500, Jason Dorje Short wrote:
> I don't see why coastal towns should come into play.  There's no reason 
> a ferry route should be related to them at all, and it will lead to some 
> non-optimal routes.

I have the same in mind when I made my proposal.

> If for U you consider every boat B(i) (i: [0,n)), then you can pick the 
> optimal boat to get you where you want to go.  This is an O(n) 
> operation, but probably no worse than having to look at every city on 
> your continent.

You also have to look at every city. It is possible that a near city
can produce a boat faster than an existing boat does arrive.

> Problem 1: How do you define optimal?  Is the only consideration how 
> long it takes U to get to its destination?  Or do you consider how much 
> of B(i)'s time you're taking up?  If B(i) can ferry other units while U 
> is on the way, is this better?

I think the first one. To reduce the complexity. I would also limit
the number of passengers to one per boat: less complexity and more
robust in cse one boat was destroyed.


 email: rf13@xxxxxxxxxxxxxxxxx
  reality.sys corrupt. Reboot Universe? (y,n,q)

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