Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: find_the_shortest_path()
Home

[Freeciv-Dev] Re: find_the_shortest_path()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: find_the_shortest_path()
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Sep 2001 14:34:38 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Sep 18, 2001 at 04:41:38AM -0700, Raahul Kumar wrote:
> 
> --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > On Tue, Sep 18, 2001 at 04:37:11AM -0400, Jason
> > Dorje Short wrote:
> > > > In a mathematical and formal way there is no
> > shortest path if there
> > > > are edges in the graph which have no cost. IMHO
> > a clean solution is to
> > > > create a compound cost which is
> > (normal_move_cost,
> > > > rail_road_steps_taken). IMHO it wrong to trust
> > this property of the
> > > > Dijkstra algorithm.
> > >
> 
> There seems to be a simple solution to this problem.
> Introduce a cost for railroad movement !!!! 

Yes and no. This all depends on how you define cost. It is ok if I can
define the cost (for the path finding algorithm) as as
(normal_move_cost, rail_road_steps_taken). It is also possible to
include other things like distance from enemy or discovered tiles in
the cost.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "From what I am reading Win98 and NT5.0 will be getting rid of all that
  crap anyway. Seems that Microsoft has invented something called TCP/IP and
  another really revolutionary concept called DNS that eliminates the
  netbios crap too. All that arping from browsers is going to go away.
  I also hear rumors that they are on the verge of breakthrough discoveries
  called NFS, and LPD too. Given enough time and money, they might
  eventually invent Unix."
    -- George Bonser in linux-kernel


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