Adaptive routing algorithms