Self-Aware Markov Models for Discrete Reasoning