Markov random fields and techniques for performing inference with them