Markov Random Fields and Gibbs Ensembles