What sort of algorithms can I use to find a least cost path through a DEM where it costs more to traverse a cell going downhill or uphill than it does to follow the contour of the land?
All the examples I've seen involve creating a least cost surface where the magnitude of the slope is part of the cost - but the direction isn't.
Additionally, the examples assume the cost to travel through a cell does not depend on the direction of travel.
PathDistance
command for Spatial Analyst? If you're interested in algorithms rather than just software, it may help to notice this is an example of a Calculus of variations problem. In fact, by introducing a third dimension to represent all possible orientations at each point (the circle bundle over the region of interest), this becomes a least-cost problem within a 3D space (which can be gridded into voxels for a raster-based solution).