The classic strategy game Civilization by MicroProse represents the world map as a square grid where each node of the grid is a tile of the world map, representing some type of terrain. Players control civilian and military units over this map. Each unit has a specific allocation of movement points, and each terrain type costs a specific amount of movement points to traverse, sometimes depending on the unit type. For example, an armor unit may be able to move three tiles on a plain, but only one tile on a mountain. Due to the variable terrain cost for movement, pathfinding in this model can be conceived as a shortest path search in a weighted graph.
The game allows the construction of roads and railroads to facilitate the deployment of units. A railroad segment is constructed within a single tile at a time and renders movement completely free between two adjacent tiles containing a railroad segment each. For the purposes of pathfinding, a connected set of tiles with railroads thereforethis kind of railroad connection can therefore be treated as setting the edge weight between them to zero-weight edges.