Probabilistic approach to feedback control enhances multi-legged locomotion on rugged landscapes