🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #808

Shortest Path Algorithm

#808
From: Karl S Mathias
Date: Thu, 20 Aug 1992 15:21
24 lines
1632 bytes
I hope this isn't a FAQ, but I'm looking for a least-cost path algorithm
for a hexmap wargame.  To be useful, it needs to meet the following
requirements:

  -- Take into account varying terrain costs.  The direct path will 
     almost never be the least-cost path (so shortest path solutions are
     out).

  -- Be efficient.  Exhaustive searches of the entire game board will
     not work since there are several hundred units and several thousand
     hexes (100 x 100).

By way of background, this is a fairly typical land/air wargame.  The
ground portion consists of a 100 x 100 hex map (each hex 25km across).
Each hex can contain mountains, clear, desert, etc. type terrain.  Some
hexsides are crossed by rivers and fortifications.  Roads and railroads
traverse across hexsides through the center of various hexes.

If you have an algorithm I'd sure appreciate any help you could provide.

-------------------------------------------------------------------------
Capt Karl Mathias                                  kmathias@afit.af.mil
Graduate Student, Air Force Institute of Technology
"Opinions expressed are my own and not those of the U.S. Air Force" 
Technical Details
Message-ID: <1992Aug20.152143.1953@afit.af.mil>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!udecc.engr.udayton.edu!blackbird.afit.af.mil!kmathias

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!udecc.engr.udayton.edu!blackbird.afit.af.mil!kmathias
From: kmathias@afit.af.mil (Karl S Mathias)
Subject: Shortest Path Algorithm
Message-ID: <1992Aug20.152143.1953@afit.af.mil>
Keywords:  HEX HEXMAP 
Sender: news@afit.af.mil
Nntp-Posting-Host: wb10.afit.af.mil
Organization: Air Force Institute of Technology
Date: Thu, 20 Aug 1992 15:21:43 GMT
Lines: 24