Social dominance in mice depends on their history of winning in social contests. Zhou et al. found that this effect is mediated by neuronal projections from the thalamus to a brain region called the dorsomedial prefrontal cortex. Selective manipulation of synapses driven by this input revealed a causal relationship between circuit activity and mental effort-based dominance behavior. Thus, synapses in this pathway store the memory of previous winning or losing history.