In distributed systems with redundant network paths, dynamically selecting optimal communication routes for parallel programs is essential for minimizing latency and avoiding congestion. However, this is challenging due to unpredictable network conditions and concurrent workloads that create time-varying performance characteristics. This paper presents a reinforcement learning framework that enables programs to adaptively select communication routes based on historical performance without requiring global network state monitoring. We employ the Upper Confidence Bound 1 (UCB1) algorithm for small candidate sets and an improved ϵ -greedy algorithm for larger sets, providing logarithmic regret bounds in stationary environments and sublinear regret in dynamic scenarios. We demonstrate this approach on the 3-Quads cluster, a distributed system with three redundant subnetworks, where simulation and visualization programs run concurrently. Experiments show that our method reduces data transmission delay by 30-45