CWOL does not require players to fully specify the path that a
movement moves by rail. Players only need to submit the
destination, and the algorithm finds a path (if it can) to the
destination from the unit's start point. The reason is partly
because typing in 35 different rail squares would be bothersome,
and partly because RR movement comes near the end of the turn, so
if a rail line is cut by enemy action, the unit has the
possibility of finding a different path to the destination, if one
exists.
However, the algorithm that finds paths does not check all
possible paths to see which one is shortest (which would be
difficult and time-consuming). Instead, the algorithm searches
along the rail network, and in any square where it has a choice
about which direction to go, it tries to move in the direction of
the target if it can. For example, if it comes to a four-way rail
intersection, and the destination is 2 squares north and 5 square
west, it will first attempt to go north, then west, then east, and
last south. North and west are both towards the target, and it's
closer to the north than to the west; east and south are both away
from the target but east is less bad.
Normally this leads to finding the shortest path - but it may not.
If it doesn't, it will usually still lead to a path that is nearly
as short as the shortest path, and as long as both paths are less
than 40 squares, the unit will reach the destination anyway so it
doesn't matter. However, there can be cases where a path less than
40 squares exists, but the algorithm first finds one longer than
40 squares, and so it moves the unit along that longer path and
the unit doesn't reach the destination when it could have by the
other path.
This problem can be avoided by using rail waypoints
appropriately, by causing the unit to move away from its ultimate
destination, either at the start of movement or at a critical
junction, where moving towards the destination may cause the
algorithm to find a very long path to the destination.
Example: Consider a unit that is at H9-X4, which is two squares
west of Savannah GA. It wants to rail towards Augusta GA at H6-W4,
which is 3 squares west and 10 squares north. The algorithm has a
choice whether to look for a path that goes north from H9-X4 to
H9-X3, or east from H9-X4 to I0-X4. North is towards Augusta and
east is away from Augusta, so the algorithm starts by going to
H9-X3. At it searches along the rail network, it will find its way
to the junction at H6-W8, where it will choose to go north, and
find Augusta along a direct path of 13 steps.
However, suppose enemy cavalry cuts the railroad at H6-W6, so that
that short 13-step path is unavailable. The next shortest path
from H9-X4 to Augusta starts by going east to I0-X4, then north
across the state border into South Carolina; that route eventually
recrosses the border and reaches Augusta in 23 steps. However,
that route requires taking the first step away from Augusta, and
so the algorithm doesn't try to go that way at first. Instead, it
prefers to try to find another route to Augusta that starts by
going north from H9-X4. There is one - it involves going from
H9-X4 to the junction at H6-W8. When the algorithm realizes that
going north from that junction is blocked, instead of returning
all the way back to the start point, it instead tries going west
from the junction. (After all, why give up the progress made by
getting to H6-W8?) From there, it keeps going, and via Macon at
G8-W8 and Atlanta at G5-W3, it can eventually get back to Augusta
without having to take a step in a "wrong" direction when it has a
choice not to.
But that route is 41 squares, and so the unit will be railed 40
squares along that route, leaving it one square short of Augusta
(and on the other side) when a shorter route would have gotten the
unit all the way into Augusta.
This sort of perverse outcome can only happen when there are
multiple routes between start and destination, and the shortest
one starts with a move in the wrong direction. Fortunately, there
are few places on the map where these kinds of multiple paths
exist, where the one that goes the wrong way at start is actually
shorter; so this isn't normally going to create problems.
However, there will be times when it does. If one foresees the
problem and wants to avoid it, one can do so by using a waypoint.
If one gives the RR order with a waypoint of something like I2-X1,
which forces the unit to start moving in the "wrong" direction and
move far enough that after the waypoint, the unit will want to
continue in the "right" direction instead of returning to its
starting point, then one can get the algorithm to find the 23-step
route. One will forgo the 13-step route by doing that, but it
doesn't matter since you get there either way.
This may be a useful technique for avoiding RR lines that you
anticipate may be cut during the turn.