This paper constructs a new algorithm that infers beliefs from actions in a generalized guessing game (and in any smooth supermodular game). The algorithm, given a set of data points (choices) as input, returns a detailed histogram (or «spectrogram») whose peaks represent clustered beliefs about L0 in the population. We adopt the well-established level-k framework (Nagel 1996; Stahl and Wilson, 1994, 1995), and allow subjects to have free beliefs. We define an extended class of guessing games (Nagel 1996) where interactions among players are allowed to be heterogeneous. We first characterize a unique, stable and dominance solvable equilibrium. We find that equilibrium uniqueness is a graph theoretical concept in this context, in the sense that it only depends on the structure of dependency network, not on its weights. Second, we settle the model in the level-k framework. The model yields macroscopic identical behavior across levels under reasonable assumptions: we show that the distributions of actions have (approximately) the same shape, that is, all levels 1,2,… display the same macroscopic behavior. This allows us to construct a new MLE algorithm to nonparametrically identify the pattern of expectations about L0 in the population.