Markov state modeling of sliding friction